Hi.
So I have this case where I want to set the Priority based on a custom severity field upon creation of an issue.
With a Groovy inline script I have the following, but I can't get it to work right. Can you help me?
MutableIssue myIssue = issue;
switch(cf["customfield_10500"].getValue())
{
case "Extreme":
myIssue.setPriorityId("2");
myIssue.store();
break;
case "Bad":
myIssue.setPriorityId("3");
myIssue.store();
break;
case "Not so bad":
myIssue.setPriorityId("4");
myIssue.store();
break;
}
Hey,
Have you considered using a Priority object, as explained on this post? I believe that it would work for you.
-- Arthur Gonçalves
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.