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

Workflow Post Function - If Original Estimate is 0m, clear the field by setting Original Estimate to NULL

Sean Hayes July 20, 2015

If the Original Estimate of an issue is 0m, any time written to it will set the Work Ratio to 9223372036854775807%

To correct this, I used a post function on my Workflow Transitions to conditionally clear the Original Estimate and Remaining Estimate fields, only if the original estimate is 0m:

if( 0 == issue.getOriginalEstimate()){
    issue.setOriginalEstimate(null)
    issue.setEstimate(null)
}

Is there a better approach?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
AndrewB September 24, 2015

This should work for you without any custom scripting:

 

Still use a Post Function, use Update Issue Field, select "Remaining Estimate", leave Field Value blank, hit Update.

You can do the same for Original Estimate if you wish.

 

Source:

https://confluence.atlassian.com/display/JIRAKB/Set+Remaining+Estimate+to+0+on+post+function

TAGS
AUG Leaders

Atlassian Community Events