Hide tabs like Issue Types etc from Project Role Administrators

Devu Heda
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.
February 3, 2012

Hi

We do not want to expose the newly added tabs like Issue Type, Workflows, Screens, Fields, Permission, Issue Security, Notifications etc from Project Role of Administrator (Administartor of a single Project)

We do not provide Administrators the ability to change anything its all controled by JIRA Administartors

Any simple way to turn off the Tabs ?

Thanks

2 answers

1 accepted

4 votes
Answer accepted
Dieter
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.
February 3, 2012
<script>
(function($){
   $(document).ready(function(){
         AJS.$('li.menu-item[title="Workflows"]').hide();
         AJS.$('li.menu-item[title="Issue Types"]').hide();
   });  
})(AJS.$);
</script>

This snippet hides the Workflows and Isse Types menue when added to the system banner. You cold also create a plugin. What's missing yet is the check for jira-administrators. I remember there is a snippet in aac how to check if the user is a jira-administrator using a rest call.

JamieA
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.
February 3, 2012

Presumably wouldn't work unless the user has their language set to English... guess there are no IDs on the elements...?

Dieter
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.
February 3, 2012

you are right, works only for English language ... some enclosed elements have ids so this could be improved

Dieter
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.
February 3, 2012

Replacing the two language specific hide() commands above by these makes the solution language independant

AJS.$('#view_project_issuetypes_tab').parent().hide();
AJS.$('#view_project_workflows_tab').parent().hide();

srinivasp
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.
February 29, 2012

Though the tabs are hidden, the user can be able to see the sections on summary page. Is there a way to hide them on Summary page as well?

Dieter
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.
February 29, 2012
Sure, this can be done. The receipt is: find the div element for the section, e.g. using Chrome, right click, then inspect element. If this element has an id, you just add a line for this id in the code above. E.g. If the id is abc, you add: AJS.$("#abc").hide()
srinivasp
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.
February 29, 2012

If this is handled with JS, the ordering will become uneven. for example, the existing display is having 2 colums with 5 elements in each section. If i hide 4 elements in the first column, then the display will become uneven with one element in first column and 5 elements in 2nd column. So if there is way to handle this from server side, the ordering will be taken care automatically. Any idea?

srinivasp
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.
February 29, 2012

Hi Dieter, Any comment please?

Dieter
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.
February 29, 2012
Moving elements to other parents can be done as described in this document http://www.elated.com/articles/jquery-removing-replacing-moving-elements/ using the appendTo method. Something like this moves element with id source after the last child of div with id target: AJS.$("#source").appendTo(AJS.$("#target"))
srinivasp
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.
February 29, 2012

A similar question, on Issue summary page(issuesummaryblock.vm), there are two columns specified with class class="property-list two-cols" for <ul> tag. I searched for the css with the mentioned class but i did not find. Is there a way to make it three columns?

srinivasp
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.
March 1, 2012

Hi Dieter, Any update please??

Jen Anderson January 9, 2014

Thanks to Dieter for sharing! I modified the script a bit in order to hide the "Projects" menu:


<script>
(function($){
$(document).ready(function(){
AJS.$("#browse_link").hide();
});
})(AJS.$);
</script>

I searched for "hide projects menu" without luck - hopefully if anyone else is trying to accomplish this they'll find this response.

0 votes
Jen Anderson January 9, 2014

Thanks to Dieter for sharing! I modified the script a bit in order to hide the "Projects" menu:


<script>
(function($){
$(document).ready(function(){
AJS.$("#browse_link").hide();
});
})(AJS.$);
</script>

I searched for "hide projects menu" without luck - hopefully if anyone else is trying to accomplish this they'll find this response.

Suggest an answer

Log in or Sign up to answer