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: 

How do you copy the last comment of an issue to a custom field with SR for JIRA Cloud?

Randy
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.
December 5, 2016

I'm trying to set a custom field's value to the last comment in the issue so that I can query for it and include it in confluence.  Will be writing this script as a SR listener on create/update of an issue.

I am on JIRA Cloud and using SR for JIRA cloud.

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Randy
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.
December 9, 2016

Used /rest/api/2/issue/${issue.key}/comment to query for the comment.

Then it was just a matter of issuing a PUT to /rest/api/2/issue/${issue.key} to set the value in my custom field.

riccardo.presutti
January 8, 2020

Hi Randy, i'm trying to do the same thing, can you send me the code for this please?

Mark Crocker
Contributor
February 14, 2020

Me too please