Can I configure user / group who can view a custom field?

Hi All,

I have few questions about JIRA related to custom field.

1. I want to configure who can view a custom field.

Practically, i need a custom field that visible for internal users and hidden for external users.

Is it possible to do that? And how if that is possible?

2. Is there any permissions setting for issue navigator and export tools?

Related to point 1, i don't want any hidden field can be viewed by external users on issue navigator / export tools.

I really appreciate your helpful answer :)

6 answers

1 accepted

field level secirity is not possible in jira as of now, check this

https://jira.atlassian.com/browse/JRA-1330

some third party plugin is there, you can try with this

https://marketplace.atlassian.com/plugins/com.quisapps.jira.jfs

or you can implement this by using javascript

Thx. But what do you mean i can implement this by using javascript, could you explain me in detail?

check my another answer, i gave javascript to hide field for specific group

Please help me.. thanks

Please help me

1# you check this link and see Nic's comment.

2# you can set the permissions to users/roles/groups on PermissionScheme->Browse Project

Thanks. But for 2# i mean i want to limit groups who can export & configure column on issue navigator, not limitation for browsing project. Any solution for this one?

try with this javascript

<script type="text/javascript">  
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
hideField();    
});
hideField();
function hideField(){
        var user=getCurrentUserName();			
		if(isUserInGroup(user,'Developers')){
			//to hide the Activity Tab
			$("#customfield_10571").closest('div.field-group').hide();
		}else {
			AJS.$("#customfield_10571").closest('div.field-group').show();
		}

}
function getCurrentUserName()
{
var user;
     AJS.$.ajax({
        url: "/rest/gadget/1.0/currentUser",
        type: 'get',
        dataType: 'json',
        async: false,
        success: function(data) {
            user = data.username;
        }
     });
     return user;
}
  
  
function getGroups(user)
{
var groups;
     AJS.$.ajax({
        url: "/rest/api/2/user?username="+user+"&expand=groups",
        type: 'get',
        dataType: 'json',
        async: false,
        success: function(data) {
            groups = data.groups.items;
        }
     });
     return groups;
}
function isUserInGroup(user, group){
    var groups = getGroups(user);
    for (i = 0; i < groups.length; i++){
         if (groups[i].name == group){
              return true;
         }
    }
    return false;
}
    

</script>

Wow.. thanks a lot!

Sorry i'm a newbie for this thing, then where should i put this script?

1. put this javascript on custom field description in field configuration

2. load it as a webresource module in plugin, check this

https://developer.atlassian.com/display/JIRADEV/Custom+Fields+that+use+CSS+or+JavaScript+Web+Resources+in+JIRA+5.0

3. add it in footer.jsp

i suggest to load javascript as webresource!!

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,317 views 14 20
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot