Problems with Set Issue Security Level on Create Issue Screen

perdue_brandon_vast-inc_com July 13, 2017

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
perdue_brandon_vast-inc_com July 17, 2017

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?

0 votes
perdue_brandon_vast-inc_com July 14, 2017

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. 

0 votes
perdue_brandon_vast-inc_com July 13, 2017

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

0 votes
Shawn Masters
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2017

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). 

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 13, 2017

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.

Suggest an answer

Log in or Sign up to answer