I have tried the following
cf = customFieldManager.getCustomFieldObjects(issue).find {it.name == 'Code Hours'};
issue.setOriginalEstimate(issue.getCustomFieldValue(cf));
and it does not appear to work.
When I do this
issue.setOriginalEstimate(0L);
is sets the original estimate to 0hours.
If is do
issue.setOriginalEstimate(444);
It sets the original esitmate to 7.4 minutes
I need to set the original hours to the value from a custom field via a post function script.
Community moderators have prevented the ability to post new answers.
that works too but I am trying to have the value of original estimate set to the value of a custom field in the transition and cannot seem to make that work.
Try to debug your custom value: log.warn "val: $cf" def val = issue.getCustomFieldValue(cf) log.warn "val: $val"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The input parameter is treated as seconds. There should be overridden method that takes String, Please try:
issue.setOriginalEstimate("3h 15m");
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.