I'm trying to set the "Original Estimate" field based on the value of a custom field (Select List (single choice)).
I don't know why it won't set the value. Setting another field "Description" works just fine.
I assume that I'm holding the proper objects as the logging is correct.
def qualification = getFieldByName("Qualification").getValue();
def originalEstimate = getFieldById("timetracking");
def descr = getFieldById("description");
log.info("qualification: '" + qualification + "'");
log.info("originalEstimate: '" + originalEstimate.getValue() + "'");
if (qualification == "Very Small") {
descr.setFormValue("15m");
originalEstimate.setFormValue("15m");
} else if (qualification == "Small") {
descr.setFormValue("30m");
originalEstimate.setFormValue("30m");
} else if (qualification == "Medium") {
descr.setFormValue("1h");
originalEstimate.setFormValue("1h");
} else if (qualification == "Large") {
descr.setFormValue("2h");
originalEstimate.setFormValue("2h");
} else if (qualification == "Very Large") {
descr.setFormValue("4h");
originalEstimate.setFormValue("4h");
}