impossible to create an automation scheduled rule without activating JQL search

Melanie Liguet March 5, 2024

Hi, 

 

I use the lookup function to send a summary email to my colleagues with a list of their problems.

It works but my email is sent several times. I think it's because of the jql filter in the trigger which executes the rule for each ticket found

If I uncheck "Run a JQL search and execute actions for each issue in the query." , I cannot save my automation rule. I get a message "The rule has been configured with components that require issues to be provided by the trigger. You need to use the option to run JQL to provide issues. The following components require issues: Comment on issue"

Is it possible to run a scheduled automation without a JQL filter?
Is there a setting to modify somewhere?

 

Regards,

automation.PNG

2 answers

1 accepted

0 votes
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 5, 2024

Hi @Melanie Liguet 

If your goal is to only send an email with a list of issues, I would first look into creating a filter subscription as that would be the simplest approach.

If you still want to go the route of automation, you can execute without JQL, but you'll need to use the Lookup Issues action to get the list of issues.

From there, you would update the body of your email to something like this:

{{#lookupIssues}}
{{key}} - {{summary}}
{{/}}

This will ensure that only one email is sent. 

Note - If your goal is to have individualized summary emails sent to each recipient, there will be a little more complexity added to the rule.  If that's your end goal, you could perform advanced branching. Here's a thread that speaks to that:

https://community.atlassian.com/t5/Jira-Software-questions/How-to-create-Automation-email-only-showing-Assignee-issues/qaq-p/2274061

 

Melanie Liguet March 5, 2024

Thank you for this quick response

I actually did automation with Lookups Issues action and branch

 

but my problem is being able to uncheck the JQL filter in my trigger. This is what I cannot do.

automation.PNG

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 5, 2024

So the challenge here is that you're branching on a variable rather than specific issues and the problem is with the comment which doesn't have a point of reference against that advanced branch.  You'll need to consider a separate JQL-based branch for the comment.

Melanie Liguet March 5, 2024

I agree, the comment is poorly positioned

but that is not the subject of my request.
as it currently stands, the rule sends me several identical emails. I would like to have a single email per assignee.
I suppose it's because of the JQL search in the trigger but it's impossible for me to uncheck it

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 5, 2024

Can you please share a screenshot of your send email rule? Also - I think you need to use the variable {{mailTo}} as your Send Email recipient instead of assignee.

Melanie Liguet March 5, 2024

mail.PNG

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 5, 2024

Thank you - So there are two issues:

  1. Your advanced branch should be this:
    1. {{lookupIssues.assignee.distinct}}
  2. Your To field needs to be this:
    1. {{mailTo.emailAddress}}
  3. You should not need the second Lookup Issues action within the branch

 

Like Melanie Liguet likes this
Melanie Liguet March 6, 2024

Thank you for your help.
I succeeded by correcting some errors in my automation thanks to your suggestions

I also found similar automation here:

https://confluence.atlassian.com/automationkb/automation-rule-to-send-single-email-for-all-issues-per-assignee-due-next-week-1130727622.html

regards,

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.
March 5, 2024

Hi @Melanie Liguet 

That error is indicating there are rule components trying to use a current issue, but one is not in scope.  And so the error is trying to "help" by suggesting adding JQL to the trigger, which is wrong for your scenario.

Please look for anything in your rule using {{issue.some field}} where some field is an issue field.  That usage should probably refer to the lookup issues you referenced.

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events