Search also into tags fields
Changed the search queries to search also into the tags fields. Fixes #276remotes/origin/issue/4795/notification_even_they_are_disabled
parent
bc3025f065
commit
4257f6d5a0
|
@ -20,10 +20,7 @@ answer newbie questions, and generally made taiga that much better:
|
||||||
- Andrea Stagi <stagi.andrea@gmail.com>
|
- Andrea Stagi <stagi.andrea@gmail.com>
|
||||||
- Andrés Moya <andres.moya@kaleidos.net>
|
- Andrés Moya <andres.moya@kaleidos.net>
|
||||||
- Andrey Alekseenko <al42and@gmail.com>
|
- Andrey Alekseenko <al42and@gmail.com>
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
- Brett Profitt <brett.profitt@gmail.com>
|
- Brett Profitt <brett.profitt@gmail.com>
|
||||||
>>>>>>> master
|
|
||||||
- Bruno Clermont <bruno@robotinfra.com>
|
- Bruno Clermont <bruno@robotinfra.com>
|
||||||
- Chris Wilson <chris.wilson@aridhia.com>
|
- Chris Wilson <chris.wilson@aridhia.com>
|
||||||
- David Burke <david@burkesoftware.com>
|
- David Burke <david@burkesoftware.com>
|
||||||
|
@ -33,6 +30,7 @@ answer newbie questions, and generally made taiga that much better:
|
||||||
- Julien Palard
|
- Julien Palard
|
||||||
- luyikei <luyikei.qmltu@gmail.com>
|
- luyikei <luyikei.qmltu@gmail.com>
|
||||||
- Motius GmbH <mail@motius.de>
|
- Motius GmbH <mail@motius.de>
|
||||||
|
- Riccardo Coccioli <riccardo.coccioli@immobiliare.it>
|
||||||
- Ricky Posner <e@eposner.com>
|
- Ricky Posner <e@eposner.com>
|
||||||
- Yamila Moreno <yamila.moreno@kaleidos.net>
|
- Yamila Moreno <yamila.moreno@kaleidos.net>
|
||||||
- Yaser Alraddadi <yaser@yr.sa>
|
- Yaser Alraddadi <yaser@yr.sa>
|
||||||
|
|
|
@ -28,6 +28,7 @@ def search_user_stories(project, text):
|
||||||
model_cls = apps.get_model("userstories", "UserStory")
|
model_cls = apps.get_model("userstories", "UserStory")
|
||||||
where_clause = ("to_tsvector('english_nostop', coalesce(userstories_userstory.subject) || ' ' || "
|
where_clause = ("to_tsvector('english_nostop', coalesce(userstories_userstory.subject) || ' ' || "
|
||||||
"coalesce(userstories_userstory.ref) || ' ' || "
|
"coalesce(userstories_userstory.ref) || ' ' || "
|
||||||
|
"coalesce(array_to_string(userstories_userstory.tags, ' '), '') || ' ' || "
|
||||||
"coalesce(userstories_userstory.description, '')) "
|
"coalesce(userstories_userstory.description, '')) "
|
||||||
"@@ to_tsquery('english_nostop', %s)")
|
"@@ to_tsquery('english_nostop', %s)")
|
||||||
|
|
||||||
|
@ -44,6 +45,7 @@ def search_tasks(project, text):
|
||||||
model_cls = apps.get_model("tasks", "Task")
|
model_cls = apps.get_model("tasks", "Task")
|
||||||
where_clause = ("to_tsvector('english_nostop', coalesce(tasks_task.subject, '') || ' ' || "
|
where_clause = ("to_tsvector('english_nostop', coalesce(tasks_task.subject, '') || ' ' || "
|
||||||
"coalesce(tasks_task.ref) || ' ' || "
|
"coalesce(tasks_task.ref) || ' ' || "
|
||||||
|
"coalesce(array_to_string(tasks_task.tags, ' '), '') || ' ' || "
|
||||||
"coalesce(tasks_task.description, '')) @@ to_tsquery('english_nostop', %s)")
|
"coalesce(tasks_task.description, '')) @@ to_tsquery('english_nostop', %s)")
|
||||||
|
|
||||||
if text:
|
if text:
|
||||||
|
@ -57,6 +59,7 @@ def search_issues(project, text):
|
||||||
model_cls = apps.get_model("issues", "Issue")
|
model_cls = apps.get_model("issues", "Issue")
|
||||||
where_clause = ("to_tsvector('english_nostop', coalesce(issues_issue.subject) || ' ' || "
|
where_clause = ("to_tsvector('english_nostop', coalesce(issues_issue.subject) || ' ' || "
|
||||||
"coalesce(issues_issue.ref) || ' ' || "
|
"coalesce(issues_issue.ref) || ' ' || "
|
||||||
|
"coalesce(array_to_string(issues_issue.tags, ' '), '') || ' ' || "
|
||||||
"coalesce(issues_issue.description, '')) @@ to_tsquery('english_nostop', %s)")
|
"coalesce(issues_issue.description, '')) @@ to_tsquery('english_nostop', %s)")
|
||||||
|
|
||||||
if text:
|
if text:
|
||||||
|
|
Loading…
Reference in New Issue