Forums

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

Jira automation to edit a fix version's name

tassilo.posegga
October 13, 2022

We have a rather complex setup of multiple fix versions per issue due to multiple products we are shipping with the same code base. We create fix versions like product1-next, product2-next.
Once we create a release branch for a product I need to rename the current -next version of a product to a specific version.
How can I edit a fix version using automation? Out of the box we can only create/release/unrelease versions.

1 answer

1 accepted

1 vote
Answer accepted
Alexey Matveev
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 Champions.
October 22, 2018

Hello,

Your script should look like this:

string [] fields = getIssueFieldNames(key);
string customKpiField = "";

for(string _fieldName in fields){
if(contains(toLower(_fieldName), "kpi")){
customKpiField = _fieldName;
}
}
logPrint("Error", "KPI Field: "+customKpiField);

You get the key of an issue by calling the key variable, not issue.key

Christiam Hernandez
October 22, 2018

yes, you are totally right, however that function is still not getting recognized:

 

  • [SIL Error on line: 1, column: 20] Variable fields cannot be initialized with type null
  • [SIL Error on line: 1, column: 20] Routine >>getIssueFieldNames<< is not defined!
Christiam Hernandez
October 22, 2018
Alexey Matveev
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 Champions.
October 22, 2018

What is your SIL engine? It is available from 3.0.8

Christiam Hernandez
October 22, 2018

I'm in Jira Cloud so... I assume it's the latest since i installed the plugin the last week, if not... how can i see which version is my Jira using ?

Alexey Matveev
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 Champions.
October 22, 2018

The getIssueFieldNames(issueKey) method is not available for Jira Cloud, unfortunately.

Suggest an answer

Log in or Sign up to answer