At the moment task can be accepted by everybody (inclusive the author of the PR)
So it can be happen, when the author does not agree with the reviewer, he can just accept the task and can merge the PR.
Is there a way to disable this, so maybe only the task author can accept the task?
Maybe via scriptrunner, beacuse I didn't find anything in bitbucket.
I can't find a way of doing this currently. The problem is that the task events are not cancellable, otherwise you could have had an event handler for when the task is resolved. Then you could have checked the task author with the current user in this and cancelled the event if they are not the same.
You can possibly hide the tasks using Script Fragments and more specifically the "Hide system or plugin UI element" one.
I haven't tried it myself but you may be able to use the condition to hide the tasks if the task author is different to the current user. It's a bit of a reach but it may be able to get you there.
Do you know what the name of the task button in bitbucket is?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The create task button is a client web item fragment. This means that it is rendered client side only. Unfortunately ScriptRunner does not support hiding these kind of fragments.
Your only real option is to add a web resource with some JavaScript that hides the button. Then install it using the "Install web resource" script fragment.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So an in this javascript file, I have to hide the button.
However, how to I find out the current user is not the one who created the task?
Any example how to execute the javascript itself, because I guess we have to wait till the page was finally rendered, in order to hide the checkbox.
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.