How to get Comment field value to assign using RESTAPI to differentiate between external & Internal.

Hi Team,

 

My code is working in the cloud environment.

Actually, "Share with Customer" & Internal Comments to be separated and to be mapped with Additional Comments & worknotes in SNOW.

Please Help.

 

My Code working in Cloud environment.

PFB : 

var isComment = issueJson.fields.comment.comments[issueJson.fields.comment.comments.length - 1].jsdPublic;
var comm = issueJson.fields.comment.comments[issueJson.fields.comment.comments.length - 1].body.content[0].content[0].text.toString();
if (grInc.comments.getJournalEntry(-1).toString().split('\n')[1].trim() != comm && isComment)
grInc.comments = comm;     //(External Comments Mapping)
else if (grInc.work_notes.getJournalEntry(-1).toString().split('\n')[1].trim() != comm && !isComment) {
grInc.work_notes = comm;    //(Internal comments Mapping)

 

 

Please help on this and do needful favour..

 

Thanks

SRI

 

1 answer

0 votes
Gaurav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 01, 2021

Hello @sriharsha m 

In Jira Service Management, the APIs can help us to post the comments specific to customers or keep those internal.

The tag of this is 'public' which is boolean and can be set as either 'true' or 'false' which will comment is shared with the customer or otherwise.

The API documentation from Atlassian is available here.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events