Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Users

TracQuery not using AND operation?

 

 

Trac users RSS feed   Index | Next | Previous | View Threaded


ilewismsl at gmail

Aug 1, 2013, 8:11 PM

Post #1 of 6 (58 views)
Permalink
TracQuery not using AND operation?

Normally when I set multiple conditions on TicketQuery() the macro uses AND
to combine the conditions (unless I use the ,or, syntax).

For example, if I enter the following on
http://trac.edgewall.org/wiki/QueryTest and Preview

[[TicketQuery(component~=system,status!=closed,group=component,priority=high,
format=table)]]

As expected, I get all the tickets where the component contains the word
"system" AND status not closed AND priority high.

Now, if I modify this to add a second condition on the component that it
starts with "r" I would expect to further restrict the tickets listed and
only get back "report system"

[[TicketQuery(component~=system,component^=r,status!=closed,group=component,priority=high,
format=table)]]

However, instead, the query seems to switch to using some kind of OR
operator and I get back lots of tickets where the component does not
include the word "system".


This looks like a bug to me, but I find no ticket for it.

Can someone tell me whether this is a defect? If it is not a defect, then
why is the query language doing what it is. It makes no sense to me.

Ian Lewis
www.mstarlabs.com
Using Trac 1.0.0, Python 2.6, Apache, on Windows 7.


--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe [at] googlegroups
To post to this group, send email to trac-users [at] googlegroups
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.


petsuter at gmail

Aug 2, 2013, 5:23 AM

Post #2 of 6 (55 views)
Permalink
Re: TracQuery not using AND operation? [In reply to]

On 02.08.2013 05:11, ilewismsl wrote:
> Normally when I set multiple conditions on TicketQuery() the macro
> uses AND to combine the conditions
> However, instead, the query seems to switch to using some kind of OR
> operator
> This looks like a bug to me, but I find no ticket for it.
I found #9736, #10152 and #10866.
http://trac.edgewall.org/ticket/9736
http://trac.edgewall.org/ticket/10152
http://trac.edgewall.org/ticket/10866

Peter

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe [at] googlegroups
To post to this group, send email to trac-users [at] googlegroups
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.


ilewismsl at gmail

Aug 2, 2013, 7:06 PM

Post #3 of 6 (49 views)
Permalink
Re: TracQuery not using AND operation? [In reply to]

On Friday, August 2, 2013 4:23:12 AM UTC-8, Peter Suter wrote:
>
> I found #9736, #10152 and #10866.
>
>
Thank you for replying, Peter. most of these tickets seem to be related to
the custom query module, rather than the TicketQuery() macro, but #10152
does seem to indicate something similar to what I see.

I still think this looks like a defect, not an "as designed", though I also
am still not sure whether to report a defect or not.

Ian

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe [at] googlegroups
To post to this group, send email to trac-users [at] googlegroups
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.


petsuter at gmail

Aug 3, 2013, 3:12 AM

Post #4 of 6 (49 views)
Permalink
Re: TracQuery not using AND operation? [In reply to]

On 03.08.2013 04:06, ilewismsl wrote:
>
> On Friday, August 2, 2013 4:23:12 AM UTC-8, Peter Suter wrote:
>
> I found #9736, #10152 and #10866.
>
And #8329.
http://trac.edgewall.org/ticket/8329
> Thank you for replying, Peter. most of these tickets seem to be
> related to the custom query module, rather than the TicketQuery()
> macro, but #10152 does seem to indicate something similar to what I see.
The TickeQuery() macro and the QueryModule share a lot of code and
limitations.
> I still think this looks like a defect, not an "as designed", though I
> also am still not sure whether to report a defect or not.
It looks like an unfortunate limitation to me. A design error if you
will. But not a defect in the sense that one could find a spot in the
code where it says "or" but it should say "and" and fixing the defect
would simply change that.

Removing this limitation would likely require a (major or minor)
redesign that carefully considers all the existing behavior as well as a
the list of other known limitations and desired improvements.

If you think four tickets I listed don't include your case I would
recommend adding a ticket so it may be considered when such a redesign
ever happens.

Peter

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe [at] googlegroups
To post to this group, send email to trac-users [at] googlegroups
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.


ilewismsl at gmail

Aug 7, 2013, 9:02 PM

Post #5 of 6 (24 views)
Permalink
Re: TracQuery not using AND operation? [In reply to]

>
>
>
> And #8329.
> http://trac.edgewall.org/ticket/8329
>
Now that looks like a dead match. I thought it was performing an "or"
operation, but it is perfectly plausible that it could be ignoring the
first operation (not checked, but I can believe it).

Thank you for finding this. No new defect report.

Ian

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe [at] googlegroups
To post to this group, send email to trac-users [at] googlegroups
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.


ilewismsl at gmail

Aug 7, 2013, 10:36 PM

Post #6 of 6 (24 views)
Permalink
Re: TracQuery not using AND operation? [In reply to]

On Saturday, August 3, 2013 2:12:27 AM UTC-8, Peter Suter wrote:
>
> And #8329.
> http://trac.edgewall.org/ticket/8329
>
>
Now that looks like a dead match.

Thank you for finding this. No new defect report.

Ian

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe [at] googlegroups
To post to this group, send email to trac-users [at] googlegroups
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.

Trac users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.