disable inline edit

achref_bziouech October 5, 2017

Hello Jira Masters ,

i want to disable the inline edit (click to edit) on a custom field 

could you please help ?

Thanks !

2000.png

 

3 answers

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 5, 2017

Remove the field from the "edit" screen for the issue type.  That prevents users changing it (it looks like a calculated field to me)

Aleksey Dzyapko December 20, 2017

@Nic Brough -Adaptavist-, I've come across with the same problem and I need to have an ability to edit field on Edit Screen, is there any other way to disable inline editing for one specific custom field?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 20, 2017

The only native way is to remove it from the edit screen.  You can't disable in-line edit selectively.

You can try something like Behaviours, which can remove it field-by-field, but a) don't, it's useful for users and b) it's easy to work around it

Aleksey Dzyapko December 20, 2017

Ok, thanks, got it.

Bhakti Prasad Panda May 31, 2019

Hello @Aleksey Dzyapko ,

Can you explain me how you did it as i am also looking for same.

Regards

Bhakti Prasad Panda

1 vote
Andrii Shalankevych July 27, 2021

Add somewhere in .js:

AJS.toInit(function(){
AJS.$(".uneditable").ajaxComplete(function() {
var uneditableElms = AJS.$('.uneditable').parent();
if (uneditableElms.length) {
uneditableElms.removeClass('inactive');
uneditableElms.removeClass('editable-field');
uneditableElms.removeAttr('title');
uneditableElms.find('span.overlay-icon').hide();
}
});
});


and in view template:

#enable_html_escaping()
<span #if ($uneditable) class="uneditable" #end >
#if (${displayParameters.excel_view} || ${displayParameters.escapeHtml})
$textutils.br($textutils.htmlEncode($!value, false))
#else
$!value
#end
</span>

 

Suggest an answer

Log in or Sign up to answer