You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.