Forums

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

[edit comment copy] How to create a automation for updating edit comments on jira.

Rajesh Konda
Contributor
February 13, 2024

Hi Team,

Can anyone help me with jira automation, please?

We are copying comments from one project to another based on issue linking. This is working fine, but now the user wants to update the edit comment on the linked ticket too. Tried creating new automation by selecting the edit comment and selected the required events and, on the last event, chose the edit comment and with in it selected the trigger comment from drop down and used the current comment with in the comment body using smart valued.

This is not working, getting an error as No comment with given ID found for the issue
 I'm I missing something in automation, please help.

editcomment.pngeditcomment1.png

2 answers

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 14, 2024

Hi @Rajesh Konda 

Short answer: this may not be possible with an automation rule.  To learn why, please continue reading...

 

Longer answer:

Your solution approach is apparently copying comments from one issue to its linked issues.  Assuming the creation of new comments is working, the challenge is updating the comments in the linked issues when they change in the trigger issue.

To do that, the correct comment in the linked issue must be found to support the edit.  That requires using the action's option:

  • comment to edit: smart value
  • comment smart value: here is the difficult part!

The rule would need to assume:

  1. all comments from the trigger issue were successfully added to the linked issue
  2. no one has manually edited the comment in the linked issue
  3. no one has manually deleted the comment in the linked issue

If those assumptions are valid, the changelog from the trigger issue's comment change would need to be used to find the comment id in the linked issue, and then used in the "comment smart value" field.

But that find is likely not possible: the changelog appears to be unavailable for comment changes, and even if it was available, it may not be possible to find the id in the linked issue's comments.  Smart value list filtering will not work, due to scoping limitations of iterators.  Theoretically, one could expand all comment data into a created variable and use the match() function and text functions to extract the id.  I hypothesize that would run into some rule limits for processing / searching on a very large, variable text string.

Kind regards,
Bill

0 votes
GNarsimhagowda - Empyra
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 @Rajesh Konda ,

 

Please refer to the ticket : https://community.atlassian.com/t5/Jira-Service-Management/Automation-for-copying-comments/qaq-p/2407035  ,

 

Hope this solves your problem

 

Thanks.

Rajesh Konda
Contributor
February 13, 2024

Hi @GNarsimhagowda - Empyra  Thanks for the response, currently my automation is running for copying comment between the projects. The one which i mentioned was about edited comments. When a user edited his comment it should update on other linked ticket, this is not happening after adding the edit comment event.

Like Marc - Devoteam likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events