Forums

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

Autofill the original estimate field based on custom field value during creation

Shivi Gupta April 2, 2020

Hello ;

I want to autofill the original estimate field if the priority is set .I used the following code , but its showing error (**)  , What's wrong ???

import com.onresolve.jira.groovy.user.FieldBehaviours
import com.atlassian.jira.issue.fields.CustomField

**FormField Priority = getFieldByName("Priority")
**FormField OE = getFieldById("timetracking_originalestimate")
String Compl_Value = (String) formPriority.getFormValue()

if ( formPriority.getValue()==("Critical") )
{ formOE.setFormValue("24h")
}
else if ( formPriority.getValue()==("High") )
{ formOE.setFormValue("3d")
}
else if ( formPriority.getValue()==("Medium") )
{ formOE.setFormValue("24d")
}
else if ( formPriority.getValue()==("Low") )
{ formOE.setFormValue("48d")
}
else
{
formOE.setFormValue("0h")
}

0 answers

Suggest an answer

Log in or Sign up to answer