I'm trying to write a pretty simple automation rule: When somebody sets the "Fix Version" on an issue to a version that is already released, warn them that this should not be done.
I have an automation set up to trigger whenever a value is added to the Fix Versions field.
I'm struggling to check the {{released}} attribute of the smart value. I would have expected that {{fieldChange.to.released}} works. But it doesn't. I can get the ID and the name of the version, but not any of its attributes (see screenshots below). How can I write a condition based on whether the version that was just added is released or not?
Thanks for your help
There might be a more elegant method of doing this using Fix Version smart values, but I did it using a JQL Condition:
Let us know if this helps!
Ste
This looks like it would work if I could make the assumption that there is just one version in fixVersions. What happens if there are multiple?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'd consider setting the "Change Type" of the Trigger to "Value Added".
That way, if a Fix Version is added (making for multiple versions), it could alert the user that the last Fix Version added was in a released state, or one of the last Versions added was.
Ste
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are known problems with automation rule parsing of the change log and list fields, particularly versions. Here are a couple of them:
https://jira.atlassian.com/browse/JIRAAUTOSERVER-207
https://jira.atlassian.com/browse/JRACLOUD-81160
And so you may get a rule which appears to work, but its results may not be consistent.
Let's assume your rule can be accurately triggered and that {{fieldChange.to}} can accurately return a list of version id values. In that case, you could use either:
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's valuable information, thank you!
I ended up implementing basically what @Ste Wright suggested, although I guess it's not going to be super reliable.
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.
This might work if I could make the assumption that there is just one version in fixVersions. What happens if there are multiple?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In this case, you can use the 'create variable' action. you can create a variable as shown in the screenshot I've provided and utilize it within the condition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And what would you put in the "Smart value" input field for the "Create variable" action?
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.
Thanks for your reply. I don't understand how creating a variable first fixes the ambiguity when there are multiple versions in the Fix Versions field (e.g. if there is one already and a second one is added).
Will the {{fixVersionReleased}} field always contain the one that was just added?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, to provide an example using an issue: if fix version that had been previously released is added to the issue, you can detect this through the variable we've created. I'm sharing the details of the automation rule and the audit log screen below. With this condition, if a previously released value is added, the automation can perform actions accordingly.
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.