diff --git a/NEWS b/NEWS index 855d768..9198310 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,7 @@ 1.6.8: ? + * Changed the order of exported HTML and CSV notebooks so that after all the + "startup" notes are included, the remaining notes are included in + alphabetical order (instead of reverse chronological order). * Fixed a compatibility problem with newer versions of SQLite. (Luminotes was using a reserved keyword as an identifier.) This only affected those people who installed Luminotes Server themselves. diff --git a/controller/test/Test_notebooks.py b/controller/test/Test_notebooks.py index 461bb48..8958655 100644 --- a/controller/test/Test_notebooks.py +++ b/controller/test/Test_notebooks.py @@ -4512,7 +4512,7 @@ class Test_notebooks( Test_controller ): startup_note_allowed = True previous_revision = None - # assert that startup notes come first, then normal notes in descending revision order + # assert that startup notes come first, then normal notes in alphabetical order for note in notes: if note.startup: assert startup_note_allowed @@ -4592,7 +4592,7 @@ class Test_notebooks( Test_controller ): startup_note_allowed = True previous_revision = None - # assert that startup notes come first, then normal notes in descending revision order + # assert that startup notes come first, then normal notes in alphabetical order for row in reader: note_count += 1 diff --git a/model/Notebook.py b/model/Notebook.py index 2b37cae..4d1f2e2 100644 --- a/model/Notebook.py +++ b/model/Notebook.py @@ -172,7 +172,7 @@ class Notebook( Persistent ): """ Return a SQL string to load a list of the non-startup notes within this notebook. """ - return "select id, revision, title, contents, notebook_id, startup, deleted_from_id, rank, user_id from note_current where notebook_id = %s and startup = 'f' order by revision desc;" % quote( self.object_id ) + return "select id, revision, title, contents, notebook_id, startup, deleted_from_id, rank, user_id from note_current where notebook_id = %s and startup = 'f' order by lower( title );" % quote( self.object_id ) def sql_load_startup_notes( self ): """