I'm new to Jira and I'm trying to figure out how to make sure time have been logged at least 1 minute. So, if Time Spent = "0" OR NULL it should pop-up a message and prohibit to close the issue. I'm not a programmer :/
Jira Server 7.3.4 with Script Runner
Hey there Francis,
I think I can help you out with this!
Follow these steps:
def timeSpent = issue.getTimeSpent() timeSpent>=60000 && timeSpent != null
and the Error Message "Error: There has been no time spent on this issue!" But leave the Field box blank.
If I'm following your question correctly, this should do the trick.
Let me know how it goes!
Aidan
Despite this being an ancient topic, it helped me solve this particular issue today, so thank you! :)
One thing I'd like to point out (and one that might have changed since this was originally posted) is that timeSpent is stored in seconds, not milliseconds. So timeSpent >=60 suffices to have at least one minute of logged work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.