Hi Community,
I want to copy Task's latest comment to its Parent, and the scenarios contain:
1) the comment is added to the Task ticket and copy it to the Epic
2) the comment is edited, update its content to the Epic
3) the comment is removed, remove the same comment in the Epic
For the first scenario, I can successfully copy the comment to the Epic. However, if the comment includes an attachment, the attachment will show "Preview unavailable." (see attachment below)
For the 2nd and 3rd scenarios, I'm not sure whether they are possible to make it.
Hi @Amy Chang
With built-in automation features, I believe rules can only detect and copy the add and the delete of a comment, but not the edit case.
For add, you may just add the comment as given by the trigger. For delete, you may use the smart value {{comment.body}} from the trigger to search in the parent's comments to find the comment id, and then delete the comment.
For edit, it appears the changelog is not available for the Comment Edited trigger. And so the prior comment body text cannot be used to search the parent issue's comment and find the one to update.
There may be marketplace apps to help with synching fields like this; please check with your Jira Site Admin to learn what is available.
To do this without additional marketplace apps...
A complicated and brittle workaround for the edit-case might be to include the parent issue's comment id with each child issue's comment, helping to find it later. This approach could be broken if a person removed the data by editing a child issue's comments. If you want to try it, an example rule for copying comments added could be something like this:
key = {{triggerIssue.parent.key}}
{{comment.body}}
Parent Comment id: {{lookupIssues.first.comments.last.id}}
Now the edit and delete rules may be easier, as the parent comment's id may be extracted directly from the child comment using text functions.
Please note well: I have not tried this workaround, so experiment if you want to use it.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.