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.

Kategorijas: Noderīgi, Skripti

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

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

Jūsu e-pasta adrese netiks publicēta. Obligātie lauki ir atzīmēti kā *

Autortiesības © 2021 drinkits

Theme by Anders NorenLēkt uz augšu ↑