Forums

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

Using JQL to search the last comment on an issue and trigger a result.

Liam January 25, 2023

I am trying to have a notification be sent via slack if a specific user is mentioned in the most recent comment on a Jira Issue. 

I feel like this is doable via JQL, but for some reason I can't seem to get the syntax right:

 

  • {{issue.comments.last.body}} ~ accountID

 

(The accountID variable is just the account ID of the specific user in jira)

 

I've confirmed that {{issue.comments.last.body}} is a valid smart value that does in fact pull the last comment that was placed on an issue, but for some reason I can't get criteria to be met so that a message is only sent when the accountID appears in the last comment.

 

Any assistance would be greatly appreciated, also if any clarification is needed please let me know.

2 answers

1 accepted

1 vote
Answer accepted
Vamsi Kandala
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.
January 25, 2023
Liam January 26, 2023

Thank you for this! i was able to get a work around setup where the Last Comment was updated in a new field and then filtered off that field

0 votes
Vamsi Kandala
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.
January 25, 2023

Hi @Liam

If I am not wrong, you can't be using '{{issue.comments.last.body}}' within the JQL query.  Besides, currently the JQL query only supports 'comment ~ accountID' and does not yet support @mentions in the comments.

Please refer to this ticket: https://jira.atlassian.com/browse/JRACLOUD-27594

Thanks,
Vamsi

Suggest an answer

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

Atlassian Community Events