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

How to validate, using Scriptrunner, if comment was created as primary action

Jaros
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 6, 2022

I would like to create a Scriptrunner listener that will respond to the event "Issue commented", but only if the comment meets the following requirements:

  • comment created by the issue reporter
  • comment is public
  • comment is primary action meaning that no transition was made together with adding this comment

I can validate comment author and comment visibility but have troubles with the third requirement. I can't find any comment property/method to verify if it was added during transition or simply by clicking "Comment an issue" on the Customer portal.

Any help appreciated!
Thanks,

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Peter-Dave Sheehan
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.
May 6, 2022

You can try to investigate the event's changeLog property to see if there was a changeItem where the status was changed.

And then look for other clues in there to see if you can determine if a no-status-change transition took place (that might be harder).

TAGS
AUG Leaders

Atlassian Community Events