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).
This commit is contained in:
parent
53c26c6037
commit
4d00c92e3a
3
NEWS
3
NEWS
|
@ -1,4 +1,7 @@
|
||||||
1.6.8: ?
|
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
|
* Fixed a compatibility problem with newer versions of SQLite. (Luminotes
|
||||||
was using a reserved keyword as an identifier.) This only affected those
|
was using a reserved keyword as an identifier.) This only affected those
|
||||||
people who installed Luminotes Server themselves.
|
people who installed Luminotes Server themselves.
|
||||||
|
|
|
@ -4512,7 +4512,7 @@ class Test_notebooks( Test_controller ):
|
||||||
startup_note_allowed = True
|
startup_note_allowed = True
|
||||||
previous_revision = None
|
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:
|
for note in notes:
|
||||||
if note.startup:
|
if note.startup:
|
||||||
assert startup_note_allowed
|
assert startup_note_allowed
|
||||||
|
@ -4592,7 +4592,7 @@ class Test_notebooks( Test_controller ):
|
||||||
startup_note_allowed = True
|
startup_note_allowed = True
|
||||||
previous_revision = None
|
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:
|
for row in reader:
|
||||||
note_count += 1
|
note_count += 1
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,7 @@ class Notebook( Persistent ):
|
||||||
"""
|
"""
|
||||||
Return a SQL string to load a list of the non-startup notes within this notebook.
|
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 ):
|
def sql_load_startup_notes( self ):
|
||||||
"""
|
"""
|
||||||
|
|
Reference in New Issue