Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I there a way to disable inline editing of "Security Level" field on issue view screen ?

Paridhi Agarwal March 28, 2018

Hi,

I have applied behaviour script which changes the value of Security Level field on the basis of value in some other custom field. Also it makes Security Level field as read-only.

But on issue view screen, as Behaviour does not work, Security Level field can be edited inline.

Please suggest a way how can I disable inline editing of Security Level field on issue view screen?

1 answer

0 votes
Andy Heinzer
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.
April 2, 2018

If you're using Jira Server, you could add in this java script tag into the announcement banner of Jira. 

<script type="text/javascript"> 
AJS.$(document).ready(function() {
setInterval(function() {
  AJS.$('#security-val').removeClass("editable-field");
  AJS.$('#security-val').children('.icon').hide();
  AJS.$('#security-val').children('.aui-iconfont-edit').remove();
  AJS.$('#security-val').removeClass("aui-iconfont-edit");
AJS.$('#security-val').removeAttr('class');
AJS.$('#security-val').removeAttr( "title" );
}, 200);
 });
</script>

Adding this to that banner would prevent all users from being able to inline edit the security field that appears on Jira issues.  However users that still have the edit issue permission, and the set security permission can still change the value should they edit the issue.

I found that searching our site about disabling a single inline edit field returned me this result from Mizan: https://community.atlassian.com/t5/Jira-questions/Disabling-Quick-edit-inline-edit/qaq-p/135837#M57116

I just tweaked this a bit for the security field value so that it can't be edited inline.

Thanks Mizan.

Suggest an answer

Log in or Sign up to answer