Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Getting a filtered subset of a lookupIssues smartvalue or multiple lookupIssues's

Good day all, 

 

What I'm doing:

Getting JQL results that get's stored as a lookupIssues smartvalue.

I reference the lookupIssues in a HTML Mail Template. 

I get a count of the items in the lookupIssues variable by going {{lookupIssues.size}} to use in the mail to indicate x amount of issues present.

What I would like to do

Filter the lookupIssues based on status of issues in the object. So that I can return two different counts based on the filter. 

Something like {{lookupIssues.size}}{{where status = 'Pending Customer Approval'}}

 

2 answers

1 accepted

1 vote
Answer accepted

Hi @Jonathan Aspeling 

How about this approach:

  1. Lookup Issues on one of the counts you need with JQL
  2. Save the count {{lookupIssues.size|0}} in a Created Variable
  3. Repeat steps 1-2 for as many counts as you need
  4. Create your email, referencing the created variables

If you need the specific details for each lookup in the email, now it gets fancier:

  • Once you have a lookup, iterate over the values to build the HTML for the email using text functions, and storing the result in a Created Variable
  • Repeat...
  • Build your email, using the pre-built HTML snippets

Best regards,

Bill

Excellent thanks @Bill Sheboy <3

I'll post back my final solution, How I interpreted and applied the first bit!

chrome_7bvcDRWleg.pngchrome_GgCaRzzOvH.png

Checking is the Highlighted bit read "Or Zero" kind of like a Coalesce. So if the size method returns null it makes it zero?

chrome_jrBcGccAJK.png

Yes, that is correct.  The pipe symbol defines a default value when the operations leads to null.  Seems like a good defense for counting operations.

Cheers - thank for the input :D Really helped get me unstuck and let me create what I'm hoping will be the start of a beautiful thing for our Org and my Dept. 

I wrote the following in reflection after I managed to complete what I set out to do - if you're keen to have a quick look feel free. All ready noticed a few write up mistakes but not super serious and the just of the project is there ++ Credit to you haha
LinkedIn - Report - Jira Automated Dynamic Follow Up Emails 

Like # people like this
0 votes
John Funk Community Leader Apr 09, 2021

Hi Jonathan, 

I don't believe you are going to be able to get two different sets of values in the same email like that.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Staying organized with Jira: best practices for a better project management

Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...

221 views 2 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you