Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I want to pop up a warning message once the user click on the edit button of any jira issue. how ca

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

2 answers

1 accepted

Hi @Priyanka khare

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.

0 votes

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

  • code change like this renders you unsupported
  • humans don't like pop-ups, they get in the way and irritate us

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?

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_ 

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.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you