Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to auto populate custom field(text) based on another custom field(checkbox) using script runner

I am trying to run an extract to provide an off-site team just the latest comments on a JIRA ticket if the ticket has a comment.  Is there a way to auto-populate the latest comment with the last comment on the Jira ticket.

 

1 answer

1 accepted

0 votes
Answer accepted

Hi Mindy,

Thank you for your question.

I can confirm that to achieve your requirement inside ScriptRunner for Jira Cloud that your script would need to make a call to the Get Comments API to get all the comments from an issue and then to extract the last comment from all the comments returned for that issue and to save this to a variable.

Your script would then need to make a call to the Add Comment API in order to post a comment onto with the issue with the last comment which you have saved inside of the variable.

Alternatively, you could update a multi-line text field on the issue to store the comment value which you have saved in a variable by making a call to the Issue API and I can confirm that we have an example of how to update an issue inside of the documentation page here.

If this response has answered your question can you please mark it as accepted so that other users can see it is correct when searching for similar answers.

Regards,

Kristian

 

 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Statuspage

New feature: Slack notifications for Statuspage

We're excited to announce the release of a long-requested feature on Statuspage. Now visitors to your status page can subscribe to get notified in Slack when you report an incident or maintenance. Th...

81 views 0 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you