Hi.
I have built an automation to set or clear a custom field (SAFe Team) depending on the Sprint field. Two teams are working towards a common backlog, and issues assigned to a sprint are either assigned to this first team's sprint or the other team's.
Every time the Sprint field changes, I want to make sure that the SAFe Team field matches the team that owns the sprint or clear the field if the Sprint field is cleared.
My current automation reports some errors from time to time that I do not fully understand. I hope someone here in the community can help.
This is the current automation;
This is an example of how the errors look like;
The IF block looks like this with the JQL part shown;
The format of the sprint names is "NPS <team-name>_<period-tag>". Examples are shown below;
The JQL validates in the automation editor and also works in filters, but I interpret the error message as if the automation detects some kind of problem with this JQL. The group user has the User role assigned in this Jira project.
What am I missing here?
Hi @Mats Rahm
I see one problem with your rule and several possible improvements...
The problem is your condition with JQL on sprint IN ("NPS Mavericks"). This type of JQL will perform an exact match on the sprint name, but your sprint names apparently have other characters in the names, such as the program increment information. You may want to modify that condition to perform a text comparison instead, checking the {{issue.sprint.name}} value.
Please note: that will work if the issues are in one-and-only-one sprint. When an issue is in multiple sprints, such as with carry-over, the condition will need to account for that.
For possible rule improvements:
Kind regards,
Bill
Thanks Bill.
Is the exact match behavior that you are describing special for automation because that is not how it behaves in ordinary JQL queries.
If I write a query sprint IN ("NPS Mavericks"), it will result in matches for all sprints starting with "NPS Mavericks". I was quite surprised by this behavior when I discovered it some years ago. If I click the Validate link when entering this JQL condition in the automation, it shows 280 issues found, so it looks like it works the same way in the automation as for ordinary JQL queries.
I will look at your lookup table suggestion. I am a bit worried, though, from the description that it will result in continuous updates of the table every time new sprints are created. If possible, I would like a solution that will continue to work without updates when new sprints are created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Interesting: I was not aware the sprint field with the JQL IN operator did a fuzzy match. Thanks!
Regarding the lookup table maintenance, if the structure of your sprint names is predictable, the table content should only need to change when you add a new team (or change the format of sprint names). For example, your table row keys would be: NPS Mavericks, NPS Ranges, etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mats Rahm
I would add a create variable action after the condition if project equals NE
set the sprint name of the issue as the variable and use this variable in the IF condition to compare the variable with the Sprint name in the issue.
There could also be a solution to use a lookup action, but this can cause problems as the lookup can only handle a 100 issues
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mats Rahm , to better analyze can you add the following to your post:
based on the log and your rule it seems that the safe team would be edited in the first IF statement. Do you know that it was not updated? Can you verify in the History?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Note: you could also log values at the end of the rule before exiting. This would show the before and after which is very useful when troubleshooting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great! I am a rather newbie to Jira automation and was not aware of the possibility of log messages. I have now introduced logging at the start and end of the automation to better understand when I get the error. So far only successful executions, but this will help a lot.
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.