Hello Stefan, I think the documentation of the plugin is slightly outdated (or maybe only “COMPATIBILITY.md”):
* https://www.jenkins.io/doc/pipeline/steps/jira/#jiracomment-jira-add-a-comment-to-issues * https://github.com/jenkinsci/jira-plugin/blob/1dacc167a9b21fc4d9256866a5f67ef741af7805/src/main/java/hudson/plugins/jira/pipeline/CommentStep.java#L30 * I think this should work: jiraComment('FREF-363', 'My super jira comment') HTH Reinhold P.S.: Not sure if “COMPATIBILITY.md” is supposed to be the pipeline step documentation. If so, you may want to make a little PR with the updated usage? From: [email protected] <[email protected]> On Behalf Of ST Sent: Montag, 4. Jänner 2021 22:17 To: Jenkins Users <[email protected]> Subject: Re: jiraComment pipeline step throwing groovy.lang.MissingMethodException Yes, we have installed latest version of jira plugin 3.1.3. Also I am successfully calling jiraSearch() method from the same plugin a few lines above in the same scripted pipeline. FYI Here is the documentation of the Pipeline API of the jira plugin: https://github.com/jenkinsci/jira-plugin/blob/master/COMPATIBILITY.md For the reference here is the exception again from my first email that I'm getting - any other ideas what could be the reason for getting this groovy exception? Caught exception (exception: 'groovy.lang.MissingMethodException: No signature of method: java.lang.String.call() is applicable for argument types: (java.util.LinkedHashMap) values: [[issueKey:FREF-363, body: My super jira comment]] On Mon, Jan 4, 2021 at 11:17 AM Arnaud bourree <[email protected]<mailto:[email protected]>> wrote: Did you chek if you have Jira plugin installed? Arnaud Le dim. 3 janv. 2021 à 22:06, ST <[email protected]<mailto:[email protected]>> a écrit : Anyone has any idea why jiraComment(issueKey, body) is not working for us in scripted pipeline, see below for exception message? Anyone that can confirm that it works fine in a scripted pipeline with latest version of Jenkins and jira plugin? Otherwise I will file a bug issue in the next days. Thanks, Stefan. On Wed, 23 Dec 2020, 17:24 ST, <[email protected]<mailto:[email protected]>> wrote: I am trying to add a comment to a jira issue from my scripted pipeline with this command: jiraComment(issueKey: 'FREF-363', body: 'My super jira comment') And I'm getting the following error: 17:07:25 Caught exception (exception: 'groovy.lang.MissingMethodException: No signature of method: java.lang.String.call() is applicable for argument types: (java.util.LinkedHashMap) values: [[issueKey:FREF-363, body: My super jira comment]] 17:07:25 Possible solutions: wait(), chars(), any(), wait(long), any(groovy.lang.Closure), each(groovy.lang.Closure)', message: 'No signature of method: java.lang.String.call() is applicable for argument types: (java.util.LinkedHashMap) values: [[issueKey:FREF-363, body:My super jira comment]] 17:07:25 Possible solutions: wait(), chars(), any(), wait(long), any(groovy.lang.Closure), each(groovy.lang.Closure)') during build, current build result is null. [Pipeline] node I am inside a node{} declaration, and I am not inside a @NonCPS method. What is wrong with my pipeline code? Documentation for the step is here, I have basically copy&paste'd from here: https://github.com/jenkinsci/jira-plugin/blob/master/COMPATIBILITY.md#commentstep Also these other jira commands work just fine from the same scripted pipeline: * jiraSearch * step([$class: 'hudson.plugins.jira.JiraIssueUpdateBuilder', jqlSearch: … ]) And we are using Jenkins v2.271 and jira-plugin v3.1.3 (latest). Any help much appreciated, I have the feelign I am missing something very simple here ;-) stefan. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CABwQARtjA5%2Bv3WmCX%3DP4JmsNSpgvXWE%2BD_hmY0EaSJ4XEWavgQ%40mail.gmail.com<https://groups.google.com/d/msgid/jenkinsci-users/CABwQARtjA5%2Bv3WmCX%3DP4JmsNSpgvXWE%2BD_hmY0EaSJ4XEWavgQ%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAESUf_A7TKXSgcj%3DbEaAWBSQOaTZTSf1%2BsL2RkMgtKaEm3SC%2Bg%40mail.gmail.com<https://groups.google.com/d/msgid/jenkinsci-users/CAESUf_A7TKXSgcj%3DbEaAWBSQOaTZTSf1%2BsL2RkMgtKaEm3SC%2Bg%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CABwQARuoPuSK_jiH_aMiHrF3Pfz2ud_5DGQ2oU-dJeJKkyKZgA%40mail.gmail.com<https://groups.google.com/d/msgid/jenkinsci-users/CABwQARuoPuSK_jiH_aMiHrF3Pfz2ud_5DGQ2oU-dJeJKkyKZgA%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/VI1PR01MB663836D3ED65D32190424718F7AA0%40VI1PR01MB6638.eurprd01.prod.exchangelabs.com.
