I want to delete the comments in Jira ticket

Asmath Basha S
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.
March 11, 2024

I need to delete the comments in Jira tickets using Automation or some other ways. But I have certain condition :

=> When the ticket status is reached "Closed" then all the comments whichever was present in the ticket need to be deleted.

=> Is there any way to do that?

1 answer

1 accepted

3 votes
Answer accepted
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 11, 2024

Hi @Asmath Basha S,

That is technically possible. But why on earth would you want to do something like that? If you are on a free plan, you have a limited set of automation rules you can run on a monthly basis. When issues are done, they will be hidden from your boards after 2 weeks or so, so you are unlikely to ever look at them again. And when you would want to look at them again, removing all comments removes the entire (communication) history of the issue, leaving you with virtually no context at all.

If you really insist on doing this, the following automation should work: when your issue transitions to done, pull a list of all comment id's on the issue and then delete the comments on it by iterating through that list:

Screenshot 2024-03-12 at 07.17.50.pngBut again, I can't think of any reason to do this ...

Hope this helps! 

Asmath Basha S
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.
March 12, 2024

Hi @Walter Buggenhout ,

In the Remove comment from issue => comment id => what I need to enter in the comment id box ?

Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 12, 2024

Literally what is in the screenshot, @Asmath Basha S . The name of the variable, between double braces: {{commentId}} in my example, whatever name you give the variable in the step before.

Asmath Basha S
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.
March 12, 2024

Thanks @Walter Buggenhout  Got it.

Asmath Basha S
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.
March 12, 2024

Hi @Walter Buggenhout ,

In Jira data center, Advanced branching is not present in Automation.  For that what we need to add in Jira data center Automation version to delete all the comments.

Asmath Basha S
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.
March 12, 2024

Hi @Walter Buggenhout ,

Can you explain the Automation steps to achieve this in Jira Data center version Automation.

Michael Dimitriadis July 4, 2024

Thanks @Walter Buggenhout  this is exactly what I'm looking for.

 

I'm running this as a scheduled automation to clear our all the comments on a project however the automation keeps running into an automation limit

Screenshot 2024-07-04 163434.jpg

 

I'm wondering if there is a way to update the script so it runs several times, just picks up from where it last failed until all issues have been reviewed and comments deleted. 


Any suggestions?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events