Hi there. My team is using Jira Cloud.
We would like to restrict a user group to create certain types of issue in a project. We have 2 user groups
1) Business users are allowed to create request and bug
2) Development team users are allowed to create task, bug and epic.
Scriptrunner behaviour only supports Jira server, not Cloud.
Is there any other solution to this request? Thank you in advance!
Hi @Ouioui Zhou
Out of the box this is not possible so you will have to use a plugin like JMWE and add a validator to your workflow for those specific issue types that checks if the user is in the correct group.
Regards
Dave
Hi @Dave Bosman [Realdolmen] which validator i should use in this case? Field required validator (JMWE)? Thanks for your advice.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You'll need to use the "build my own validator" option.
I would caution you against doing this though, it's a horrible thing to do to your users, especially if you have more than a handful of fields to enter. Your humans will not like spending a few minutes entering a story only to have your code say "you can't create this type of thing, I'm going to throw away everything you've just entered"
I'd take a look at the reasons you want to do this. Should these people really be working in different projects? Why can't developers raise requests?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nic Brough -Adaptavist- oh let me clarify our requirement. Actually we would like to display only "Request" and "Bug" in the dropdown menu for Issue Type when requestors create the form.
Is there any solution to this? Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ouioui Zhou
I have to agree with @Nic Brough -Adaptavist- that it probably is not the best idea
However if you want to implement it, you have to build your own validator as already said.
I presume you will need to enter something like following as a script in that Validator
user.groups.flatMap(it => it.includes("my-group-that-is-allowed-to-create-an-issue"))
Regards
Dave
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, @Dave Bosman [Realdolmen] 's solution of a validator is your only option on cloud, and it's clunky. It does however work for all the different ways you can create issues, unlike the Server based Behaviour.
That's why I suggest re-evaluating what you're doing, it sounds like a broken process to me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sometimes it looks like JIRA insists to make our life harder..
Allowing 'Conditions' also in the 'Create' transition will solve this in 2 sec..
Is anyone familiar with another workaround that won't cost us a few hundred of bucks each month (like JMWE)?
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Or Shaked ,
You know, it may sound little old, but making use of project permissions, project roles and groups will solve the issue.
Let me explain
1. In your project, if you have two different types of people, one is project managers and others are developers/business analysts etc.,. If you want to restrict the access to create an issue for a developers, give create issue permission to Project Managers and business analysts only.
Before making this happen, you need to create a new roles project managers and business analysts in your instance and add those roles to the project permissions.
2. Another way is take the same people as above, but in this case you need to use the groups. For this, add the required project managers to one group and business analysts to another group and add this two groups to Create Issue permissions.
Hope I am clear on this.
Apologies, if I have confused you.
Thanks,
Pradeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Pradeep CheekurthiBut initially the guy is asking about creating a SPECIFIED ISSUE TYPE ticket instead of any "issue type in project".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Agreed !
Same need here: i want just my dev team to create "Task" and "Spike", my product team and tech lead to create "Epic" and everyone create "Bug"....
I've been fighting for two days to try to get this with workflow, validators, conditions, ticket securty, etc... but it seems unsolvable.
That's crazy as this feature sounds so "basic".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am afraid that the only option for cloud (and if you use company managed project) is to add 3rd party validator to Create transition.
I am from Forgappify and we have Jira Expression Validator, which is part of the Workflow Building Blocks for Jira free app.
For example, if you want only users with the 'Developers' project role to be able to create Story issues, add Jira Expression Validator to the Create transition with following settings:
1. Assuming you have separate workflows for each issue type:
Jira expression:
user.getProjectRoles(issue.project).reduce(
(isAllowed, role) => isAllowed || ["Developers"].includes(role.name),
false
)
Validation message:
"You must have the Developer project role to create Story issues, but got: " + user.getProjectRoles(issue.project).map(projectRole => projectRole.name)
2. If you don't have separate workflows:
issue.issueType.name == "Story"
? user.getProjectRoles(issue.project).reduce(
(isAllowed, role) => isAllowed || ["Developers"].includes(role.name),
false
)
: true
3. In your case it will be something similar to:
issue.issueType.name == "Task" || issue.issueType.name == "Story"
? user.getProjectRoles(issue.project).reduce(
(isAllowed, role) => isAllowed || ["Developers"].includes(role.name),
false
)
: issue.issueType.name == "Epic"
? user.getProjectRoles(issue.project).reduce(
(isAllowed, role) => isAllowed || ["TechLeaders"].includes(role.name),
false
)
: true
I hope it will help.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.