[JIRA] (JENKINS-60782) issue_updated trigger handler can't find "name" field in JSON

4 views
Skip to first unread message

udayasree.patlolla@bcbsma.com (JIRA)

unread,
Jan 15, 2020, 11:38:08 AM1/15/20
to jenkinsc...@googlegroups.com
Udaya Sree created an issue
 
Jenkins / Bug JENKINS-60782
issue_updated trigger handler can't find "name" field in JSON
Issue Type: Bug Bug
Assignee: Wisen Tanasa
Components: jira-trigger-plugin
Created: 2020-01-15 16:37
Priority: Blocker Blocker
Reporter: Udaya Sree

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://jenkinscb2.bcbsma.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

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

udayasree.patlolla@bcbsma.com (JIRA)

unread,
Jan 15, 2020, 1:53:06 PM1/15/20
to jenkinsc...@googlegroups.com
Udaya Sree updated an issue
Change By: Udaya Sree
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/|https:// jenkinscb2.bcbsma.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
Reply all
Reply to author
Forward
0 new messages