Loading...
 
Skip to main content

Unified search - OR on two fields

Status
Closed
Subject
Unified search - OR on two fields
Version
20.x
Category
  • Feature request
Feature
Search
Resolution status
Fixed or Solved
Submitted by
Roberto Kirschbaum
Volunteered to solve
Victor Emanouilov
Keep informed
Jonny Bradley
Lastmod by
Roberto Kirschbaum
Rating
(0)
Description

I want to be able to filter on field 1 having one condition, OR field 2 having another condition.
For example, in the LIST() below I want to be able to display tracker items whose beginning date are in the next N days, OR the ending date being in the next M days:

Copy to clipboard
{LIST()} {filter content="7" field="tracker_id"} {filter field="tracker_status" content="o"} {filter range="tracker_field_TaskStartDate" from="now" to="5 days"} <-- But here I'd like to be able to filter not on one field but rather on two fields, something like: tracker_field_TaskStartDate from="now" to="5 days" OR tracker_field_TaskEndDate from="now" to="10 days" (...) {LIST}
Solution

Added group attribute as suggested by @Jonny Bradley:
Example:

Copy to clipboard
{filter field="tracker_field_bug_tracker_priority" editable="multiselect" group="together"} {filter field="tracker_field_bug_tracker_assignee" editable="content" group="together"}

This allows searching for bug tracker items with certain priority OR certain assignee.

Importance
5
Easy to solve?
5
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
7030
Created
Sunday 17 February, 2019 14:25:23 UTC
by Roberto Kirschbaum
LastModif
Tuesday 20 February, 2024 18:42:49 UTC


Show PHP error messages