I’m unable to get JabRef 3.7 to save out an existing database with the references sorted in a new order in the output file–specifically, I’d like them sorted by bibtexkey.
Under the File menu, the “Database properties” window provides a section on “Save sort order” that appears to offer the capability that I’m after, but I can’t get it to work.
I clicked the radio button by “Save entries ordered as specified” and then set the “Primary sort criterion” to bibtexkey. But when I then saved the file, the sort order was unchanged from the input file, which is most definitely not sorted by bibtexkey. Evidently, I have the wrong idea about what these “Save sort order” options are meant to do.
Thanks for your reply. My workflow is in the UI, exactly as you say.
Inspired by your comment that this should work, I checked into things a bit further and found what looks like a bug:
JabRef’s sort order is influenced by whether the reference entry contains the “crossref” field. In the output, all of the references that do contain this field appear first (sorted within this group). Then, all of the references that do not contain this field follow separately (again, sorted correctly within this group).
And as documented in the link above on github, the behavior is actually correct (entries with crossref need to appear first for bibtex to work correctly).