Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there a way to set the original estimate on a sub task via a post function workflow?

mdworak July 30, 2015

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.

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
mdworak July 31, 2015

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.

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 31, 2015

Try to debug your custom value: log.warn "val: $cf" def val = issue.getCustomFieldValue(cf) log.warn "val: $val"

0 votes
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 30, 2015

The input parameter is treated as seconds. There should be overridden method that takes String, Please try:

issue.setOriginalEstimate("3h 15m");


TAGS
AUG Leaders

Atlassian Community Events