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

[JIRA Server] Issue not created when Jenkins build fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • jira-plugin
    • None

      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)

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

              Created:
              Updated:
              Resolved: