I have written a js,to make a custom field read only,which is used in editable screen.
Seem below code is not working.
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
AJS.$('#showmore').remove();
var editableElms = AJS.$('#field-customfield_10503');
editableElms.css({ "width": "557px", "overflow": "hidden", "display": "inline-block"});
var editButton = AJS.$('#opsbar-edit-issue_container a');
var issueId;
if(editButton){
var href = editButton.attr("href");
if(href){
if(href.indexOf('?id=') > -1){
issueId = href.substring(href.indexOf('?id=')+4);}}
}
var url = ("https://mcb.customerxps.com:2504/efm/fetch.jsp?id=").concat(issueId);// Change ip and port here
AJS.$(" <a id='showmore' target='_blank' href=url >Show more</a>").insertAfter(AJS.$("#field-customfield_10503 p").first());
AJS.$('#showmore').attr("href", url);
AJS.$('#rowForcustomfield_12000').css({"width":"1650px", "height":"300px","overflow":"auto","white-space":"nowrap" });
//AJS.$('#rowForcustomfield_11801').css({"width":"1650px", "height":"300px","overflow":"auto"});
AJS.$('#peoplemodule').hide();
// AJS.$('#datesmodule').hide();
AJS.$('#greenhopper-agile-issue-web-panel').hide();
// AJS.$('#changehistory-tabpanel').hide();
// AJS.$('#activity-stream-issue-tab').hide();
var readOnly = AJS.$('#customfield_12600');
readOnly.attr("readonly", true);
});