Hi every one
My manager want me to have a custom field in JIRA for ranking issues. The value of this issue must have been calculated based on multiplication another 2 fields value.
Assume:
Complexity : High - Medium - Low values that we give them a rating from 3 to1.
Periority: Blocker - Critical - Major - Minor that we give them a rating from 4 to 1.
And a third field we called Rank that we want to get it's value from this formula:
Rank = Complexity * Priority
I didn't have any scripting exprience and I think it's nesesary for doing this. If it's nesessary please introduce some material for quick and easy learning of scrpting languages. :)
Cheers
Ansar
Community moderators have prevented the ability to post new answers.
I try this code and it works fine. Thanks for your help.
def double rank = 12.0; def complexity = getCustomFieldValue("Complexity"); if(complexity == null) return rank; switch(complexity.value) { case "High": switch(issue.priorityObject.name) { case "Minor": rank = 12.0; break; case "Major": rank = 9.0; break; case "Critical": rank = 8.0; break; case "Blocker": rank = 6.0; break; default: rank = 12.0; break; }; break; case "Medium": switch(issue.priorityObject.name) { case "Minor": rank = 11.0; break; case "Major": rank = 7.0; break; case "Critical": rank = 5.0; break; case "Blocker": rank = 4.0; break; default: rank = 11.0; break; }; break; case "Low": switch(issue.priorityObject.name) { case "Minor": rank = 10.0; break; case "Major": rank = 3.0; break; case "Critical": rank = 2.0; break; case "Blocker": rank = 1.0; break; default: rank = 10.0; break; }; break; default: rank = 12.0; } return rank;
A simple Google search returned this (https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+Fields)..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also, I'd avoid calling the result "rank", because
a) Jira Agile uses that name
b) you're not really ranking issues - a rank usually determines the order in a list, and is unique (you can always say issue X outranks issue Y), whereas your formula allows X and Y to have the same value. It's something more like "urgency" or "weight"
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.