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?
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.