Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-67855

Default Attachment sort order

XMLWordPrintable

    • 2
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      Atlassian Status as of 13 August 2014

      Hi All,

      Thanks so much for your votes and comments on this feature request.

      After analysis of this issue we decided it is not something we can put on our short to mid term roadmap. Therefore we think it is only fair to not keep this issue as open and close it as "won't fix". We will take this feedback into account as we work on ongoing design and usability improvements to the view issue page.

      Cheers,
      Jason
      JIRA Product Management
      jwong (at) atlassian (dot) com

      Original description
      When using JIRA, I often change the attachment sort order. I would really like to have a 'default sort order' so I don't have to do it as often.

      Workaround:

      This is an unsupported, and hacky workaround but hopefully it helps some people. You can use the following code in your announcement banner:

      <script>var direction = "asc"; //Other option is "desc"
      var sortBy = "dateTime"; //Other option is "fileName"
      
      var origUrl = window.location.href;
      var patt = /browse\/[A-Z][A-Z]+-[0-9]+/;
      var key = new RegExp("[A-Z][A-Z]+-[0-9]+");
      
      var sort = "?attachmentSortBy="+sortBy+"&attachmentOrder="+direction+"#attachmentmodule";
      if(patt.test(origUrl) && !JSON.parse(sessionStorage.getItem('hasReloaded' + key))){
      	location.assign(origUrl + sort);
      	sessionStorage.setItem('hasReloaded' + key, 'true');
      } else {
          sessionStorage.setItem('hasReloaded' + key, 'false');
      }</script>

      This will automatically switch to sorting by Date Ascending. You can tweak it to suit your needs.
      This will only work for JIRA server installations. JIRA Cloud does not support inserting custom code into the announcement banner.

      If you are on cloud, or are an individual user that wants to have this functionality without inserting it for everyone, you can use the user script: JIRA Order Attachments by Date.user.js within Tampermonkey for Chrome, or Greasemonkey for Firefox.

              Unassigned Unassigned
              1c6a16beb3a1 Mark Gancsos
              Votes:
              61 Vote for this issue
              Watchers:
              42 Start watching this issue

                Created:
                Updated: