Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,380
Community Members
 
Community Events
184
Community Groups

hide/show fields depending on a users permissions

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.
Jan 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.

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.
Jan 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

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. 

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!

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)

}

@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.
Apr 04, 2023 • edited

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

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

jira.permission.work.applicationRole.denied = Customer
0 votes
Takafumi Ohtake -Ricksoft-
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Nov 08, 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