Problems with Set Issue Security Level on Create Issue Screen

Hello - 

 

We are trying to automatically set the security level of a newly created issue. The users of our system will be assigned to only a single group, and we want to set the issue security level to the one associated with that group.

We have included the security level field in the initial screen. The security level drop down defaults to "None," but we want it to default to the users security level which is the only other entry in the list.

We have attempted to use a post function (Script Runner - Set Issue Security) to set the security level, but that will not work since the post function is not executed until after the user clicks "Create" on the initial screen. We also have a validator on the initial screen which requires that a security level be chosen. None of these configurations seem to auto-populate the Security Level Field when the user begins to create an Issue. 

Does anyone know of a possible workaround here? Thanks in advance for any advice/guidance. 

5 answers

0 votes

Validators and post-functions, by defintion, run after the user tries to commit data, so that was never going to work.

Try a "Behaviour", again from the ScriptRunner add-on.  It can examine your screen and set fields to pre-set values.

When you setup the Issue Security scheme via Admin > Issues > Issue Security Schemes you should have the option to set the default security value. When viewing the Security schemes if you select "edit" you can modify this value as well. You then apply this scheme to the project(s). 

Thanks for the responses. I will try both suggestions out and see what happens. Will be in touch tomorrow. Thanks again! 

Shawn Masters -  The problem with setting the default of the Issue Security Scheme is that I can only have one opetion as the default. The idea is that I have 5 different security options. They are Company 1 - 5. When a user who belongs to Company 1 logs in, I am wanting to have Security Level Company 1 preset. The same would go for Company 2, 3, etc. 

 

Nic Brough - I don't have any experience with Behaviours. I do have the Script plugin installed, and I see the Behaviours link. However, I am unfamiliar with how it operates. When you get a chance, could you give me some insight there?

 

Thanks in advance. 

It seems that through Behaviours (Adaptavist Script Runner Plug-in) I have to write some kind of script in order to have pre set values for my Security Level Field based on the group that the user belongs to. 

 

Does anyone have any ideas/direction about a script I could write which pre-populates my Security Level Field according to one's group?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 25, 2018 in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

442 views 7 5
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you