Forums

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

Enforce Pre-defined Fields Entry Based on User Group

Grant Ewing
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 29, 2024

Hi there Community,

 

I have thoroughly investigated some potential solutions and it seems that my team would need to go with ScriptRunner for JIRA to achieve our goals:

 

1. We need control of Labels to only allow users within a certain Group to create new ones. (only use already existing fields unless user is in Group "Admin" or "TeamLead")

2. We need control of Components to only allow users within a certain Group to create new ones. (same condition as 1)

3. We need control of Versions to only allow users within a certain Group to create new ones. (same condition as 1 & 2)

 

If we were to implement "ScriptRunner for JIRA", how would we best complete this task? Would it be from the use of Behaviors or Validators? I am somewhat familiar with Java (and Groovy) so I am open to creating the handling from code, just need help with getting set in the right direction. 

1 answer

1 vote
Valerie Knapp
Community Champion
July 29, 2024

Hi @Grant Ewing , welcome to the Atlassian Community and thanks for your question.

To restrict who can create and modify Components or Release, you can just enable people to the 'administer projects' permission -

image.png

So you don't technically need an app for this, as it works out of the box.

For the labels, on the other hand, even with ScriptRunner, I don't know of a solution to allow only certain users to create labels. Labels, for better or for worse, are not something we have a lot of control over in Jira, in the sense that they are always available for users to create and add to the Jira issues.

In my development work I do for customers, I would never build anything that relies on or is driven by labels. I would always favour a custom field or something like this, when you are asking people to indicate where a problem is, how important something is that they want. With labels, of course it is possible to add more information to a context, but at the end of the day, they are very difficult to report on, as people can and do make mistakes when they are typing and create multiple labels that mean the same thing and so on.

Please can you explain in more detail what you are trying to use the labels for? We would be happy to suggest alternative approaches that don't use labels.

Cheers

 

Matt Doar _Adaptavist_
Community Champion
July 29, 2024

Agreeing with Valerie. A custom field for this info would help with reporting, and allow a ScriptRunner Behaviour to control visibility. Labels are a very large bucket of values to try to use here.

Like Valerie Knapp likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events