So, like the question says... I want to make a rule where issues won't be able to transition to done unless there is time logged.
Go to the workflow used in that issue type and for the close transition add a validator "Field Required Validator" and then select "Time Spent" field.
Also make sure for the close transition there is a transition screen with the "Time Spent" field incase it is not populated.
I don’t think this is the right approach.
For example, say there are 3 statuses
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have script runner you could try a simple script
issue.timeSpent || issue.modifiedFields.containsKey("worklog")
Or you could do something more complex with
import com.atlassian.jira.issue.ModifiedValue
import com.atlassian.jira.issue.MutableIssue
import com.onresolve.scriptrunner.runner.util.UserMessageUtil
Map<String,ModifiedValue> modifiedValues = ((MutableIssue)issue).getModifiedFields()
return modifiedValues.containsKey("worklog") || (issue.timeSpent > 0)
Both should check if time is logged or if the worklog is modified on the transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It looks like you're not able to add a validator when your project is Team-based and I don't think I'll get the budget to get a script runner. Any other options?
Here is what I have tried... there doesn't seem to be a way to check if the syntax is correct.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.