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'}}
How about this approach:
If you need the specific details for each lookup in the email, now it gets fancier:
Best regards,
Bill
Excellent thanks @Bill Sheboy <3
I'll post back my final solution, How I interpreted and applied the first bit!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Checking is the Highlighted bit read "Or Zero" kind of like a Coalesce. So if the size method returns null it makes it zero?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Bill Sheboy I'm working on something very similar to this, but I'm curious if it's not possible to store the entire list of issues to a variable (without the ".size") and then filter them later on in the rule.
Example:
I do a {{lookupIssues}} and add that result to a custom variable called {{xAll}}.
If I ask for {{xAll}} in a Log Action, it returns the full list of issues from the lookup, but if I ask for {{xAll.size}} it returns null.
I'm making the assumption that custom variables store a string, but don't know how to convert that back to a list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Brock Jolet
I recall reading another post about the Atlassian team working on preserving typing in created variables, rather than cast to string.
Until then, you probably need to either:
In either case, this may take some experimentation as the lookup issues result is either null or a list of 1-to-many issues. Try setting the created variable and then logging the results. And, lookup now contains all fields so option #2 may work better for performance.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.