allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [12/38] git commit: [#4019] ticket:481 Fix milestone filter
Date Wed, 30 Apr 2014 18:15:44 GMT
[#4019] ticket:481 Fix milestone filter


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

Branch: refs/heads/master
Commit: f390403a06335a611b5ae0d84b0c4b5c2acd628b
Parents: a90114c
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Thu Dec 19 14:40:28 2013 +0200
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Apr 30 15:55:10 2014 +0000

----------------------------------------------------------------------
 Allura/allura/lib/search.py         | 2 +-
 ForgeTracker/forgetracker/search.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/f390403a/Allura/allura/lib/search.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/search.py b/Allura/allura/lib/search.py
index 1ce7cd9..3b05bdc 100644
--- a/Allura/allura/lib/search.py
+++ b/Allura/allura/lib/search.py
@@ -95,7 +95,7 @@ def search_artifact(atype, q, history=False, rows=10, short_timeout=False,
filte
         'project_id_s:%s' % c.project._id,
         'mount_point_s:%s' % c.app.config.options.mount_point ]
     for name, values in (filter or {}).iteritems():
-        field_name = name + '_s' if name != '_milestone' else 'milestone_s'
+        field_name = name + '_s'
         fq.append(' OR '.join('%s:%s' % (field_name, v) for v in values))
     if not history:
         fq.append('is_history_b:False')

http://git-wip-us.apache.org/repos/asf/allura/blob/f390403a/ForgeTracker/forgetracker/search.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/search.py b/ForgeTracker/forgetracker/search.py
index b29be6d..a1f5243 100644
--- a/ForgeTracker/forgetracker/search.py
+++ b/ForgeTracker/forgetracker/search.py
@@ -22,7 +22,7 @@ from allura.lib.search import search
 
 FACET_PARAMS = {
     'facet': 'true',
-    'facet.field': ['milestone_s', 'status_s', 'assigned_to_s', 'reported_by_s'],
+    'facet.field': ['_milestone_s', 'status_s', 'assigned_to_s', 'reported_by_s'],
     'facet.limit': -1,
     'facet.sort': 'index',
     'facet.mincount': 1,
@@ -48,7 +48,7 @@ def get_facets(solr_hit):
         return {}
     def reformat(field):
         name, val = field
-        name = name[:-2] if name != 'milestone_s' else '_milestone'
+        name = name[:-2]
         new_val = []
         for i in range(0, len(val), 2):
             new_val.append((val[i], val[i+1]))


Mime
View raw message