allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [18/38] git commit: [#4019] ticket:513 Fix choices for filter by status on milestone view
Date Wed, 30 Apr 2014 18:15:50 GMT
[#4019] ticket:513 Fix choices for filter by status on milestone view


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

Branch: refs/heads/master
Commit: a8a5ddc8d31238c63d1019adad2844940dd72bef
Parents: 1d1c6c7
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Fri Jan 10 13:13:53 2014 +0400
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Apr 30 15:55:11 2014 +0000

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


http://git-wip-us.apache.org/repos/asf/allura/blob/a8a5ddc8/ForgeTracker/forgetracker/model/ticket.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/model/ticket.py b/ForgeTracker/forgetracker/model/ticket.py
index 63346eb..2be0236 100644
--- a/ForgeTracker/forgetracker/model/ticket.py
+++ b/ForgeTracker/forgetracker/model/ticket.py
@@ -1212,7 +1212,7 @@ class Ticket(VersionedArtifact, ActivityObject, VotableArtifact):
             solr_sort = '%s %s' % (solr_col, sort_split[1])
         if not filter:
             result = cls.paged_query(app_config, user, query, sort=sort, limit=limit, page=page,
**kw)
-            result['filter_choices'] = tsearch.query_filter_choices()
+            result['filter_choices'] = tsearch.query_filter_choices(search_query)
         else:
             result = cls.paged_search(app_config, user, search_query, filter=filter,
                                       sort=solr_sort, limit=limit, page=page, **kw)

http://git-wip-us.apache.org/repos/asf/allura/blob/a8a5ddc8/ForgeTracker/forgetracker/search.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/search.py b/ForgeTracker/forgetracker/search.py
index 223781a..6d8c4d8 100644
--- a/ForgeTracker/forgetracker/search.py
+++ b/ForgeTracker/forgetracker/search.py
@@ -29,7 +29,7 @@ FACET_PARAMS = {
 }
 
 
-def query_filter_choices():
+def query_filter_choices(arg=None):
     params = {
         'short_timeout': True,
         'fq': [
@@ -39,7 +39,7 @@ def query_filter_choices():
         'rows': 0,
     }
     params.update(FACET_PARAMS)
-    result = search(None, **params)
+    result = search(arg, **params)
     return get_facets(result)
 
 

http://git-wip-us.apache.org/repos/asf/allura/blob/a8a5ddc8/ForgeTracker/forgetracker/tests/unit/test_ticket_model.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/unit/test_ticket_model.py b/ForgeTracker/forgetracker/tests/unit/test_ticket_model.py
index 0f45210..810cff4 100644
--- a/ForgeTracker/forgetracker/tests/unit/test_ticket_model.py
+++ b/ForgeTracker/forgetracker/tests/unit/test_ticket_model.py
@@ -323,7 +323,7 @@ class TestTicketModel(TrackerTestWithModel):
         filter = None
         Ticket.paged_query_or_search(app_cfg, user, mongo_query, solr_query, filter, **kw)
         query.assert_called_once_with(app_cfg, user, mongo_query, sort=None, limit=None,
page=0, **kw)
-        tsearch.query_filter_choices.assert_called_once()
+        tsearch.query_filter_choices.assert_called_once_with('solr query')
         assert_equal(search.call_count, 0)
         query.reset_mock(), search.reset_mock(), tsearch.reset_mock()
 


Mime
View raw message