Hi,
I am trying to create Jira automation to send an email with a list of issues, including the number of days since the last update. I receive the email correctly, but the diff calculation does not work for all issues in the list. It returns the value correctly only for the first item, which is 100 days in my example. Then the value is copied to other items in the list.
Any idea how to fix this?
The automation looks like this:
Email which I get:
Interesting...as I believe you have discovered one (and possibly two) defects...
First automation defect: date diff() does not appear to work correctly using the smart value order you have tried, even though the documentation shows that should work. If you invert the order it will work as you expect. This symptom could also be related to known problems where many smart values do not work as parameters to functions for list iterators.
{{#lookupIssues}}
{{updated.diff(now).days}}
{{/}}
Does your scheduled trigger have JQL? If it does not, this rule should fail because the condition is testing the {{now.diff(issue.updated).businessDays}} and there is no issue to test. That would be another defect to submit to Atlassian.
If instead your trigger does have JQL, I am unclear of the purpose of your condition. Is there one specific issue the rule uses to test the business days difference, or are you trying to do something else? Please explain the purpose of that condition test.
As you appear to be on a paid Jira license, I recommend working with your site admin to submit both of these as defects here: https://support.atlassian.com/contact/#/
Kind regards,
Bill
Bill, thank you, appreciate your time. I tried to invert the order, and it's working.
Regarding the condition, the purpose was to send a list of issues which are older than x days. The condition was triggering the email, and I haven't been thinking about it yet. Probably, I will change my JQL to include this condition to avoid the if condition in automation. This should do the trick.
Kind regards
Tomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am glad to learn that helped.
If you are unable to add your condition using JQL, it may be possible to also add it using smart value, list filtering: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked also for me, thanks @Bill Sheboy !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.