Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I need this automation rule to copy and paste all comments made on an issue onto the linked issue

Aston Kirsten Botes February 13, 2024

Currently this rule only takes the very last comment made when the rule is triggered and I need it to take all comments made. Please assist?

 

jira support 2.png

 

 

1 answer

0 votes
Bill Sheboy
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.
February 13, 2024

Hi @Aston Kirsten Botes -- Welcome to the Atlassian Community!

First thing: what problem are you trying to solve by doing this?  That is, why do this?  Knowing that may help the community to offer better suggestions.  Thanks!

Until we know that...

Although it is possible to iterate over all comments in an issue, adding them to another issue one-by-one, they will likely not be added with the same date / time stamps or in the same order.  This is the nature of the parallel processing of automation rules.  Instead they could all be added as a single comment together.

Looking at the rule you show, it is triggered on "all comment" changes.  And so copying all comments each time the rule fires does not seem helpful.

Kind regards,
Bill

Aston Kirsten Botes February 13, 2024

Hi @Bill Sheboy 

The reason for doing this is, is because we have a main board where issues are linked to other boards, so any comments made on the main board should reflect on the issues on the other boards. The issues on the main board are for reporting to top level management so they are not as detailed as the issues on the other boards. 

So is there no way to add a rule to iterate over all of the comments and add them on the linked issue? I know that there is a checkbox to avoid adding duplicate comments in the configuration of the rule.

Kind regards Aston

Bill Sheboy
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.
February 13, 2024

Just to be clear, leaders / managers are adding comments to issues on the "main board" and those comments should be copied to the other boards (presumably for the people implementing the work to see)?

If so, IMHO there are lots of non-Jira-related challenges with that approach.  Regardless...

 

If you truly need the comments replicated, I would copy them as each one is added, referencing only the last comment: {{issue.comments.last.body}}

For the initial synching, the comments can be iterated over for copying, such as a one-time manually (or scheduled) triggered rule, or added as a batch into one single large comment.

Please note well what I stated earlier: there is no way to preserve the order of the copied comments with an automation rule.  If that ordering is needed, you would need to build a custom application (calling the Jira REST API functions) or investigate Atlassian Marketplace addons for purchase.

Suggest an answer

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

Atlassian Community Events