Hello

I have been struggling with some differences in the query language for [query:?] vs. [[TicketQuery]]. I might have misunderstand something. Or maybe the documentation may need an improvement.

According to the documentation both [query:?] and [[TicketQuery]] share the same query language:

https://trac.edgewall.org/wiki/TracQuery#QueryLanguage

However, first of all a major difference is the separator character. While [query:?] needs `&`, the [[TicketQuery]] promotes `,` but also accepts `&`.

Second difference is the position of the `=` match operator in regards to other operators like `!` but also `~`. While [query:?] needs `=!`, the [[TicketQuery]] accepts both variant `!=` and `=!`.

[query:?status=new&keywords=!foo tickets]

[[TicketQuery(status=new,keywords=!foo,count)]]

I guess there are technical and historic reasons for those differences. [query:] seems close to the URL query format, and [[TicketQuery()]] as a powerful macro seems more generous.

I do not complain and I am more than willing to accept. But it took me 2 hours to find out. I would propose (and volunteer) to add a small note in the documentation, which would remind these differences. Something like this:

... Filters are separated by ampersands (`&`); the `[[TicketQuery]]` macro also 
accepts comma (`,`).

Note that for `query:` the match operator `=` needs to be on first position 
when combined with other operators, for example `=!` or `~=`.

If I have totally misunderstood something, please correct me.

Thanks
Clemens


P.S.

There is a very old related ticket #7699, but it did not come to a conclusion.

https://trac.edgewall.org/ticket/7699

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/0aeb5651-c610-7fa6-d11a-1635072f3537%40osypkamed.com.

Reply via email to