allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [20/38] git commit: [#4019] ticket:523 Move translate logic where it belongs
Date Wed, 30 Apr 2014 18:15:52 GMT
[#4019] ticket:523 Move translate logic where it belongs


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

Branch: refs/heads/master
Commit: b18f8644e259408656d57a77ed611f4a72168933
Parents: ba35bd3
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Mon Jan 27 12:42:25 2014 +0200
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Apr 30 15:55:12 2014 +0000

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


http://git-wip-us.apache.org/repos/asf/allura/blob/b18f8644/ForgeTracker/forgetracker/model/ticket.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/model/ticket.py b/ForgeTracker/forgetracker/model/ticket.py
index 2be0236..520da7a 100644
--- a/ForgeTracker/forgetracker/model/ticket.py
+++ b/ForgeTracker/forgetracker/model/ticket.py
@@ -1212,6 +1212,10 @@ 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)
+
+            t = cls.query.find().first()
+            if t:
+                search_query = cls.translate_query(search_query, t.index())
             result['filter_choices'] = tsearch.query_filter_choices(search_query)
         else:
             result = cls.paged_search(app_config, user, search_query, filter=filter,

http://git-wip-us.apache.org/repos/asf/allura/blob/b18f8644/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index f9d104c..64e34c4 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -647,13 +647,9 @@ class RootController(BaseController, FeedController):
 
         # it's just our original query mangled and sent back to us
         kw.pop('q', None)
-        solr_query = ''
-        t = TM.Ticket.query.find().first()
-        if t:
-            solr_query = t.translate_query(c.app.globals.not_closed_query, t.index())
         result = TM.Ticket.paged_query_or_search(c.app.config, c.user,
                                                  c.app.globals.not_closed_mongo_query,
-                                                 solr_query,
+                                                 c.app.globals.not_closed_query,
                                                  filter,
                                                  sort=sort, limit=int(limit), page=page,
                                                  deleted={'$in': show_deleted},


Mime
View raw message