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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

551 views 6 12
Read article

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