I want to search in sprint field and find the active sprint information.
I've found suggestions here https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/#Combined-function-examples , but I don't understand how the proposed solutions could be used. So I'm looking for info to read up on how the # (hash) syntax really is working. Pointers please.
What I would like to do is something similar to this, but obviously, I'm not using this right since I get syntax error
I don't really get your request.
to find active sprints, you van use JQL sprint in OpenSprints()
The # can be used to combine functions over a list of found issue/values like when using a lookup function.
I haven't ever seen this used in creating a variable as a variable is create to be used in other automation actions or conditions
Sorry for being unclear.
I'm looking for a way to extact a name of of a sprint from an issue.
If an issue has been on the board during more than one sprint, the Sprint field will contain a list, several entries. And the order of those list entries is not defined/known, so it's not certain that first or last will give me the active sprint name.
I've read that there is a way to search for which sprint is considered active instead, and I found some examples on community pages where such filtering was done.
But I don't understand how to perform that kind of operation, since I don't understand the # syntax.
Once I get the active sprint name out, I can proceed with my automation rule where I will use this text.
A simple way to illustrate how I would like to use it was my example, where I want to assign the (single) name of the active sprint to a smart value variable.
Is there a way to rewrite my rule so that it can - from a list of sprint names residing in the Sprint field on the trigger issue - find the active sprint and assign that name to a smart value?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So you first need to lookup issues to find the sprint name
Try the following:
expression with your lookup issues action:
{{#lookupIssues.first.sprint}}{{#if(equals(state,"active"))}}{{name}}{{/}}{{/}}
How this works:
So to summarise:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nice. I defined this rule
and the output was the active sprint name. Great !
I used a manual trigger on a ticket on the active board, and as far as I understand it, the lookupIssues.first will return the first ticket (however 'first' is defined here) in the set of tickets that are on the board.
Then the sprint object (list) is extracted.
And lastly, the list of names are searched through to find the active sprint name. Correct?
Now, in order to understand more, I still want to learn what this #-notation really means, so I can understand how it should be used.
Do you know where I can read up on that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The # symbol is used to apply the rule to each individual component found in a lookup for example.
No first indicates in the lookup the first found active sprint and prints the name of that sprint
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The search example was taken from this post: https://community.atlassian.com/t5/Jira-questions/Automating-Fix-Versions-from-Sprint-names/qaq-p/2630388 by @Bill Sheboy , and it should accomplish pretty much what I need.
If I only understood how it could be applied in my context.
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.