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

issue_updated trigger handler can't find "name" field in JSON

    Details

    • Similar Issues:

      Description

      The library that the plugin is using is not supported for Cloud, but only for Server, as you can see in the description of the code: >Java client library (useful for any JVM languages), which allows to communicate with JIRA via its new REST API (JIRA 4.2 and newer). "name" field is blocked by Jira cloud >https://developer.atlassian.com/cloud/jira/platform/api-changes-for-user-privacy-announcement/.

       

      Error:

      2020-01-07 17:30:53.262+0000 [id=833] WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving https://abc.com/jira-trigger-webhook-receiver/ org.codehaus.jettison.json.JSONException: JSONObject["name"] not found. at org.codehaus.jettison.json.JSONObject.get(JSONObject.java:360) at org.codehaus.jettison.json.JSONObject.getString(JSONObject.java:487) at com.atlassian.jira.rest.client.internal.json.JsonParseUtil.parseBasicUser(JsonParseUtil.java:192) at com.atlassian.jira.rest.client.internal.json.CommentJsonParser.parse(CommentJsonParser.java:37) at com.atlassian.jira.rest.client.internal.json.CommentJsonParser$parse.call(Unknown Source) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.WebhookCommentEventJsonParser.parse(WebhookCommentEventJsonParser.groovy:40) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.WebhookCommentEventJsonParser$parse.call(Unknown Source) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook.processEvent(JiraWebhook.groovy:71) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook$processEvent.callCurrent(Unknown Source) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook.doIndex(JiraWebhook.groovy:51) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396) Caused: java.lang.reflect.InvocationTargetException

       

      Class used: https://bitbucket.org/atlassian/jira-rest-java-client/src/1cb0d4e65adf8108980069b344d54d825544d70b/core/src/main/java/com/atlassian/jira/rest/client/internal/json/JsonParseUtil.java?at=jira-rest-java-client-parent-4.0.0#lines-192

      Github Code: https://github.com/jenkinsci/jira-trigger-plugin/blob/master/src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/WebhookCommentEventJsonParser.groovy#L40https://github.com/jenkinsci/jira-trigger-plugin/blob/master/src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/WebhookCommentEventJsonParser.groovy#L40

       

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              ceilfors Wisen Tanasa
              Reporter:
              udayasree18 Udaya Sree
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: