Forums

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

Run an automation for a username search - mention in last comment

Leslie Fluri
May 22, 2023

Hi!

I am working on creating an automation that will create a comment when a user is mentioned.  So far the automation is running, but it is checking EVERY COMMENT in the issue for the username. I only want it to check the most recent comment for my variable.

What is the JQL I could use to run my rule and only return my action when the username is commented in the MOST RECENT comment only. 

2 answers

1 accepted

0 votes
Answer accepted
Andy Heinzer
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.
June 28, 2018

Please check out this related thread: https://community.atlassian.com/t5/Jira-questions/How-can-I-search-issues-to-which-a-user-has-commented/qaq-p/91873

Other users have requested this before, and you can see from the different replies there that a few have found some alternative solutions.  I hope this helps.

Jason Corbett
July 2, 2018

Thanks Andrew, found the answer in that thread.

0 votes
Tansu Akdeniz
Community Champion
June 28, 2018

Hi @Jason Corbett,

If you have Script Runner add-on, there are JQL functions to do it:

issueFunction in commented("role Developers")
issueFunction in commented("group abc")
...

 Here the link ; https://jamieechlin.atlassian.net/wiki/spaces/GRV/pages/1212427/Scripted+JQL+Functions+With+Comments

Tansu

Jason Corbett
June 28, 2018

Thanks Tansu,

Unfortunately we don't have script runner on the system.

Is there another alternative?

Thanks,

Jason

Suggest an answer

Log in or Sign up to answer