We have an automation that posts a message to Slack when a Sprint starts. It works exactly as we want, however we have one small missing feature for which we're 1) unsure if it's possible at all and 2) if so, how to implement it.
We have an automation that looks like this:
In the "Send Slack Message" we have a `lookupIssues` template, where the url, key, summary and a custom "Refined Story Points" field is used.
After the `lookupIssues` template, we'd like to do two things:
If it's possible, some assistance in how to achieve this would be appreciated! :)
Yes, those things are possible.
I am assuming "Refined Story Points" is a custom field you have added. And so the first thing to do is to identify either the smart value or custom field id for that one. You may use this how-to article to do that: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
The total for that field would be this, substituting in your field's smart value:
{{lookupIssues.yourFieldSmartValue.sum|0}}
I added a default value of zero (0) just in case.
To get the filtered value for those not in the "To-do" status, you may use smart value, list filtering and a math expression, as referenced here: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588 and https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/
And so the filtered value would be this, substituting in your field's smart value and the exact name of the status:
{{#=}}0{{#lookupIssues}}{{#if(not(equals(status.name,"To-Do")))}}+{{yourFieldSmartValue|0}}{{/}}{{/}}{{/}}
How this works, working from the inside outward:
A simpler way to do this would be to use a second call to lookup issues, saving both totals in created variables. But that would make your rule slower to execute.
Kind regards,
Bill
Wow, that's a really extensive answer! Thanks for that. It works like a charm.
Did not expect this to be possible! :D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome; I am glad to learn that helped :^)
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.