Forums

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

How to capture comment edited event in JIRA Cloud automation?

Kent Chiu
Contributor
July 21, 2025

Hi,

Is there a way in Jira Automation to capture the "Comment Edited" event? I have created an automation to handle the "Comment Added" event. However, I want to capture a comment-edited scenario and send a notification with "--EDITED COMMENTS--" in the header. The goal is to create two Jira automations: one for when a comment is added and another for when a comment is edited, each with slightly different messaging.

Thank you for your response.

Regards,

Kent

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.
July 21, 2025

Hi @Kent Chiu 

What problem are you trying to solve?  That is, "why do this?"  Knowing that may help the community to offer better suggestions.

Until we know that...

There is built-in notification where people can watch work items for updates of various types. 

And if you are encountering situations where the built-in rule trigger for comment edited is not working as expected, I recommend investigating that to learn why it is not triggering.  I do not see any open defects in the public backlog for that symptom with automation rules.

Kind regards,
Bill

Kent Chiu
Contributor
July 21, 2025

Hi @Bill Sheboy ,

Thank you for responding to my inquiry. When I refer to "Automation," I am referring to JIRA Cloud Automation, not the JIRA API call for automation.

I have written a JIRA Automation rule to track comments in JIRA, detect a specific keyword in the comment, and post the comment to Slack. So far, all new comments are working correctly. However, if I edit an existing comment, the automation fails to detect the change.

I don’t see a trigger to capture edited comments.

Thanks,

Kent

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.
July 22, 2025

As noted, there is a trigger to detect editing a comment.  Are you observing that does not start the rule?

How are you changing the comments: a person edits it, a rule edits it, etc.?

 

Please post an image of your complete rule, in a single image for continuity, and an image of the audit log details showing the rule execution.  Those may provide context to help explain what you are observing.

0 votes
Vitalii Rybka
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.
July 21, 2025

Hi @Kent Chiu,

Unfortunately, Jira Cloud automation doesn't have a dedicated "Comment edited" trigger. The available comment-related triggers are:

  • Issue commented
  • Comment created
  • Comment updated (but this is inconsistent and not reliable)

Workaround options:

Option 1: Single rule with smart values Instead of separate rules, use one "Issue commented" trigger and detect edits using:

{{#if comment.updated}}
--EDITED COMMENT--
{{else}}
--NEW COMMENT--
{{/if}}

Option 2: Advanced fields approach

  • Use a custom field to track comment timestamps
  • Compare {{comment.created}} vs {{comment.updated}}
  • If they differ, it's an edit

Option 3: Scriptrunner (if available) If you have Scriptrunner, you can create more sophisticated comment event handlers.

Limitation note: Jira's comment editing detection has been a long-standing community request. The platform treats edits as updates rather than distinct events, making differentiation challenging.

Alternative approach: Consider whether you actually need separate automations. Users might prefer a single notification that clearly indicates if it's new/edited rather than multiple notifications for the same comment thread.

Have you tested if the "Comment updated" trigger works consistently in your instance? Results can vary.

If you need help setting up the smart value approach, feel free to DM me!

Best,

Kent Chiu
Contributor
July 22, 2025

Hi @Vitalii Rybka ,

Thank you for your response. I tried implementing your suggestion, but I'm encountering an issue with capturing edited comments using the smart value {{issue.comment.updated}}. I used a condition to check if {{issue.comment.updated}} equals 1, but it doesn't seem to work. For some reason, editing an existing comment doesn't trigger the automation. I want to implement this using the smart value approach.

The automation works for the comment added, but it does not work at all for the comment edited.

Could you kindly provide further assistance? I appreciate your help.

Here is the JIRA automation:

 comment edited Jira automation.png

Thank you,

--Kent

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events