Hello ,
I want to pop up a warning message once the user click on the edit button of any jira issue. how can I do this?
Regards,
Priyanka
I agree not to inject code into the core of Jira.
Here's my suggestion:
If you are trying to avoid a specific user or group to edit the field, I would like to suggest using ScriptRunner Behaviour to set the field read-only for a specific user instead of pop up a warning message while clicking on the edit button.
.setReadOnly(true) helps to make the field a read-only field, and the user cannot edit the value inside the field.
Please refer to the document: https://library.adaptavist.com/entity/set-behaviour-read-only
I think .setError() is good enough to display some information to the user.
Also, this script should only work while the user on edit screen.So to tell if you are in the Edit dialog, you just need to check that the value returned from the method is null like this:
if (getActionName()== null){
//your code
}
It's a little strange, but the getAction and getActionName methods should return a null value when on the Edit issue dialog.
Lastly, to make sure this Behaviour script only applies to a specific group, you can add a condition to check on the user's group/project role: https://docs.adaptavist.com/sr4js/6.22.0/get-started/tutorials/behaviours-tutorial
I hope my suggestion makes sense to you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Code - you'll need to inject code into the core of Jira so that it triggers your pop-up instead of taking people to the edit screen.
I would recommend not bother to do this though, because
It would be better to explore why you think this is a worthwhile/helpful change? What problem are you trying to solve with this idea?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am restricting people from editing the jira issue but at the same time I also want them to know why they can not edit.. and for that I need to have a pop up message. @Nic Brough -Adaptavist-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you remove the edit permission, the edit button goes away completely. There's nothing to click to trigger the pop up.
I don't think you have a problem here.
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.