The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • How to get Comment field value to assign using RESTAPI to differentiate between external & Internal.

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

sriharsha m
July 30, 2021

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Gaurav
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 1, 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.