Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to set automation for the first comment only?

Liam Maeder
Contributor
September 30, 2019

Good day

I am trying to set up automation that updates a custom field, but only on the first comment.

Any help would be much appreciated.

Thanks

2 answers

0 votes
fran garcia gomera
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.
October 1, 2019

scriptrunner provides a JQL function to get issues with a given number of comments

issuefunction in hasComments()

https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_hascomments

With this you can set a condition in automation (in case you are using it)

also it could be possible to access the number of comments via smart values for automation.

something like {{fields.comments.size}} and use it as a condition comparing the value with 0 (not checked, just guessing)

0 votes
Sebastian Krzewiński
Community Champion
October 1, 2019

Hi @Liam Maeder 

 

What do you use to do this? Automation for JIRA add-on perhaps?

 

Regards,

Seba

Liam Maeder
Contributor
October 4, 2019

Hi @Sebastian Krzewiński 

I am trying to use JIRA Automation.

Thanks

Sebastian Krzewiński
Community Champion
October 4, 2019

Hi

 

Did you try {{issue.comments.size}}?

More info you can find here: https://docs.automationforjira.com/reference/smart-values.html#issue-comments

Below example how you can use it:

example.png

 

Regards,

Seba

Suggest an answer

Log in or Sign up to answer