Use a more stable sort for the open changes of a user

Its very frustrating to update changes and have them move around
on you in your own dashboard because their last update time has
just incremented.

Instead we store by the creation date and the change id, ensuring
we have a stable sort that never changes, even if the change gets
updated by someone.

Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-01-14 20:15:00 -08:00
parent bb22bab132
commit 3ffac27940

View File

@@ -24,7 +24,7 @@ public interface ChangeAccess extends Access<Change, Change.Id> {
@PrimaryKey("changeId")
Change get(Change.Id id) throws OrmException;
@Query("WHERE owner = ? AND open = true ORDER BY lastUpdatedOn DESC")
@Query("WHERE owner = ? AND open = true ORDER BY createdOn, changeId")
ResultSet<Change> byOwnerOpen(Account.Id id) throws OrmException;
@Query("WHERE owner = ? AND open = false ORDER BY lastUpdatedOn DESC LIMIT 5")