Hello people,
I was wondering if there is a way to put a condition on the ability to log work on issues.
In our example I wouldn't want people to be able to log work on issues that have a certain field empty.
Any ideas on how to achieve this?
Thanks!
If you have the ScriptRunner plugin, you could use the Hide UI Web fragment. You could choose the Log Work button and add the required condition for the Log Work button to be hidden.
Great, however I am a green beginner with Script Runner, we have it but i have no clue how to hide the UI fragment. And honestly it may not work because some people also use the Jira Work Time plugin and log directly from there...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is right. If you have the Jira Work Time plugin, I guess Scriptrunner will not help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe we can somehow no allow the loging event without if the custom field conditions isn't met? This should theoretically prevent logging from any source if the condition isn't met.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can develop a listener and listen for the Work logged event. Then you could make your logic there and handle the work log. But it would be invisible for the user. You can not return a result to the user from the listener.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Indeed this solution doesn't work for us. the UI solution as well.
Can we configure some Behavior that not allow logging only if certain condition is fulfilled, like maybe remove log work permission temporarily?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, you can not use behaviours because behaviours work only fo the Create, Edit, View and Transaction screens. They do not work for the log work screen. You could use JavaScript of course, but it is not a good approach.
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.