Hello People,
I'm trying to setup an automation in Jira, to delete comments from a specific user when the issue is transitioned from 'In Progress' to 'Done'.
So far I managed to get list of all such comment IDs in a Json Array. However, I'm unable run automation iteratively over all this Json array to feed one comment Id to the action 'Delete Comment'.
Has anyone tried this before?
I've attached screenshot of the automation rule that I've setup.
Hope experts here can help me out.
WHY I need this automation?
In our project, we have multiple administrative comments by our project manager and due to that actual communication between developers is lost in the comments. Therefore, I would like to delete all the comments done by our project manager once the issue is transitioned to 'Done'
While I'm not sure I philosophically agree with deleting comments, I think you need to use an advanced branch to iterate over the comments.
You also probably don't need to store the comments in a variable, just pass {{issue.comments}} to the branch:
Thanks for a quick response @David Foote I'm agree with the logic.
However here I have two problems:
Any idea how I can get advanced branching option?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Suraj Gurav Don't know why I can't reply directly to your post below,
1. The advanced branch is essentially a loop; when creating the advanced branch you get to define a smart value that you can use in all of the actions of the branch to represent the current item in the list that it is working on (in my example, {{singleComment}} is what I chose for this). So if you have 3 comments; the actions in the branch will execute 3 times and each time through the loop {{singleComment}} will represent a different comment.
2. You may have to click on the Branch rule icon to get the additional options.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @David Foote explaining advanced branching in details. It is really helpful.
However, I'm still unable to see 'Advanced Branching' even if I click on 'Branch Rule' component. May be something on the company level, I've already reached out to our company's Jira support team.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suraj,
like David below I'm not a fan of deleting data once entered, however if I wanted to keep track of PM comments separate to the development team then I'd recommend looking at a separate/custom text field that only the PM uses.
That keeps developer/PM comments and discussions in different places, so no overlap.
Cheers,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matthew,
Thanks.
That's an interesting idea, which can probably solve my issue.
I'll check on that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Recommended Learning For You
Level up your skills with Atlassian learning
Learning Path
Jira Administrator
Configure Jira Software, Jira Core, or Jira Service Management, including global settings, permissions, and schemes.
Managing Jira Projects Cloud
Learn to create and configure company-managed projects in Jira Software and partner effectively with Jira Admins.
Learning Path
Become an effective Jira Software Project Admin
This learning path is designed for team leaders who configure Jira Software projects to match a team's processes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.