I want a workflow to only run when the field remaining estimate is not empty.
When starting the transition, the following screen shows:
By 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:
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.
How do I set up a validator to block remaining estimate from being empty?
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.
I am using the
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.
I also tried using the following validator:
Fields Required (JSU)
This results in the following screen:
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...
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 ...
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