It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Need to hide a feild on particular project role/group

Faiza Kazmi Apr 22, 2019

i want to hide a field for a group named as reviewer like he should not view the field while creation,editing and view

2 answers

1 vote
Faiza Kazmi Apr 22, 2019

i have installed the behavior script runner  plugin but it didn't work my me.my jira version is 7.0 and script runner version is 5.1.6.2 

0 votes
Antoine Berry Apr 23, 2019

Hi @Faiza Kazmi ,

Please use this snippet in the behaviours Initializer : 

import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
import com.atlassian.jira.component.ComponentAccessor

@BaseScript FieldBehaviours fieldBehaviours

def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def groupManager = ComponentAccessor.getGroupManager()
def yourField = getFieldById("customfield_11011")

yourField.setHidden(!groupManager.getUsersInGroup("reviewer").contains(currentUser))

Antoine

Antoine Berry May 09, 2019

Hi @Faiza Kazmi , did that work for you ?

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Marketplace Apps & Integrations

Demo Den Ep. 4: Continuous Integration with CircleCI & Jira Software

Get ready! Demo Den Episode 4 is coming your way on Tuesday, May 28, 2018 with a Continuous Integration and Delivery special demo. CircleCI Director of Solutions Engineering, Eddie Webb will show us ...

374 views 0 4
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you