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

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

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.

 

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

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.

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. 

Suggest an answer

Log in or Join to answer
Community showcase
Emilee Spencer
Published Friday in Marketplace Apps

Marketplace Spotlight: DeepAffects

Hello Atlassian Community! My name is Emilee, and I’m a Product Marketing Manager for the Marketplace team. Starting with this post, I'm kicking off a monthly series of Spotlights to highlight Ma...

67 views 0 3
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot