Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-75942

Default Attachment sort order

XMLWordPrintable

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? 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
              0d116ae5d670 Jamie Crawford
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: