Forums

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

When creating issues, how can I limit the issue types depending on the group?

Javier González April 1, 2022

Greetings everyone,

Let's say I've got these issue types: "Bug", "Story", "Epic" and "Task". (They are called differently anyhow).

And I have these user groups: 
Group A, Group B and Group C.

I would like users in the following groups, to be able to create the following types:

  • Group A can create: "Bug", "Story", "Epic" and "Task". (all of them)
  • Group B can only create: "Bug", "Story" and "Epic"
  • Group C can only create: "Bug", "Epic" and "Task".

I am not sure if I should create a new permission scheme and modify it, as I can only limit the issue creation/edition in general, but not from a specific type. Have you got any ideas on how I can implement this?

Thank you very much for your help in advance.

Best Regards,

Javier.

2 answers

4 votes
Dirk Ronsmans
Community Champion
April 1, 2022

Hey @Javier Molina and welcome to the community.

You can look in to adding a condition/validator on the create transition of the issue type, but that will only block the creation of the issue when they click the submit button.

Within Jira it's not possible to block the visibility of the creation list (on Cloud and without apps) once someone has the create issues permission they can create all.

So your best bet is to block the creation once they would submit the issue but that's a dirty way of doing it as they are still allowed to fill in the entire form and then get greeted with the error/blocking when they try and create the final result.

Javier González April 3, 2022

Hey @Dirk Ronsmans

Thanks a bunch for your response, I'm happy to be part of the atlassian community :)

I had imagined I would not be possible to perform such action by default and a plugin/addon would most likely do the job.

However, the solution you are providing, though dirty, might actually work (I will be testing it soon and will let you know about the result). It would be to simply modify the "Permissions" tab on "Project Settings" and create a new "Permission Scheme" for this project specifically. Afterwards, we would need to add the groups to the "Create Issues" section accordingly. Is this correct? If not, what could you recommend? (Still learning the basics of Jira!)

Thank you very much for your support, and have a nice day!

Dirk Ronsmans
Community Champion
April 3, 2022

Hey @Javier Molina ,

Creating a new scheme and adding the groups to the Create issues permission will indeed limit it somewhat already but that would still allow all those groups to create all types of issues.

To limit it further on who can create what type of issue you might need to look in to "Conditions"

https://support.atlassian.com/jira-cloud-administration/docs/configure-advanced-issue-workflows/#Conditions

The "User is in Group" condition should work for that imho. Each issuetype will need it's own workflow and on that workflow you can then set a condition where you only allow the create transition if a user is in a specific group.

Otherwise you could also create specific project roles and use those to make it a little more flexible.

You'll still need to test this and see if it covers what you want it to do :)

Javier González April 4, 2022

Hello @Dirk Ronsmans and thank you again for your interest in my case and your swift reply :)

I have tried to add the condition to the workflow, but apparently it is not possible to perform such action at the moment of the creation. I am not sure if I am placed at the right spot, or I should add it somewhere else, but the fourth step of the guide you previously provided does not let me to simply add the condition:

transitions.png

"In diagram mode, select the transition arrow. In text mode, select the transition's name from the Transitions (id) column."

Is there anywhere else you can place this?

Thank you!

Dirk Ronsmans
Community Champion
April 4, 2022

i was afraid of this, the "create" transition is a bit of a special one. I'll see if I can come up with another way.

Do you have any plugins installed in your instance or open to installing them to solve this? In the past I've done this using scriptrunner and creating a scripted validator but I'm trying to figure out a way to do it without adding an app to your instance. (might not be possible..)

I did find the the following issue for it so you can already vote/watch that to start.

https://jira.atlassian.com/browse/JRACLOUD-44557

Javier González April 4, 2022

Hey @Dirk Ronsmans ,

I had accidentally replied on the main thread instead of this one. I have installed ScriptRunner, but I'm still quite new to this. If by any chance you manage to find out a way to implement this feature and limit the creation of issue types depending on the group they are in, let me know. I will continue to work on this to improve my overall knowledge.

Thanks a bunch for your help!

Javier González April 7, 2022

Hey @Dirk Ronsmans ,

I finally managed to find a solution with script runner. I only needed to modify the workflow and add this line (for each group):

user.groups.includes("Group 1") || user.groups.includes("Group 2") || ... etc!

It works wonders now. Thanks anyhow for your responses, highly appreciated!

0 votes
Javier González April 4, 2022

Hey Dirk,

Yes, I am currently playing around with ScriptRunner for my personal knowledge, so this option would be perfect. Let me know if you figure out a way. In the meantime, I'm going to read a bit more about this addon whilst making my own research to solve this. A vote from my side has been placed on your issue link ;)

Thanks a lot!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events