Created on 2021-05-12 04:22 by rouilj, last changed 2021-05-12 05:50 by schlatterbeck.
||Author: [hidden] (rouilj)
||Date: 2021-05-12 04:22
These are some notes from a thread on the roundup-users mailing
list. They may serve as inspiration for enhanced search/report
The question was:
> 2. Can I do logical OR operation on database filtering, concerning
> different properties?
> For example, I want to list issues with "assignedto=15 OR actor=15".
> Do we have a built-in query for this, or shall I utilize
> filter_sql, or any other custom solution?
A POC I wrote years ago implemented this using two queries (called
component queries) and implementing set operations between them. IIRC
this was tricky because of the way the queries were saved/defined at
The idea was: query1 would return the result set for "assignedto=15"
and query2 would return the result set for "actor=15".
Then you would define the URL (using the issue.setsearch.html
to submit to a new action: setsearch.
This (in theory) allowed you to do the equivalent of:
query1 UNION query2 - the is the OR operation requested
query2 INTERSECT query - show me all issues that have the word issue
and the word search
query1 DIFFERENCE query4 - give me all issues that are open and have
the word search but do not include the
The POC only implemented the UNION operation. The issue.setsearch.html
template was based on issue.search.html. The template removed the
filter column. It added text fields for @set1, @set2 and a select list
Since the POC was done before the current query mechanism was defined,
all of the component searches were listed in the left sidebar. With
the current query management interface, these additional queries can
Consider using an RPN style method similar to the query mechanism for
would combine the items from query1 and query2 then from that set
remove the items in query3. This allows multiple operations among
The POC didn't have a method for saving these queries. Using the RPN
format could allow storing these queries in the query class along with
the other queries. So they can be displayed in the left hand sidebar
and shown/hidden with the rest of the queries.