Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Removing released fixversion from the field

Sheeja Philip October 19, 2022

Hello,

My fixversion field has 3 values, R1, R3, R4 . When R1 is released, I would like R1 to be added to the affects version field and add the next version to be released ie R2 to the fixversion field via Jira automation. Any suggestions ?

I am able to copy all the values from fixversion to affects version and leave the fixversion as is with the R2 added but am not able to figure out a way to selectively remove the release version.fixversion.jpg

2 answers

1 accepted

0 votes
Answer accepted
Sheeja Philip October 22, 2022

thanks, @Bill Sheboy . That didn't work for me. But I was able to get it working with the flow below -

{
"update": {
"fixVersions": [{
"remove": {
"name": "{{version.name}}"
}
}],
"Versions": [{
"add": {
"name": "{{version.name}}"
}
}]
}
}

p1.jpgp2.jpg

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 19, 2022

Hi @Sheeja Philip -- Welcome to the Atlassian Community!

For a question like this, please consider posting images of your complete rule and the audit log details showing the rule execution.  Those may provide more context for the community to help.  Thanks!

Next, I am unclear on which version you want to remove...or why.  Would you please clarify your question, maybe something like this:

Before...

  • fixVersion: R1, R3, R4
  • affectedVersion: null

After R1 is released...I want to ??? resulting in the following:

  • fixVersion: ???
  • affectedVersion: ???

 

Kind regards,
Bill

Sheeja Philip October 19, 2022

Thanks for the response/advice, Bill. I beleive I did mention the way I want to change but maybe not as clearly as you have.

Before

fixversion: R1, R3, R4

affected version: null

After, R1 is released, the next version is R2 and the fields shoudl look like - 

fixversion: R2, R3, R4

affected version: R1

As far as the automation goes, that is the only applicable thing and I am triggering it on a field change for testing. I am comfortable with jira automation and JQL but JSON is another story.

I'm new to the community but I have seen you respond to numerous queries which I have found helpful. 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 20, 2022

To do the remove for fixVersion, you will need to use a JSON edit.  Here is the documentation which describes what is possible: https://confluence.atlassian.com/automation/advanced-field-editing-993924663.html

For your rule, let's assume your trigger is Version Released and that you are branching to the issues.  And so the update to fixVersion would be something like this for the remove:

{
"update": {
"fixVersions" : [
{
"remove": {{version.asJsonObjectArray("name")}}
}
]
}
}

Follow that edit by an Issue Edit to add the next unreleased version.

Suggest an answer

Log in or Sign up to answer