• Community
  • Products
  • Jira
  • Questions
  • 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).

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).

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 .

import com.atlassian.jira.issue.IssueImpl.*

Long ts = issue.getTimeSpent()
Long re = issue.getEstimate()

if((ts > 0) || (re == 0))
return true
else
return false

But this script will not work if the original estimate field is not filled in the issue.

Please help us

1 answer

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 16, 2018 in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

80 views 0 4
Join discussion

Atlassian User Groups

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!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you