Hello community! I have an issue with Jira automation. I set up the rule: when issue status transition to "in progress" then edit issue field fix version (next unreleased version)
But I have a few versions now. So...
And when automation works it just deleting that version which I set up by myself and setting up next unreleased version. How can I set up a rule so that it doesn't delete the second version that I put on it?
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
Are you trying to add a release / version to the existing values in the issue? If so...
I believe rules can use those relative versions (e.g., Next Unreleased Version) to SET the Fix Version, or they can COPY from another issue and add to the existing versions. But they cannot do both.
I suspect a work-arounds is possible, such as with Advanced Edit with JSON and created variables:
Kind regards,
Bill
Hello @Bill Sheboy
Thank you very much for your answer.
Here it is, my rule and history about how it works
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy by JSON I did this, but as I understand I should every time change name of version in this rule
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for that information. Focusing on the original rule first:
Looking at the audit log from your rule execution, I see only one Edit Issue result, indicating there was no parent issue to branch to. Is that what you expected for the issue CARGO-5488?
Also...
Given what appears to be the change history for issue CARGO-5488 there are at least 2 rules running on that issue after the transition: one changing the Fix Version and another changing the Sprint.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have two similar rules set up, one for automatically transferring a task to a sprint, the second for automatically assigning a version to a task.
And I expected that the version that is already specified in the task will not be deleted by this second rule which I attached above.
I don't see a problem in the logs. And I solved the problem thanks to your hint with JSON :)
Now two versions are displayed in the field and the one that was already in the task is not deleted. But now I need to change the version name in the script at the time. Otherwise, the task will always be assigned version 0.6.11
So this method partially solved my problem, but didn't fully automate the process.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would you please post an image of your current rule and the audit log details? That will help to decide next steps. Thanks!
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, and that shows your rule can successfully add a hard-coded version to the existing ones. But you want to add the "Next unreleased version by release date".
There are a couple of ways to do this: two updates or one update using data from the REST API functions. The second one is more difficult, so let's try the first one...
The idea is to save the current value for the version in a created variable, set to the next unreleased, and then add the saved value. I will add italics where there are changes for your rule:
{
"update": {
"fixVersions": [
{
{{#varVersionName.split(", ")}}
"add": { "name" : "{{.}}" }{{^last}}, {{/}}
{{/}}
}
]
}
}
This should work even when there are multiple, existing versions in the parent. How that expression works is:
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.
Awesome; I am glad to learn that helped!
Now a recommended next step: please explain this rule to another team member, ensuring you both understand how it works. That will improve rule knowledge and readiness for maintaining the rule.
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.