Attachment order
dstillman
Zotero Team
This discussion was created from comments split from: Attachment order (and reordering).
Upgrade Storage
Is it just me or a common bug?
There are no known bugs related to ordering. Attachments are ordered by the attachment title by default. There's an 'sortAttachmentsChronologically' preference that you can toggle on in the Config Editor in the Advanced pane of the preferences.
Yes, since I started using Zotero in 2011 that has been the default behaviour, but now for some reason it's changed, as you can see here: https://i.ibb.co/vBH3JNW/Attachment-Order-2.png
The option "extensions.zotero.sortAttachmentsChronologically" is set to "false".
Before I could sort attachments by adding a number at the beginning (0, 1, 2, and so on). Is that not considered part of the "title" now?
I've just updated the screenshot to show that the order is not alphabetical in either way: "0, 3, 8, 7" or "F, (The) D, S, C".
0, 3, 8, 7 is wrong, though. Does that persist after restarting Zotero?
To be clear, this is about child attachments to an item? If so, can you show that in the screenshot?
Yes, child attachments to an item.
var rows = ZoteroPane.getSelectedItems()[0].getAttachments().map(x => Zotero.Items.get(x)); var collation = Zotero.getLocaleCollation(); rows.sort((a, b) => collation.compareString(1, a.getField('title'), b.getField('title'))); Zotero.Prefs.get('sortAttachmentsChronologically') + "\n" + JSON.stringify(rows.map(x => x.getField('title')))false["0 - Front Matter.pdf","3 - The Decay of Lying.pdf","7 - The Critic as Artist.pdf","8 - The Soul of Man Under Socialism.pdf"]
Notes however work normally (i.e. are displayed alphabetically, regardless of when they were added or edited).
https://sm.ms/image/cy3a6eWG1CloXrp
Plugins: Zotfile, DOI, BibTex, Mdnotes, Zutilo.
https://s3.amazonaws.com/zotero.org/images/forums/u3899/487r44904i5flw110cra.png
https://s3.amazonaws.com/zotero.org/images/forums/u3899/5wmy6tmpitdyqdg6oj20.png
https://s3.amazonaws.com/zotero.org/images/forums/u3899/cd3d12kjacfb8txhi2yx.png
Perhaps the right-hand pane sort order is by Accessed date (oldest first)?
https://s3.amazonaws.com/zotero.org/images/forums/u3899/em75vn3tcyjakhwcw895.png
https://s3.amazonaws.com/zotero.org/images/forums/u3899/lc5qiusklc06fuxyfc8b.png