You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hi,
I solved this issue using Script runner's behavior, used below code in initializer and it showed Issuetypes based on logged in user, you can validate user against project roles or even groups
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.roles.ProjectRoleManager
import static com.atlassian.jira.issue.IssueFieldConstants.ISSUE_TYPE
def projectRoleManager = ComponentAccessor.getComponent(ProjectRoleManager)
def allIssueTypes = ComponentAccessor.constantsManager.allIssueTypeObjects
def user = ComponentAccessor.jiraAuthenticationContext.loggedInUser
def issueTypeField = getFieldById(ISSUE_TYPE)
def availableIssueTypes = []
//use this def and if code to check project roles
/*def remoteUsersRoles = projectRoleManager.getProjectRoles(user, issueContext.projectObject)*.name
if ("Testers" in remoteUsersRoles)
{
availableIssueTypes.addAll(allIssueTypes.findAll { it.name in ["Task", "Experiment"] })
}
*/
//use this def and if code to check groups
def remoteUsersRoles = ComponentAccessor.getGroupManager().isUserInGroup(user, "jira-administrators")
if (remoteUsersRoles) {
availableIssueTypes.addAll(allIssueTypes.findAll { it.name in ["Task", "Experiment"] })
}
else {
availableIssueTypes.addAll(allIssueTypes.findAll { it.name in ["Task"] })
}
issueTypeField.setFieldOptions(availableIssueTypes)
Hope this helps.
Regards,
Priyanka
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.
Hi @Z B , @Priyanka Lavania
I have a similar requirement, could you suggest me how to achieve this...
Total of 10 components in my project and 2 issues types. Based on the issue type components will display.
For e.g.- Defect and Enhancement are the two issue types in a project if i select the Defect then 5 components should display.
How do I achieve these using behaviors?
Regards,
Andrews
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Can you please explain where do I need to add this script?
I cannot find behavior in Scrip Runner
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is not possible in JIRA. See https://jira.atlassian.com/browse/JRA-5865
Look at the issue and its linked issues to find different workarounds.
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.
As Jobin said, this isn't possible. There are some work-arounds in the jra-5865 he points to, but all have some kind of problem. the cleanist way, in my opinion, to do it is to put the different issue types in different projects since permissions are at the project level.
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.
Scriptrunner has an option on behaviours to do this on their newest version:
https://scriptrunner.adaptavist.com/5.5.0.3-jira8/jira/recipes/behaviours/restricting-issue-types.html
Hope it helped.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I used behaviour to do this for groups, which worked like charm. Thanks
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Cindy,
Can you elaborate on how to achieve this? I want to restricts "Support group" to create bugs but should not be allowed to create stories.
Thanks,
Nagendra
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.
You could use the addon Jira workflow toolbox to create a validator on the create transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are JIRA Admin, You can create issue scheme and associate your project to restrict issue types as you need. I have same issue and solved creating scheme.
Note: If you have already issue created which is not part of your required list then those will be prompted update to existing ones
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Contact me on youngplugins@gmail.com for a good deal on the plugin "Issue Type Filters"
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.
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.