The question is pretty straightforward: I would like to automatically set the (default) priority field of an issue based on custom impact and urgency fields that have been configured (both are single choice select lists). The code shouldn't be too hard, but I can't get it to work.
I've inserted the script beneath both as initialiser and on field level for priority, impact and urgency (mainly because I"m unsure which one to choose), but nothing seems to work.
So my question is twofold:
- Why isn't this script working?
- Where should I set the script?
def AxDelImp = getFieldByName("Axon Delivery - Impact")
def AxDelUrg = getFieldByName("Axon Delivery - Urgency")
def prio = getFieldById("Priority")
if (AxDelImp.getValue() == "All users affected" && AxDelUrg.getValue() == "Complete outage")
{
prio.setFormValue("Prio 1")
}