Resolving an issue means you are executing a workflow transition. In this transition, you should already get a screen with the Resolution field on it, which I would expect to be required just as well.
Check your workflow to see what screen is being used on that transition. Just add the Log Work field to that screen:
Screen Shot 2016-12-17 at 16.29.48.png
If you have your screen configured like this (Fix Version/s and Assignee are just 2 other fields on the screenshot; not necessary with regards to your question, but I'm sure you get the point), add a Fields Required validator to the transition for the Time spent field.
This results in the following behaviour:
Before you implement this solution, verify if you can really enforce this (i.e. check if there are no corner cases where resolving an issue does not require any time spent) and check in which other projects your workflow is being used as well. Your change will impact those projects as well.
what if I made worklog and after that press resolve an issue. In that case I don't need to enter any time, but I will be forced to do that.
The better way is to use script validator, and check if there are any worklogs on the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I second Alex on his point that not in all cases a work log might be required. That's what I meant when I said you should verify whether you can really enforce 'to make a worklog required when resolving an issue'. I would personally be careful too before you make logging work required. But that's an assessment you have to make for your own situation.
Scriptrunner can most definitely help you in validating whether there already are existing worklogs on your issue. But no automatic system will ever be able to validate whether your worklogs are actually complete or not. Not if there already are, but probably even when there are none. That's something that only the person doing the work knows.
So if you want to offer your users the capability and the incentive to log work during the Resolve issue transition, make sure you offer them the field. If you want to make the field required or not is a decision you would have to take for your situation. If you want to implement additional logic to validate the existence of worklogs, add a script validator.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Walter, I can't agree more... especially there are cases when you have to resolve an issue with 'duplicate' or 'won't fix' resolution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Dion Park, I can understand your point. Just implementing the log work field and not making it required doesn't cost you anything.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Script Runner Plugin can help you with that.
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.