Skip to content

Commit e1bf7c5

Browse files
author
Richard Jones
committed
merge from HEAD
1 parent 5481f7c commit e1bf7c5

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

doc/FAQ.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Roundup FAQ
33
===========
44

5-
:Version: $Revision: 1.16 $
5+
:Version: $Revision: 1.16.2.1 $
66

77
.. contents::
88

@@ -160,6 +160,24 @@ Make sure that the TRACKER_WEB setting in your tracker's config.py is set
160160
to the URL of the tracker.
161161

162162

163+
How is sorting performed, and why does it seem to fail sometimes?
164+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
165+
166+
When we sort items in the hyperdb, we use one of a number of methods,
167+
depending on the properties being sorted on:
168+
169+
1. If it's a String, Number, Date or Interval property, we just sort the
170+
scalar value of the property. Strings are sorted case-sensitively.
171+
2. If it's a Link property, we sort by either the linked item's "order"
172+
property (if it has one) or the linked item's "id".
173+
3. Mulitlinks sort similar to #2, but we start with the first
174+
Multilink list item, and if they're the same, we sort by the second item,
175+
and so on.
176+
177+
Note that if an "order" property is defined on a Class that is used for
178+
sorting, all items of that Class *must* have a value against the "order"
179+
property, or sorting will result in random ordering.
180+
163181
-----------------
164182

165183
Back to `Table of Contents`_

doc/customizing.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,25 @@ Create an item in the database. This is generally used to create items
548548
in the "definitional" classes like "priority" and "status".
549549

550550

551+
A note about ordering
552+
~~~~~~~~~~~~~~~~~~~~~
553+
554+
When we sort items in the hyperdb, we use one of a number of methods,
555+
depending on the properties being sorted on:
556+
557+
1. If it's a String, Number, Date or Interval property, we just sort the
558+
scalar value of the property. Strings are sorted case-sensitively.
559+
2. If it's a Link property, we sort by either the linked item's "order"
560+
property (if it has one) or the linked item's "id".
561+
3. Mulitlinks sort similar to #2, but we start with the first Multilink
562+
list item, and if they're the same, we sort by the second item, and
563+
so on.
564+
565+
Note that if an "order" property is defined on a Class that is used for
566+
sorting, all items of that Class *must* have a value against the "order"
567+
property, or sorting will result in random ordering.
568+
569+
551570
Examples of adding to your schema
552571
---------------------------------
553572

0 commit comments

Comments
 (0)