It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Validator: Remaining Estimate cannot be empty

Hello,

I want a workflow to only run when the field remaining estimate is not empty.
When starting the transition, the following screen shows:

2019-07-10 14_44_09-Do-_Done - DBG JIRA.jpgBy default, the "Remaining Estimate" is empty.
My validator looks like this:

issue.getEstimate() != ''

 I have also tried

issue.getEstimate() != null

 Both codes don't work. After confirming, the transition just runs and the status is changed.

I just ran a test to see if the getEstimate works and the validator

issue.getEstimate() == 3600

 returns the following after confirming:

2019-07-10 14_48_45-Do-_Done - DBG JIRA.png

The error message was defined by me, so no worries there.
Obviously the validator works now.
I noticed that I left the remaining estimate empty, then clicked, and suddenly the remaining estimate is automatically filled with the original estimate and the error message shows.

So, TLDR:

How do I set up a validator to block remaining estimate from being empty?

 

2 answers

Hi Christian,

Which validator and add-on are you using to do this? The Remaining estimate is picking the value from the Original estimate because the "Legacy Mode" is on in your Time Tracking settings. With this on, the original estimate and remaining estimate are linked. You can uncheck it to avoid it. 

Regards,

Radhika

I am using the 

'Script Validator [ScriptRunner]' Validator

Legacy mode is already disabled.

 

To give a little bit more context:
At the end of each month project responsibles have to give an estimate about how much work is left for that project to the project management, to identify possible budget overruns early.
Because we want them to think about the real remaining estimate (including every non-planned activities) instead of just saying "last month we had 100h left, we worked 35h this month on that project, so remaining has to be 65h", I set it up in a way that the remaining estimate gets cleared when doing the transition.

I now want to avoid that an empty estimate is given by accident, so I need the validator.

 

edit:

I also tried using the following validator:

Fields Required (JSU)

  • Required fields:
    • Remaining Estimate
  • Error message (optional): Remaining Estimate cannot be empty

This results in the following screen:

2019-07-11 08_23_57-Do-_Done - DBG JIRA.png

Remaining estimate now looks like a mandatory field, I am still able to simply confirm the transition and it will run just fine and fill in the original as the remaining automatically...

Any more ideas?

I am still having that problem.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

365 views 1 3
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you