Forums

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

Lookupissues not working as expected

Sagi Gueta
Contributor
January 31, 2023

Hey,

 

I've created automation whose purpose is to apply each time a new worker finishes (status = done) their first 5 tasks (story/bug/task). The goal is to automatically send an email to certain users when the automation is triggered.

 

However, it's not working as expected as the automation requestor gets spam emails even if a user has much more than 5 issues that are done.

 

Any idea how to solve that problem?

 

image.png

to email certain users when it's happening automatically

1 answer

1 accepted

1 vote
Answer accepted
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.
January 31, 2023

Hello @Sagi Gueta 

Can you add a Log action to the rule to log the value {{lookupIssues.size}} to the rule Audit Log?

Can you show us the Audit Log for an execution of this rule?

Sagi Gueta
Contributor
February 1, 2023

It seems that there is a success although the issue not meet the condition :(

 

image.png

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.
February 1, 2023

Hi @Sagi Gueta 

Adding to Trudy's questions/ideas...

This is configured as a multi-project/global scope rule, and so I wonder about consistency of the issue types and status values across the projects.  Regardless of that...

Please show the audit log details for a case where you believe an email was sent when the number of completed items did not equal 5.  And for that case, please use your lookup issue JQL with advanced search to compare to the results you believe the lookup received.

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.
February 1, 2023

@Sagi Gueta 

Can you add a Log action to the rule to log the value {{lookupIssues.size}} to the rule Audit Log?

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Log-action

Sagi Gueta
Contributor
February 7, 2023

I've added the log action at the bottom of the automation and the jira audit log wasn't affected :/

 

image.pngimage.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.
February 7, 2023

The Log action prints data into the Rule's Audit Log, not the system Audit Log.

Sagi Gueta
Contributor
February 8, 2023

OK :)

 

So basically I'm not sure if I configured it correctly as well, and still not sure how to fix that issue.. 

image.pngimage.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.
February 9, 2023

You need to put the Log action before the IF/Compare action.

In this last execution you provided the IF/Compare condition has not been met. Lookup Issues found more than 5 issues that matched the JQL in your Lookup Issue action. Since the Compare failed, none of the remaining steps in the rule were executed.

Screen Shot 2023-02-09 at 9.58.13 AM.png

Alessandro Domanico March 27, 2024

Hi @Trudy Claspill

I'm also trying to debug my rule byt I get no output when logging {{lookupIssues.size}}.

In particular, I'm not able to insert in the email body a list of the fixed issue in a release.

What am I doing wrong? Thanks!

 

Screenshot 2024-03-27 104619.pngScreenshot 2024-03-27 104715.pngScreenshot 2024-03-27 104815.png

 

Alessandro Domanico March 27, 2024

[SOLVED]

Sorry, just found out I was missing a "Lookup issue" action, needed to feed the variable {{lookupIssues}}.

Also, I need to use directly fields in the email body:

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

 

Like # people like this

Suggest an answer

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

Atlassian Community Events