Forums

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

Smart Value - Look up Issues "and"

Melissa C
Contributor
September 16, 2024

Hello, 

I need a list of Issues that were updated in the last 90days and the Sprint is empty.

I know I'm close! But I'm not sure how to combine two, The smart values below 

give me all issues updated in the last 90days.

{{#Issues}} {{#if(not(sprint.isEmpty))}}{{#if(now.diff(updated).days.gt(-90))}}

 

 

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.
September 17, 2024

Hi @Melissa C 

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!

Until we see those...

Why not just use JQL for those conditions to return what is needed?

If you still need to filter the existing batch result of {{issues}} you may use the conditional and() function around both conditions.  The "trick" to test empty (versus null) values in rules can be challenging, and often requires experimentation. 

This expression should work for your scenario:

{{#issues}}
{{#if(and(not(exists(sprint)),now.diff(updated).days.gt(-90)))}}
* {{key}} - {{summary}}
{{/}}
{{/}}

 

Kind regards,
Bill

Melissa C
Contributor
September 17, 2024

@Bill Sheboy  Thank you!!!

I will def post an image next time I ask a question.

A little background on this (maybe a little too late) - I have a weekly email in an automation rule. The email consists of two tables.  I use one JQL query and in the email body I use look up to include two tables. 
Table 1 - list of Jiras where a Sprint is assigned 
Table 2 - list of Jiras which have been updated in the last 90 days and do not have a sprint assigned. 

 

Like Bill Sheboy likes this
0 votes
Dimitris Sylligardakis
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.
September 16, 2024

Hi Melissa,

What you included is filtering for issues that are not in an empty sprint. 

Try this and let me know if it works:

{{#Issues}} {{#if(sprint.isEmpty)}}{{#if(now.diff(updated).days.gt(-90))}} * {{key}} - {{summary}} {{/if}}{{/if}} {{/Issues}}

Melissa C
Contributor
September 17, 2024

@Dimitris Sylligardakis  

So Close!!! 

This was giving (smart value you suggested) an Error.

"Closing tag (if) does not match opening tag (if(now.diff(updated).days.gt(-90))):"

I changed the closing tag to {{/}}{{/}} , that was successful, but that query was empty.

Melissa C
Contributor
September 17, 2024

@Dimitris Sylligardakis 

additionally I tried just {{#if(not(sprint.isEmpty))}}, and it did not give me the correct list,  I was expecting all Jira's where "Sprint" is empty

 

Suggest an answer

Log in or Sign up to answer