Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Field attachment settings

Rob Marshall April 9, 2019

Is there a way of setting preferences for how Attachments are sorted/displayed in Issue Types?
For example, Sort By Date, Descending and List
If I log off Jira, these settings are lost and revert back to the default which is Sort By Name, Ascending but List remains

We are on Jira v7.3.2

1 answer

1 accepted

1 vote
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 17, 2019

Hi Rob,

There is not currently a way to do this natively in Jira server.   I did find a feature request for this over in JRASERVER-67855 I would recommend voting on this issue, and maybe watching it for updates to this.

Interestingly though, that request ticket does have a work-around here that might be helpful.   From that page:

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.

I found that work-around does appear to work on my Jira 8.0.2 install as well, so I would suspect this could help in your 7.3.2 version as well.

Cheers,

Andy

Rob Marshall April 18, 2019

Thanks Andy.

Cheers!

Rob

Suggest an answer

Log in or Sign up to answer