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

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

0 votes
Answer 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
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

236 views 1 2
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