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 Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Fadoua M. Boualem
Published yesterday in Trello

Using Trello to manage events

As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...

428 views 5 6
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