allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [1/2] git commit: [#6308] Move tickets in a consistent order
Date Thu, 30 May 2013 20:22:31 GMT
Updated Branches:
  refs/heads/cj/6308 [created] 9bd1343cc


[#6308] Move tickets in a consistent order

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


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

Branch: refs/heads/cj/6308
Commit: a6abdb025122f5a234793c70bc09ce8422030375
Parents: 956b6c5
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Thu May 30 19:48:46 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Thu May 30 20:21:47 2013 +0000

----------------------------------------------------------------------
 ForgeTracker/forgetracker/model/ticket.py          |    2 +-
 .../forgetracker/tests/functional/test_root.py     |    7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a6abdb02/ForgeTracker/forgetracker/model/ticket.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/model/ticket.py b/ForgeTracker/forgetracker/model/ticket.py
index bc2d0c2..204948f 100644
--- a/ForgeTracker/forgetracker/model/ticket.py
+++ b/ForgeTracker/forgetracker/model/ticket.py
@@ -231,7 +231,7 @@ class Globals(MappedClass):
         tracker = AppConfig.query.get(_id=destination_tracker_id)
         tickets = Ticket.query.find(dict(
             _id={'$in': [ObjectId(id) for id in ticket_ids]},
-            app_config_id=c.app.config._id)).all()
+            app_config_id=c.app.config._id)).sort('ticket_num').all()
         filtered = self.filtered_by_subscription({t._id: t for t in tickets})
         original_ticket_nums = {t._id: t.ticket_num for t in tickets}
         users = User.query.find({'_id': {'$in': filtered.keys()}}).all()

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a6abdb02/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index b7e7dd8..7423e2b 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -2393,8 +2393,13 @@ class TestBulkMove(TrackerTestController):
         assert_equal(len(admin_email), 1)
         assert_equal(len(monitoring_email), 1)
         admin_email_text = admin_email[0].kwargs.text
+        assert_in('test:bugs:#1 --> test2:bugs2:#1 A New Hope', admin_email_text)
+        assert_in('test:bugs:#2 --> test2:bugs2:#2 The Empire Strikes Back', admin_email_text)
+        assert_in('test:bugs:#3 --> test2:bugs2:#3 Return Of The Jedi', admin_email_text)
         monitoring_email_text = monitoring_email[0].kwargs.text
-        assert_equal(admin_email_text, monitoring_email_text)
+        assert_in('test:bugs:#1 --> test2:bugs2:#1 A New Hope', monitoring_email_text)
+        assert_in('test:bugs:#2 --> test2:bugs2:#2 The Empire Strikes Back', monitoring_email_text)
+        assert_in('test:bugs:#3 --> test2:bugs2:#3 Return Of The Jedi', monitoring_email_text)
 
     @td.with_tool('test2', 'Tickets', 'bugs2')
     def test_monitoring_email_public_only(self):


Mime
View raw message