drinkits

How to disable the PDF Preview feature in JIRA 7

  • Copy locally and extract Jira bundled plugin jira-fileviewer-plugin-7.2.1.jar located at ./atlassian-jira/WEB-INF/atlassian-bundled-plugins
  • In extracted folder open file-service.js and delete (or wrap in comment) following lines:
if (!featureManager.isFeatureEnabled("jira.fileviewer.disable.pdf")) {
    selectors.document.push("a[file-preview-type=document]");
}
addDocumentSelector: function addDocumentSelector(sel) {
    pushSingleOrArray(selectors.document, sel);
}
  • Remove same lines from minified file-service-min.js.  You can use JS prettify and minify tools to do this.
  • Save files. Put folder content in ZIP. Rename file to jira-fileviewer-plugin-7.2.1.jar, copy to server and restart Jira.

Tēmas: Noderīgi, Skripti

Minibrūža projekts: kontrolieris » « Script to restart JIRA automatically

1 Komentārs

  1. On Jira 8 – same .jar, editing fileviewer.js (and minified version) does the trick:
    you just have to edit the viewers: [“image”, “document”] array to [“image”]

Atbildēt

Tavs e-pasts netiks publiskots.

*

Copyright © 2020 drinkits

Izstrādājis Anders NorénUz augšu ↑