Is there a way to use behaviours or groovy script to prevent new components being added?

G June 9, 2016

I know this has been asked before but is there a way to use behaviors or validation groovy script to prevent new components in a project being added. This is to prevent the on fly component creation.

Cheers,

Gaj

2 answers

0 votes
Mark McCormack _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.
June 10, 2016

Hi Gaj,

The permission to control who can add new components is already somewhat controlled by the administrator role for the project but it is likely you know that.

The nearest equivalent I can think of is to restrict the editing of the field (which I appreciate is not the same thing). This documentation link covers how to restrict the editing by role.

G June 10, 2016

Thanks Mark. the problem is we are not able to remove users from the project admin role as they are needed there in order to create the sprints etc. The problem with restricting the component field is the user won't be able to set a value which is already available. 

I was just hoping someone had a behaviour which already checks existing 'components' in a project and says 'No' to any new creation on the fly. Or at least any new creation unless it's the project lead. 

0 votes
Boris Georgiev _Appfire_
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.
June 10, 2016

Hi Gaj,

Adding components should be allowed only for users with "project administrator" permissions as stated in the docs

https://confluence.atlassian.com/adminjiracloud/managing-components-776636315.html

Do you actually need to disable on the fly creation for project admins ?

Also check this discussion https://answers.atlassian.com/questions/317066

 

And also note that behaviours can't be used to modify the "inline-edit" feature of JIRA, so I'm not sure it will help. Even if you implement such a behaviour it will disable the inline edit probably, so then in order to modify components the users will have to go through the Edit screen each time.

 

Boris Georgiev _Appfire_
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.
June 10, 2016

One more link that might provide useful info - https://jira.atlassian.com/browse/JRA-42068

G June 10, 2016

Hi Boris,

Thanks for getting back. Yes I'm aware of https://answers.atlassian.com/questions/317066 and also JRA-42068 . I need to disable on the fly component creation for project admins too. Was wondering if anyone came with a behaviour of groovy hack to prevent this annoying 'feature' Atlassian implemented.

I'm also aware adding behaviors to a field will prevent in-line editing on that field but that's fine.

Cheers,

Gaj

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events