How can I use automation to ensure a specific version is always added to the existing fixVersions

Joel G April 27, 2020

The problem is this: my teams manage their work to multiple releases, a "milestone" release and a "all complete" release.  I want to create an automation that ensures the "all complete" release is added to each and every card.   

Finding the cards that need to have the release version added is pretty simple, something like:

project=PROJ and fixVersion != "all complete"

The problem is the only way I know to add the fixVersion is to use the Edit issue action.  The edit issue action will allow me to set the fix version to the specific version, but then it will replace all existing values (including the "milestone" release(s)).  If I copy it from another issue, then it can be appended, but as near as I can tell there isn't a way to append a specific release version.

Any other ideas? What am I missing? Thank you!

2 answers

1 accepted

0 votes
Answer accepted
Elad Ben-Noam April 28, 2020

Hi @Joel G ,

The fix version field can contain many versions, even in the "edit issue" screen you can select as much versions as you like.

All of the above said in case you don't have some custom scripts running on your Jira to disable users from adding more than a single version to this field.

 

BTW - you should be able to change the fix versions field by clicking on the value of fix versions fields when viewing an issue in full screen.

0 votes
Joel G April 28, 2020

Elad, thanks for the response.  I am able to set the fix versions manually.  The problem I'm having is how to set them automatically.  Basically I want to make sure to always add an "all complete" version to every card so that, in addition to tracking the progress towards the "milestone" version, we can track towards the final release.  We are currently doing this manually by setting the list of versions on the cards themselves, but would like to simplify the process by using jira automation (now that it is built in)

Elad Ben-Noam April 29, 2020

@Joel G 

Using the Jira automation is pretty simple:

You need to decide what's the trigger: You should probably use "issue created" or "issue transition" (or use a scheduled trigger to run every day if you want less automation runs)

You can then filter irrelevant issues such as subtasks (JQL: issuetype not in subtaskissuetypes() AND fixversions != "all complete" )

And the last step should be "edit issue", in this step you select "fix versions field" and on the "add" select the "all complete" version.

You can find some good tips to start with Jira automation in my presentation here: https://bit.ly/2VKW7TD

Let me know if you don't succeed.

Joel G April 29, 2020

That is what I've done, the problem is that while I can add fixVersions from the parent epic to the current issue:

add-to.png

 

I cannot do the same thing for setting a specific version:

no-add.png

 

So, as nearly as I can tell, if I set any of the version specifically, it will wipe out all the values that already exist, which isn't what I want.

Elad Ben-Noam April 29, 2020

Use this json command instead: (remove the fix version field from the edit itself so it won't override)

{
"update": {
"fixVersions": [{
"add": {
"name":"sdasd"
}
}]
}
}

see image:

ans3.png

Like # people like this
Peyush Agarwal May 25, 2021

Hi @Elad Ben-Noam 

Thanks, your suggestion worked for me however I have another problem.

Problem is I want that if Sprint is changed to A, Fix version should also reflect A (we are using same naming conventions) and if we change Sprint field to Z, it should update JIRA with Fix version as Z and remove Fix version A 

so is there a way we can use some sort of regular expression eg below: 

 

{
"update": {
"fixVersions": [{
"add": {
"name":"CCS PI21.3 Sprint 3"
""remove":{
"name":"CCS PI*.*
}
}]
}

Peyush Agarwal May 25, 2021

so is there a way we can use some sort of regular expression eg below as I w`ant to first remove all FIx version which starts with CCS PI*.* and then add CCS PI21.3 or value which is in Sprint field

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events