Add a Validator on a transition screen for originalEstimate?

Timothy Harris December 5, 2014

Having some problems validating originalEstimate field in a workflow transition screen. 

Using a Validation based on JQL query, which, I believe is provided by the script runner plugin.

The query is simple: "originalEstimate is not EMPTY"

 

Anybody created validator on a transition screen to require the entry of an Original Estimate?

2 answers

1 accepted

2 votes
Answer accepted
JamieA
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.
December 5, 2014

This won't work if you're trying to do what I think you are, because the issue won't be indexed with the new value until it's committed.

Instead change to a "simple scripted validator", and use the condition:

issue.getOriginalEstimate()

Which is short for 

issue.getOriginalEstimate() != null && issue.getOriginalEstimate() != 0
Timothy Harris December 5, 2014

Jamie, Thank you so much :-) I hadn't thought about the indexing!

0 votes
Alex Sharp July 3, 2020

Recognising that this answer was written a while ago.  It appears you now don't need to use Script Runner to perform this validation. You can add this validation directly in a Transition Validator. (Working Jira Cloud )Transition for Original Estimate.png

danny.shapiro July 30, 2020

I saw issues that transitioned with 0m as estimation although we had this validator.
Any ideas why it's happening?

Like Václav Lipert likes this

Suggest an answer

Log in or Sign up to answer