Automation sending email on all instead of limited to jql

esther.turner May 11, 2023

I've created an automation should make updates to the trigger issue and send an email only IF text within the comment meets certain jql criteria but instead...this automation is triggering on every comment made. How can i correct so that the updates & email only execute if the comment contains text "#weekly"? 

The screenshot below is the second iteration of this automation...the first version did not include the branch. I added in attempt to fix the issue described above but didn't work. 

 

jira-automation.png

2 answers

1 accepted

1 vote
Answer accepted
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.
May 11, 2023

Hi @esther.turner 

The pound # symbol is one of the reserved characters for JQL, and according to this defect the documented way to search for such characters does not work: https://jira.atlassian.com/browse/JRACLOUD-75866

A work-around could be to trigger on all comment changes, and then try either an advanced compare condition or a regular expression to find the symbol in the latest comment.  For example, 

Capture.PNG

Kind regards,
Bill

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2023

Yes, this!

I was just about to add to my own answer that I used an Advanced Compare rather than a Condition with JQL.

esther.turner May 15, 2023

Works like a charm! Thank you! 

Like Bill Sheboy likes this
0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2023

Hello @esther.turner 

You cannot refine the trigger itself for Issue Commented so that the rule is triggered for only comments that contain certain text. The rule itself will be triggered for every comment added.

The best you can do is then add steps to limit the scope of the remaining activities.

The rule is triggered by a comment being added to an issue. The steps after the trigger are automatically applied to the issue that triggered the rule. You don't need the "For Current Issue" step at all. 

If you remove that and try the rule again and it still isn't working as you expected, can you provide more details about what "not working" means? Also share with us the Audit Log information for the execution of the rule.

esther.turner May 11, 2023

thanks for the feedback! here's another version of the automation with slightly different structure but it creates the same result which is that an email is sent out every time a comment is added instead of every time a comment is added that contains "#weekly" 

What i mean by 'not working' is as described above. I'm looking for a solution that will send an email only when a comment contains #weekly....is there another way to achieve this?jira-2.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2023

See @Bill Sheboy answer. :)

Suggest an answer

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

Atlassian Community Events