[Tickets #6825] Re: OR-combination for flags

bugs at horde.org bugs at horde.org
Fri Jun 6 06:00:00 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/6825
-----------------------------------------------------------------------
 Ticket             | 6825
 Updated By         | Michael Slusarz <slusarz at horde.org>
 Summary            | OR-combination for flags
 Queue              | IMP
 Version            | 4.2
 Type               | Enhancement
 State              | Feedback
 Priority           | 1. Low
 Milestone          |
 Patch              |
 Owners             | Michael Slusarz
-----------------------------------------------------------------------


Michael Slusarz <slusarz at horde.org> (2008-06-06 01:59) wrote:

> testing IMP 4.2 with most of the other current modules. Am I correct
> that searches are built by one of the following two modes?
>
> All Queries: AND( AND(CRIT_1, CRIT_2, ...) AND(FLAG_1, FLAG_2, ...) )
> Any Queries: AND(  OR(CRIT_1, CRIT_2, ...) AND(FLAG_1, FLAG_2, ...) )

yes.

> My understanding is that it is not possible to do imap searches for
> OR-combination of flags, correct? (e.g. all new OR unanswered
> messages).

With my recent changes, it should now be possible to do this.

> That could be fixed by making "search flags" on par with the "search
> criteria", i.e. applying the all/any-switch to flags as well. Even
> better: provide three all/any-switches for search criteria, search
> flags and their combination:

This is what I have done - I have moved the search flags into the search
criteria.  Please test and check for smoke, etc.

> AND/OR(  AND/OR(crit_1, crit_2, ...), AND/OR(FLAG_1, FLAG_2, ...) )
>
> That would enormously extend the space of possible searches by still
> avoiding a complex GUI for the general nesting of logical operators.

This was talked about long ago but isn't easily done - how do you "lump"
queries together?  For example, how do I specify that I want (A AND B) OR
(C AND D) - the result must contain A/B pairs or C/D pairs - not (A AND B
OR C) AND D - the result must contain D and must contain either A/B pair or
C.  In other words, nobody has come up with an elegant way of making the UI
handle 'parentheses' so, thus, the reason we have either all AND or all OR
searches.

> Furthermore two little glitches in the current GUI:
>  - In "recent searches", the flags are not mentioned.

This has been fixed as a result of the new code (since it pretty much uses
the same code previously used for the search criteria).

>  - "Search Flags" for all the imap flags, but "flagged message"
>    for only the important flag.

I don't understand what this is saying.  There is no "important" IMAP
flag, only a "flagged for followup" flag.




More information about the bugs mailing list