Hi All
I have a behaviour which requires the users to provide a explanation when they set a high priority.
Before updating ScriptRunner, I was able to retrieve the ID of the set priority like so.
def priority = getFieldById(getFieldChanged())
def selectedPriority = priority.getValue()
But now, the variable selectedPriorty contains this and not just the ID anymore.
IssueConstantImpl[[GenericEntity:Priority][sequence,3][statusColor,#D31C1C][name,Hoch][iconurl,/images/icons/priorities/highest.svg][description,Dieses Problem könnte die normale Arbeit unter Umständen behindern.][id,3]]
How can I get the ID out of this string?
Thanks and best regards
Marius
Try like this
def priority = getFieldById(getFieldChanged())
def selectedPriority = ((IssueConstantImpl) priority.getValue()).getId()
Unfortunately, this throws the error:
unable to resolve class IssueConstantImpl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you need to add import
import com.atlassian.jira.issue.IssueConstantImpl
def priority = getFieldById(getFieldChanged())
def selectedPriority = ((IssueConstantImpl) priority.getValue()).getId()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot. Works :)
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.