I am trying to use the Behaviours plugin to hide the Story points field except some user in specific project.
I get the warning: The field Story Points is not hideable, so it will only be hidden when the issue is editable. More info.
But the Link is not working and the field is shown for all user also in edit screen. Can you give me some more information or a tip for workaround?
JIRA Version : 6.3.8
Behaviour Plugin - Adaptavist ScriptRunner for JIRA Standard Edition: 3.1.4
Thanks in advance
Best Regards
Hi GoodGame Studios,
I have enclosed a sample script and screenshot of its configuration using the Behaviours plugin which shows how you apply a behaviour on the Story Points field which will get the Story points field by its ID and only display this to users in a certain group and hide it to all other users.
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.user.util.UserUtil // Get pointers to the custom field(s) required def cf = getFieldById("customfield_10008") // Get the current logged in user def user = ComponentAccessor.getJiraAuthenticationContext().getUser().name // Get a pointer to the resticted fields group UserUtil userUtil = ComponentAccessor.getUserUtil() def group = userUtil.getGroupObject("restricted-fields") // By default make the field visible to all users. cf.setHidden(false) if(userUtil.getGroupsForUser(user).contains(group)){ // If the user is in the restricted groups field then hide the field cf.setHidden(true) }
image2016-5-12 17:59:39.png
This script was developed on JIRA 6.4.12 using the latest version of ScriptRunner.
I hope this helps
Thanks
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alex,
If this answer resolved your issue can you please accept it to mark it as correct to help other users searching for a similar solution.
Kristian
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.