hide/show fields depending on a users permissions

Wanda L. Lugo
Contributor
January 25, 2018

I'd like to hide fields depending on permissions.  For example, I want to only Admins and my manager group users to be able to see a specific field in the EDIT screen.  

I want to hide it from users that are not admins or managers.  

4 answers

1 accepted

1 vote
Answer accepted
Ivan Tovbin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 25, 2018

Hi Wanda,

You'll need a 3rd party addon to achieve this. Something like Secure Fields for Jira or Field Security Plugin for Jira.

Wanda L. Lugo
Contributor
January 25, 2018

I see.  Can i just remove it from the Edit screen and add it to the Workflow screen? 

I've also having a hard time adding it to the Workflow screen...

Like Heather R likes this
Ivan Tovbin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 25, 2018

I suppose you can remove these fields from the Edit screen, which will prevent ANYONE from editing their values. 

After that create a separate screen and add your fields to it. Then create a workflow transition from a status and make it point right back to that status. Attach the screen you have created to this transition and also add a condition that would allow only members of a certain user group/project role to trigger it. This way those users will be able to set/edit your field values by triggering this transition but only as long as the issue is in that status. For other statuses you'll have to create separate similar transitions.

Naturally this can turn into a maintenance nightmare very quickly, especially if you have many complex workflows with a lot of statuses, so I strongly advise NOT to use this method, unless you absolutely have to.

Like # people like this
Wanda L. Lugo
Contributor
January 25, 2018

Thank you so much!  I will heed caution.  For now, until they allow me to purchase addons, I removed it, added a new screen, and added it to a part of the workflow where only managers have permission to access.  

 

thank you again for your help and prompt response. 

Ulrich Loerts
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 20, 2021

But even the user is not in that specific role and can't see the transition, he can see the field-changes in the issues activity-tab!

1 vote
Alex Cheng
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 9, 2021

If you are using data center version of JIRA, behavior scripts could be a solution.

Add below in Initialiser of ScriptRunner behavior setting:

import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.jira.groovy.user.FormField

def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
FormField fieldYouWantShowToCertainUser = getFieldById("fieldIdYouWant")

if ( currentUser != "userYouWantFieldShowTo") {

fieldYouWantShowToCertainUser.setHidden(true)

}
siva
Contributor
July 16, 2021

@Alex Cheng 

I have tried an alternative script which works but.
When the field is filled with data it is visible to all users.

How can i hide it from View screen ? any java script i can use?

Like Manali Butey likes this
Michael Kornatzki
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 4, 2023

Hello siva,

did you found a solution?

I have the same requirement.
A filled field should be hidden for other users in the view screen

Santhosh Kumar Arogyaswamy
Contributor
December 18, 2024

Hi,

Is there any solution to hide the field all the time, for specific users?

 

0 votes
Christoph Päper
Contributor
March 31, 2022

Shouldn't this be somehow possible with workflow properties? Something like this:

jira.permission.work.applicationRole.denied = Customer
0 votes
Takafumi Ohtake -Ricksoft-
Atlassian Partner
November 8, 2021

If you are using the cloud version of Jira, Field Level Permission Apps for Jira Cloud are available.

Hide fields or make fields read-only based on user, group, project role, and so on.

(Please note that I'm one of the folks behind Ricksoft that is the vendor of one of the apps.)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events