allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject allura git commit: [#8177] Exclude deleted tickets from bin counts
Date Wed, 24 Jan 2018 22:49:33 GMT
Repository: allura
Updated Branches:
  refs/heads/master 318a6d66a -> 2c11a9278


[#8177] Exclude deleted tickets from bin counts


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

Branch: refs/heads/master
Commit: 2c11a92782f64f7d8b4e9db5fab4620da4d7f6fa
Parents: 318a6d6
Author: Kenton Taylor <ktaylor@slashdotmedia.com>
Authored: Tue Jan 23 18:07:45 2018 +0000
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Wed Jan 24 17:49:21 2018 -0500

----------------------------------------------------------------------
 ForgeTracker/forgetracker/model/ticket.py                  | 2 +-
 ForgeTracker/forgetracker/tests/unit/test_globals_model.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/2c11a927/ForgeTracker/forgetracker/model/ticket.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/model/ticket.py b/ForgeTracker/forgetracker/model/ticket.py
index 990e8d7..8f64ed1 100644
--- a/ForgeTracker/forgetracker/model/ticket.py
+++ b/ForgeTracker/forgetracker/model/ticket.py
@@ -194,7 +194,7 @@ class Globals(MappedClass):
                 # skip queries with $USER variable, hits will be inconsistent
                 # for them
                 continue
-            r = search_artifact(Ticket, b.terms, rows=0, short_timeout=False)
+            r = search_artifact(Ticket, b.terms, rows=0, short_timeout=False, fq=['-deleted_b:true'])
             hits = r is not None and r.hits or 0
             self._bin_counts_data.append(dict(summary=b.summary, hits=hits))
         self._bin_counts_expire = \

http://git-wip-us.apache.org/repos/asf/allura/blob/2c11a927/ForgeTracker/forgetracker/tests/unit/test_globals_model.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/unit/test_globals_model.py b/ForgeTracker/forgetracker/tests/unit/test_globals_model.py
index e3945dc..700a222 100644
--- a/ForgeTracker/forgetracker/tests/unit/test_globals_model.py
+++ b/ForgeTracker/forgetracker/tests/unit/test_globals_model.py
@@ -114,7 +114,7 @@ class TestGlobalsModel(TrackerTestWithModel):
         gbl.update_bin_counts()
         assert mock_bin.query.find.called
         mock_search.assert_called_with(
-            forgetracker.model.Ticket, 'bar', rows=0, short_timeout=False)
+            forgetracker.model.Ticket, 'bar', rows=0, short_timeout=False, fq=['-deleted_b:true'])
         assert_equal(gbl._bin_counts_data, [{'summary': 'foo', 'hits': 5}])
         assert_equal(gbl._bin_counts_expire, now + timedelta(minutes=60))
         assert_equal(gbl._bin_counts_invalidated, None)


Mime
View raw message