Error on Servicenow Jira Integration using Jira Spoke

syam1
Tera Contributor

Hi,

 

We have trying to implement Jira Integration in ServiceNow using Jira Spoke. In Flow we are using create issue action and while setting additional field values we are facing below error for one field value.

Error:
Can not deserialize instance of java.lang.Long out of START_OBJECT token
at [Source: N/A; line: -1, column: -1]

 

When we check that field configuration at Jira end, its an custom field which is locked. During on-premise Jira integration for locked fields we are able to set the data during issue creation. But, now Jira team is moved to Atlassian from on-premise setup.

At ServiceNow side when we try to create new issue at jira using create issue action its not working for locked custom fields where above error is coming. If anyone encountered the similar issue. Kindly provide some inputs to resolve the error.

7 REPLIES 7

Prabu Velayutha
Mega Sage
Mega Sage

@syam1 can you try the same request body with Postman UI and check if you're facing same issue, if so then this could be the field permissions or setting at Jira side should be checked, post the migration there are chances the configuration could have changed, Postman can help in identifying if the issue with ServiceNow API calls to Jira.

Hi @Prabu Velayutha,

Thanks for the Response.

Yes, We have tried using post man and it successfully created the story in Jira. However for the custom field we are using value as numeric in postman. But, in ServiceNow Flow designer Create Issue spoke its giving option to select the choice values instead of numeric values which its causing the issue. Do we have any option to fix the issue? Kindly let me know. 

 

customfield_10024 is the field creating the issue, in Jira its a locked and choice field having string values. Earlier we used to pass numeric value as its a string field in On-premise account. Now its Atlassian account and its a choice field with non-numeric values.
Note: Below is the sample payload we are using for postman. 

Sample Payload:

{

"fields": {

"project": {

"key":

"TS"

},

"summary":

"Test",

"issuetype": {

"name":

"Incident"

},

"description":

"Test",

"customfield_10024" :

"52"

}

}

@syam1 Have you tried to use a Script Step before the Create Issue action in Flow Designer. This will allow you to manually set the value for customfield_10024 using the numeric ID, bypassing the choice selection issue.

Hi @Abhay Kumar1, Yes. I have tried below different scripts and same error is triggered.

var customfield_10024 = 52;

return customfield_10024;


or

 

var customfield_10024 = '52';

return customfield_10024;