It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
Hi,
I would like to remove a resolution value from the resolution dropdown if the issue is not a part of a security scheme.
Is that possible with behaviours?
@Jamie Echlin (Adaptavist) - Any ideas?
Hi Clem,
I have attached below a sample script which can be added as a behaviour on the resolution field in order to only display certain resolutions to users who are in a specific group.
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.sal.api.user.UserManager import static com.atlassian.jira.issue.IssueFieldConstants.RESOLUTION def constantsManager = ComponentAccessor.getConstantsManager() def userUtil = ComponentAccessor.getUserUtil() log.debug ComponentAccessor.getComponent(UserManager) def currentUser = ComponentAccessor.getJiraAuthenticationContext().getUser() if (userUtil.getGroupNamesForUser(currentUser.name).contains("jira-developers")) { def allowedResolutions = constantsManager.getResolutionObjects().findAll { it.name in ["Won't Fix", "Incomplete", "Cannot Reproduce"] }.collectEntries { [(it.id): it.name] } getFieldById(RESOLUTION).setFieldOptions(allowedResolutions) }
This should allow you to maintain a group of all users in a security scheme in order to only ensure they have access to certain resolutions.
I hope this helps
Kristian
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.
Read moreAs 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...
Connect with like-minded Atlassian users at free events near you!
Find a groupConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.
Start an AUGYou're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.