Avoid Duplicate comments whicle using groovy scripts.

sai siva October 18, 2021

Hi  

i hava  script that comments an open ticket after its opened for 3 hours.

this works fine but ( on saturday and sunday the time counter stops)
So multiple comments are being added to the tickets , 

Any suggestions i can implement in the script that checks for the specific  comment if it already exists and no comment is added.

If the specific comments does not exist Comment is added to the ticket.

1 answer

0 votes
Radek Dostál
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 19, 2021

I will take a leap that you're using CommentManager to create comments. You can also use it to get comments, or specifically the last one https://docs.atlassian.com/software/jira/docs/api/8.13.6/com/atlassian/jira/issue/comments/CommentManager.html#getLastComment-com.atlassian.jira.issue.Issue-

Suggest an answer

Log in or Sign up to answer