We want the validator of the "Resolve Issue" transition to allow resolving an issue if and only if ("Remaining Estimate" == 0) OR ("Time Spent" > 0).
Currently the validator doesn't allow resolving the issue if "Time Spent" == 0 (no work was logged against the issue) but "Remaining Estimate" is zero. But it should according to the condition above.
used the below script as the validator .
Long ts = issue.getTimeSpent()
Long re = issue.getEstimate()
if((ts > 0) || (re == 0))
But this script will not work if the original estimate field is not filled in the issue.
Please help us
Try the Jira Workflow Toolbox Jira add-on. It supports aritmetic functions that you can use to do this sort of thing. You may need to calculate your value in a post-function on a previous transition and insert the value into a custom field, then point your condition at the custom field, though. You might also try using the Jira Misc Workflow Extensions add-on. It has a condition that can compare a field value against a string. You may be able to compare both fields and use the built in "any"/"all" conditions functionality to do the logic for you. I frequently use both of these add-ons to do this type of thing for clients. I'm sure one of those add-ons will do what you want.
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG