Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57695

[Jira Cloud] Issue not created when jenkins build fails

    Details

    • Similar Issues:

      Description

      I have setup the 3.0.6 version of Jira plugin for jenkins with my jenkins instance. I am having issue with "Create jira issue" upon job failure. 

      Below is the error i am getting (from Console Output)

       

       Build step 'Execute shell' marked build as failure
       ERROR: Build step failed with exception
       java.lang.NullPointerException
       at hudson.plugins.jira.JiraSession.createIssue(JiraSession.java:413)
       at hudson.plugins.jira.JiraCreateIssueNotifier.createJiraIssue(JiraCreateIssueNotifier.java:202)
       at hudson.plugins.jira.JiraCreateIssueNotifier.currentBuildResultFailure(JiraCreateIssueNotifier.java:357)
       at hudson.plugins.jira.JiraCreateIssueNotifier.perform(JiraCreateIssueNotifier.java:157)
       at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
       at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
       at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
       at hudson.model.Build$BuildExecution.post2(Build.java:186)
       at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
       at hudson.model.Run.execute(Run.java:1843)
       at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
       at hudson.model.ResourceController.execute(ResourceController.java:97)
       at hudson.model.Executor.run(Executor.java:429)
       Build step 'JIRA: Create issue' marked build as failure
       Finished: FAILURE

       

       Need urgent help to fixing it.

       

      Regards

      Sachin Gahlawat

        Attachments

          Issue Links

            Activity

            Hide
            johno Johno Crawford added a comment -
            Show
            johno Johno Crawford added a comment - It seems to be related to this change wrt cloud JIRA, we are using self hosted Jenkins..  https://github.com/jenkinsci/jira-plugin/blob/72096e6921b85397e663d6bc2a9c855cc7116838/src/main/java/hudson/plugins/jira/JiraRestService.java#L290
            Hide
            johno Johno Crawford added a comment -

            As mentioned in the linked Bitbucket merge request 

            setFieldInput(new FieldInput(IssueFieldId.ASSIGNEE_FIELD, ComplexIssueInputFieldValue.with("accountId", assignee))); should only be applied to cloud, not server.

            Show
            johno Johno Crawford added a comment - As mentioned in the linked Bitbucket merge request  setFieldInput(new FieldInput(IssueFieldId.ASSIGNEE_FIELD, ComplexIssueInputFieldValue.with("accountId", assignee))); should only be applied to cloud, not server.
            Hide
            johno Johno Crawford added a comment -
            Show
            johno Johno Crawford added a comment - Proposed fix  https://github.com/jenkinsci/jira-plugin/pull/250
            Hide
            warden Radek Antoniuk added a comment -

            Guys, please do not reopen already fixed issues as this makes it difficult to track what has been fixed (and notifies a lot of old watchers for this ticket for which it was already resolved).

            This issue has fixed the integration with JIRA Cloud wrt to GDPR changes.
            I see the problem you're having with Jira Server version, but please open a new ticket for this and state what Jira Server version and plugin (current version preferred) you have used. (you can link those two tickets as related by More > Link)

            Show
            warden Radek Antoniuk added a comment - Guys, please do not reopen already fixed issues as this makes it difficult to track what has been fixed (and notifies a lot of old watchers for this ticket for which it was already resolved). This issue has fixed the integration with JIRA Cloud wrt to GDPR changes. I see the problem you're having with Jira Server version, but please open a new ticket for this and state what Jira Server version and plugin (current version preferred) you have used. (you can link those two tickets as related by More > Link)
            Hide
            johno Johno Crawford added a comment -

            To me it made sense to reopen the ticket which caused the regression but I am also happy to create a new ticket, apologies for the hassle.

            Show
            johno Johno Crawford added a comment - To me it made sense to reopen the ticket which caused the regression but I am also happy to create a new ticket, apologies for the hassle.

              People

              • Assignee:
                Unassigned
                Reporter:
                gahlawat4u Sachin Gahlawat
              • Votes:
                1 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: