How do I bulk update all comments on a given ticket? Possibly using smart values?

Catherine Jarosz May 31, 2022

I need to grant access to old core tickets, and need the comments on those tickets not to be visible to the new users.

I have set up issue security, and know that comments can be individually updated to a specific visibility using that, but with sometimes over 100 comments per ticket that's not viable. 

I've tried the "Edit comment" automation action, which states that you can update a comment's visibility while preserving its content if you leave the text box blank, however the only options for doing this are to edit the first, last, or trigger comment, so that will only edit 1 at a time.

The final option is to edit the comment based on smart value, which I have tried but this results in either an error saving the rule or an error in the audit log saying "Error editing comment - smart-value did not resolve into a number." - this error was shown when using the smart value {{#issue.comments}}{{/}}

Is there a way of selecting all available comments on an issue, or is there another way to update all comments' security?

1 answer

1 accepted

1 vote
Answer accepted
Mark Chaimungkalanont
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 6, 2022

hhmm interesting question... It's a bit tricky but you can use an

  1. "Advanced branching" branch with {{issue.comments}} with a variable name thisComment
  2. Edit comment action, pick smart value and {{thisComment.id}} this will let you edit all of the comments of an issue

Screen Shot 2022-06-06 at 9.15.34 pm.png

I had a quick play and this seems to work! Good luck!

Catherine Jarosz June 9, 2022

Thank you for this! I'm getting a separate error when running the automation, which I have run past Atlassian support directly. Once that is resolved I will try this approach and let you know.

Catherine Jarosz June 10, 2022

Hi Mark,

 

With that error fixed this has worked perfectly, thank you.

Tiago Almeida March 2, 2023

Hi Mark,

Great solution for this. Was looking for something like this and your solution fulfilled my requirement as well.

And thanks Catherine for the original question.

Thanks!

Suggest an answer

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

Atlassian Community Events