Forums

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

Use {{issue.comment.last.body}} as condition in automation

KMEROVIL
January 15, 2026

Hello Guys, 

I created Jira Automation Rules with two conditions : project = A and last.comment.last.body does not equals "Thank you". 

Please find below the rules : 

trigger : Every morning

If block // Conditions : Project = A and status = "waiting for customer" and  StatusCategoryChangedDate <= -7d and updatedDate <= -7d

AND

{{issue.comment.last.body}} does not equal "Thank you"

Action : add comment to work item "Thank you"

Unfortunately, even if the last comment equals the value "Thank you" the automation adds the comment on the work item. So i have the same comment twice. 

Could you please help me find out how to make sure if the last comment is the same, so do not add comment ?

5 answers

1 accepted

0 votes
Answer accepted
Marc -Devoteam-
Community Champion
January 15, 2026

Hi @KMEROVIL 

As @Bill Sheboy mentions, might be a formatting issue.

In this case I suggest when a comment with thany you is set, have a label or component or even a custom field set with a value, then you can compare to this specific value instead ot a text value.

Text is always tricky as a fixed comparison.

2 votes
Kai Becker
Community Champion
January 15, 2026

Hi @KMEROVIL 

I think there might be an issue with the parsing of the body content.

{{issue.comments.last.body.toLowerCase()}}

instead and switch to contains in your condition and put the "thank you" to lower case aswell?

0 votes
KMEROVIL
January 19, 2026

Thanks guys for your answers. 

I added labels and it's better. 

 

0 votes
Bartek Szajkowski
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 16, 2026

Hello @KMEROVIL 

Maybe you could try with containing specific text ex:

issue in commented("project = SER", "John", "", "", "approved")

Maybe ARGON app can help in this case     https://marketplace.atlassian.com/apps/2170466783/argon-powerful-jql-search-for-jira?hosting=cloud&tab=overview

 

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 Champions.
January 16, 2026

Hi @Bartek Szajkowski 

As a reminder...when recommending a marketplace vendor product, please ensure you disclose your affiliation to that vendor in your post wording, and not just in your profile name / badge. For more information, please see:

Atlassian Partners - Rules of Engagement

https://community.atlassian.com/t5/App-Central-articles/Atlassian-Partners-Rules-of-Engagement/ba-p/2899328

 

Kind regards,
Bill

Like Marc -Devoteam- likes this
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 Champions.
January 15, 2026

Hi @KMEROVIL 

For a question like this, context is important for the community to help.  Please post the following:

  • what problem are you trying to solve with this rule; that is, "why do this?"
  • an image of your complete automation rule in a single image for continuity
  • images of any relevant actions / conditions / branches
  • an image of the audit log details showing the rule execution

Until we see those...

Without seeing an example comment, I wonder if your last comment contains more text than "Thank you", or if the formatting or casing are different.  Those could cause a mismatch.

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer