I’m using export filters for exporting my library to several formats (html, rtf,…). Till Jabref 4.x I could sort my library by year descending order and exported data was sorted in this way. Since Jabref 5.x the sort order is not applied and stadard ascending order of the year is applied. Is this a bug?
In Options → Preferences, Tab File, you can set the Export sort order.
(a similar option is available in Library → Library properties too. This option should overwrite the order set in the general preferences).
Note: I am not sure if it affects the way the file is saved or the way the file is exported (or both). Your feedback is welcome.
Sorry, this setting (“Export in current table sort order”) doesn’t affect the export sort order (or not anymore). I am using this setting in general preferences as well as library properties. I think this only affects the way the bib file is saved, but not the custom exports.
Thank you @2bein for clarifying that the items alter the save order and not export order.
I have open an issue to clarify this point (UI: "Export order" --> "Save order" · Issue #7517 · JabRef/jabref · GitHub)
Maybe you could open an issue to have the capability to change the export order re-instated.
@2bein The sort order is applied to the Custom exports as well.
Di you restart JabRef after changing the preferences?
Edit// I think you might hit a bug
Thanks for the good support here… I hope this bug is cleared soon. However, I commented in Issue #7517 that it would be better to have “save sort sorder” and “export sort order” as separated options. “Save sort order” should stay fix e.g. when you use file versioning like SVN for the library.
@2bein Good news, we found and fixed the bug where the sort order was not respected, and we are about to rename the settings to clarify what is export and save.
Sorry for the late response, but I was still on v4.3 and was not able to update to 5.3 until now.
However, neither the save sort order in library proberties nor the the export sort order in file preferences works with the option “use current table sort order”. Also I have expirienced that when I open an old library from v4.3, and instantly switch to “keep original order” in library as well file preferences, the save sort order is changed! It looks that “Use specified order” is overwriting the other options in both cases, although the radio button is not active - can you check this?
Also I have a problem with the sort order of the bibtex fields in each entry. All my fields are changed with v5.3 which gives a mess in my SVN system. In file preferences the option “Always reformat BIB file on save and export” is of course unchecked. In Options… “Customize entry types”, I cannot change the order of the fields. Where do I set this and why is the order of the fields changed? (Should I make a new thread for that?)
Hmm. This seems like something is/was wrong with the preferences migration. Can you please try to reset your preferences (and restart JabRef afterwards) and then try to set the save order in the library properties?
I’ve resetted the preferences, also did an uninstall and clean reinstall. But “Use current table sort order” doesn’t change save order or export order. It looks like after restart, the first time save or export it works, but the next saving or exporting is not using a changed table sort order.
Hmm Still odd, we need to check this out again.
Can you try to add some steps how to reproduce it?
e.g. 1. Sort table by Date
- Change export order to XXX
2.Do an export of all? selected entries?
I figured out that only the sort order that is active at open of the file is used for export sort order. Changing the sort order by tabs doesn’t affect the export sort order anymore!
One example:
- Options… File… Export sort order: “Use current table sort order”… Save
- On opening, table is sorted by Date (descending)
- File… Export… Export all entries (same for selected entries!)… Filetype: HTML (e.g.)…Filename: arbitrary… Save
Result is OK - Sort table by Date (ascending)
- repeat step 1 (different file name)
Result: Entries are still sorted by descending date - Sort table by Author
- repeat step 1 (different file name)
Result: Entries are still sorted by date (descending)
Workaround: Sort table e.g. by author… close Jabref (saving the bib file not necessary)… open Jabref with last file (still sorted by author)… export… Result is sorted by author
Haven’t tested, but is for library option “save sort order”, there might be the same reason that causes problems.