[Workflow] Validator: I need check "remaining estimate" = 0 (Jira Cloud)

Tobias January 24, 2018

I do not want people start an issue without a remaining estimate. So the Transistion should perform a validation. But there is no option to validate these field "> 0"? I have with "Field Required Validator" the possibility to check if it is empty. But i need empty OR 0.

At the conditions there is the possibility with "Value Field". But that does not help. Now the button for the transition is missing but nobody knows why.

I need the same check at validation to give some feedback of the field is empty or 0.

Is there a solution?

4 answers

0 votes
billie_harland January 17, 2023

I know this an old thread but, just in case anyone else has this problem, there is a very manageable solution as long as you have script-runner installed.

The validator ''Script Validator [ScriptRunner]'' lets you validate the contents of a field and (if it returns a falsey value) reject it like a required field validator would for a missing field value.

A simple example script is included below but no guarantees as I'm no wizard:

if (issue.originalEstimate > 0) {
return true
}else {
return false
}

 

... that should stop folks from setting 'Original Estimate' to 0 or skipping it since the null is treated like a 0 in practice.

0 votes
Sven Peper August 2, 2018

however you can help yourself @Tobias by adding a POST function in the workflow to automatically update the field when somebody closes the issue.

the only difference: validators would require people to change the remaining estimate manually befor moving an issue and the post function does it for them in case they don't do it

Screenshot 2018-08-02 09.16.20.pngScreenshot 2018-08-02 09.16.34.png

Tobias August 17, 2018

Hello @Sven Peper

thank you very much. I'm already doing it.


But now I want the exact opposite. No tickets should be processed that do not have open time. So I want to "force" people to really enter an RE if something else needs to be done on a ticket.

Like jan_tomsa likes this
0 votes
Sven Peper August 2, 2018

i would need the same validator as @Tobias

i don't want people to close issues with remaining estimate > 0 - it doesn't make sense.

0 votes
Mikhail_Kopylov
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.
January 24, 2018

Hello, Tobias,

 

You're always able to write your own plugin or use script runner to implement validator you need. 

Tobias January 24, 2018

Hi @Mikhail_Kopylov, unfortunately, I do not really understand your answer. Can you give me more details? Where do I have to look in Jira Cloud in the "Workflow Manager" to fulfill my described requirement?

Thank you

Mikhail_Kopylov
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.
January 24, 2018
Tobias January 24, 2018

Thank you for your answer. But for me that is not a solution. That should be a feature that Jira do without an extra addon.

Mikhail_Kopylov
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.
January 24, 2018

As far as I know there's no such feature out-of-the-box.

You can filter issues by remainingEstimate field, but you want to have a validator based on this field. And there're only permission-based validators in stock JIRA.

Suggest an answer

Log in or Sign up to answer