allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject git commit: [#4596] ticket:312 Sort tickets descending by default
Date Tue, 16 Apr 2013 00:46:34 GMT
Updated Branches:
  refs/heads/master 11c9c489e -> 630309eed


[#4596] ticket:312 Sort tickets descending by default


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/630309ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/630309ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/630309ee

Branch: refs/heads/master
Commit: 630309eed49f0bcb18ac36e086630ce20364ae56
Parents: 11c9c48
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Thu Apr 11 12:58:35 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Apr 16 00:46:03 2013 +0000

----------------------------------------------------------------------
 ForgeTracker/forgetracker/model/ticket.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/630309ee/ForgeTracker/forgetracker/model/ticket.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/model/ticket.py b/ForgeTracker/forgetracker/model/ticket.py
index aa8dd88..3660257 100644
--- a/ForgeTracker/forgetracker/model/ticket.py
+++ b/ForgeTracker/forgetracker/model/ticket.py
@@ -678,7 +678,7 @@ class Ticket(VersionedArtifact, ActivityObject, VotableArtifact):
         """
         limit, page, start = g.handle_paging(limit, page, default=25)
         q = cls.query.find(dict(query, app_config_id=app_config._id, deleted=deleted))
-        q = q.sort('ticket_num')
+        q = q.sort('ticket_num', pymongo.DESCENDING)
         if sort:
             field, direction = sort.split()
             if field.startswith('_'):
@@ -727,7 +727,7 @@ class Ticket(VersionedArtifact, ActivityObject, VotableArtifact):
         limit, page, start = g.handle_paging(limit, page, default=25)
         count = 0
         tickets = []
-        refined_sort = sort if sort else 'ticket_num_i asc'
+        refined_sort = sort if sort else 'ticket_num_i desc'
         if  'ticket_num_i' not in refined_sort:
             refined_sort += ',ticket_num_i asc'
         try:


Mime
View raw message