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 Leaders.
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

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 Leaders.
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 February 14, 2020

Me too please

Suggest an answer

Log in or Sign up to answer