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

[JIRA Server] Issue not created when Jenkins build fails

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Jira "version":"8.5.1","versionNumbers":[8,5,1],"deploymentType":"Server","buildNumber":805001,"buildDate":"2019-11-04T00:00:00.000+0200","databaseBuildNumber":805001

      Jenkins jira-plugin 3.0.14

      The fix for Cloud JENKINS-57695 caused a regression with Server as it still expects the old name param to be present in the payload [1] (Jira server response logged in webapp container). 

      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.

      [1]

      hudson.plugins.jira.JiraRestService.createIssue Jira REST createIssue error: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={assignee=expected Object containing a 'name' property}, errorMessages=[]}]}
       java.util.concurrent.ExecutionException: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={assignee=expected Object containing a 'name' property}, errorMessages=[]}]}
      	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357 undefined)
      	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1928 undefined)
      	at io.atlassian.util.concurrent.Promises$OfStage.get(Promises.java:357 undefined)
      	at com.atlassian.jira.rest.client.internal.async.DelegatingPromise.get(DelegatingPromise.java:106 undefined)
      	at hudson.plugins.jira.JiraRestService.createIssue(JiraRestService.java:304 undefined)
      	at hudson.plugins.jira.JiraSession.createIssue(JiraSession.java:412 undefined)
      	at hudson.plugins.jira.JiraCreateIssueNotifier.createJiraIssue(JiraCreateIssueNotifier.java:204 undefined)
      	at hudson.plugins.jira.JiraCreateIssueNotifier.currentBuildResultFailure(JiraCreateIssueNotifier.java:357 undefined)
      	at hudson.plugins.jira.JiraCreateIssueNotifier.perform(JiraCreateIssueNotifier.java:159 undefined)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20 undefined)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741 undefined)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690 undefined)
      	at hudson.model.Build$BuildExecution.post2(Build.java:186 undefined)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635 undefined)
      	at hudson.model.Run.execute(Run.java:1881 undefined)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43 undefined)
      	at hudson.model.ResourceController.execute(ResourceController.java:97 undefined)
      	at hudson.model.Executor.run(Executor.java:428 undefined)
      Caused by: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={assignee=expected Object containing a 'name' property}, errorMessages=[]}]}
      	at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:176 undefined)
      	at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:170 undefined)
      	at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:49 undefined)
      	at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:10 undefined)
      	at io.atlassian.util.concurrent.Promises$OfStage.lambda$fold$4(Promises.java:332 undefined)
      	at io.atlassian.util.concurrent.Promises.lambda$biFunction$7(Promises.java:422 undefined)
      	at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:836 undefined)
      	at java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:811 undefined)
      	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488 undefined)
      	at java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:575 undefined)
      	at java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:814 undefined)
      	at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:456 undefined)
      	at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable.lambda$run$0(SettableFuturePromiseHttpPromiseAsyncClient.java:152 undefined)
      	at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient.runInContext(SettableFuturePromiseHttpPromiseAsyncClient.java:71 undefined)
      	at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable.run(SettableFuturePromiseHttpPromiseAsyncClient.java:152 undefined)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149 undefined)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624 undefined)
      	at java.lang.Thread.run(Thread.java:748 undefined)

        Attachments

          Issue Links

            Activity

            Hide
            warden Radek Antoniuk added a comment -

            This was released in 3.1.0 - refer to https://github.com/jenkinsci/jira-plugin/releases.
            If you are still experiencing issues, feel free to open a new bug report with all details and stacktrace.

            Show
            warden Radek Antoniuk added a comment - This was released in 3.1.0 - refer to https://github.com/jenkinsci/jira-plugin/releases . If you are still experiencing issues, feel free to open a new bug report with all details and stacktrace.
            Hide
            saieash Saieash Mohanadas added a comment -

            Hi Team - when will this fix be released? 

            Show
            saieash Saieash Mohanadas added a comment - Hi Team - when will this fix be released? 
            Hide
            johno Johno Crawford added a comment -

            Radek Antoniuk I updated the description to include versions, the stacktrace is from 3.0.14 but the code in master has not changed.

            Show
            johno Johno Crawford added a comment - Radek Antoniuk I updated the description to include versions, the stacktrace is from 3.0.14 but the code in master has not changed.
            Hide
            warden Radek Antoniuk added a comment -

            What plugin version and Jira version are you testing with?

            Show
            warden Radek Antoniuk added a comment - What plugin version and Jira version are you testing with?
            Hide
            johno Johno Crawford added a comment -
            Show
            johno Johno Crawford added a comment - Proposed fix  https://github.com/jenkinsci/jira-plugin/pull/250

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              johno Johno Crawford
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: