Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to assign issue security based on component

Gregory Morse
Contributor
September 19, 2013

I'd like to assign an issue a security level by default, based on the component an issue is assigned to. Possible? Suggestions? Thanks so much in advance.

3 answers

1 accepted

3 votes
Answer accepted
Nic Brough -Adaptavist-
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.
September 19, 2013

Unfortunately, the answers you've been given so far only work for one very specific situation - they do NOT set the security level, they set the assignee to one person and then rely on the default security scheme in the project to do things like "hide the issue from everyone except that person".

If that's what you need to do, then it'll work (with the additional caveat that you also really need to understand the rules about who the component lead is when the user selects multiple components)

To actually do "security level set by component", you need to do some coding. You need to find/write a post-function to add to the "create" transtion (or listener if you want to do it on edit actions). The code is a simple "if component X, then set security Y" block of statements. I'd look at using the script runner plugin to do it.

Jim Stemper May 8, 2018

I am not a developer however I am tasked with investigating setting security level by component. I have downloaded a trial of Scriptrunner but could use an example of the script you noted here where i (as a non technical user) can test an "if component X, then set security to Y" script to verify we can move forward with this integration. Would you be able to assist me in this?

Chhaya Gadade December 5, 2018

Hi @Nic Brough -Adaptavist-,

How to write the condition to set security level based on Component,i am writing 

issue.component?.name == 'Sample'

but not able to do it.thanks in advance.

Nic Brough -Adaptavist-
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.
December 5, 2018

Component is an array of 0 to many components, I think you need to use a "contains" rather than "=="

Nic Brough -Adaptavist-
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.
December 5, 2018

Component is an array of 0 to many components, so I think you need to use a "contains" rather than "=="

Chhaya Gadade December 5, 2018

Thanks for your quick reply,I want to set Security level to only one component

Chhaya Gadade December 5, 2018

can you please help me .

Chhaya Gadade December 5, 2018

Hi @Nic Brough -Adaptavist-,

Thank u so much.It works finally

issue.components*.name.contains('Sample')

Chhaya

0 votes
Bharadwaj Jannu
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.
September 19, 2013

As prasad suggested, if you want only the assignee be Component Lead then ok.

If you also want security to view that issue by key or by means of Issue Navigator then you need to set Browse Project permission to Current Assignee. You can find here.

0 votes
RambanamP
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.
September 19, 2013

go to your project configuration page, edit the component and define "component lead" as tandard assignee

This way, every time a component has been selected and the assignee is set to the default "Automatic", it will be assigned to the component lead

you can configure security level for current assignee.

i hope this will help you!!

Mark Anderson
Contributor
August 17, 2016

where do I configure security level for current assignee.

Nic Brough -Adaptavist-
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.
August 17, 2016

In the "security scheme"

Mark Anderson
Contributor
August 17, 2016

thanks for quick reply Nic. i don't see where. unless mis-interpreting something, in the scheme I can just say which users can SEE issues with this level. I don;t see a way to SET the level based on security

Nic Brough -Adaptavist-
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.
August 17, 2016

A security scheme defines a set of levels that can be applied to an issue.  Each level is a set of rules that say who can see the issue with that level.

To set a security level on an issue, a user must

  • Have the permission to edit the issue
  • Have the permission to set issue security
  • Be covered by the rule that defines the level they are trying to set 

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events