I'm looking to extract information from the Sprint field on issues, getting the active sprint out of potentially several noted on an issue.
I've seen several posts and pages on the topic, for example: https://community.atlassian.com/t5/Jira-questions/Automating-Fix-Versions-from-Sprint-names/qaq-p/2630388
However, I don't understand the # syntax, so I don't know how I can use statements like the one below in my automation rules. Where is this explained?
{{#issue.sprint}}{{#if(equals(state,"active"))}}{{name.substringBefore(" Sprint").trim()}}{{/}}{{/}}
A simple use case example
The pound sign # is a token to indicate the start of some section, as with an iterator or condition in your example.
You may seem more examples of iterators here: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/#Combined-function-examples
That example also uses smart value, list filtering: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588
With smart value, conditional logic: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/
For the specific example you show:
{{#issue.sprint}}{{#if(equals(state,"active"))}}{{name.substringBefore(" Sprint").trim()}}{{/}}{{/}}
What that is doing is:
Kind regards,
Bill
Good explanation @Bill Sheboy, thanks.
Is such a statement possible to assign to a smartvalue variable, like I was trying to do?
For sure I will look into the provided links too, later today.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes; that expression will provide a text value which can be assigned to a variable.
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.