Mailing List Archive

TracQuery with dates?
Hi,

I've looked at the [[TicketQuery]] help web page (Query Language) and see a
number of very helpful examples. However, I can't quite figure out how to
do what I want.

I have a custom field, let's call it "date", and I'd like to query out all
tickets:
1) that have "date" set to today
2) that have "date" set to sometime from now until 1 week from now

I've tried:
1) [[TicketQuery(date=*now..1d*)]] # want all tickets for today
2) [[TicketQuery(date=*now..1w*)]] # want all tickets for today,
tomorrow... up to and including 6 days from today... so, "this week"

Thank you!

Kindly,
Aikido Guy

--
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@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/313af950-5b49-410b-ac78-a79e304e09bfn%40googlegroups.com.
Re: TracQuery with dates? [ In reply to ]
Aikido Guy wrote on 04.05.2021 at 15:24:
> Hi,
>
> I've looked at the [[TicketQuery]] help web page (Query Language) and
> see a number of very helpful examples. However, I can't quite figure out
> how to do what I want.
>
> I have a custom field, let's call it "date", and I'd like to query out
> all tickets:
> 1) that have "date" set to today
> 2) that have "date" set to sometime from now until 1 week from now
>
> I've tried:
> 1) [[TicketQuery(date=*now..1d*)]]        # want all tickets for today
> 2) [[TicketQuery(date=*now..1w*)]]       # want all tickets for today,
> tomorrow... up to and including 6 days from today... so, "this week"
>
> Thank you!
>
> Kindly,
> Aikido Guy


Hi Aikido

[[TicketQuery(date=today)]]

[[TicketQuery(date=1weekago)]]

See at bottom of this page:

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

Clemens

--
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@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/137573a7-33c1-c8aa-6494-6d208100a275%40osypkamed.com.
Re: TracQuery with dates? [ In reply to ]
On Tuesday, May 4, 2021 at 2:43:06 PM UTC-4 Clemens Feige wrote:

> Aikido Guy wrote on 04.05.2021 at 15:24:
> > I have a custom field, let's call it "date", and I'd like to query out
> > all tickets:
> > 1) that have "date" set to today
> > 2) that have "date" set to sometime from now until 1 week from now
> >
> > I've tried:
> > 1) [[TicketQuery(date=*now..1d*)]] # want all tickets for today
> > 2) [[TicketQuery(date=*now..1w*)]] # want all tickets for today,
> > tomorrow... up to and including 6 days from today... so, "this week"
>
> Hi Aikido
>
> [[TicketQuery(date=today)]]
>
> [[TicketQuery(date=1weekago)]]
>
> See at bottom of this page:
>
> https://trac.edgewall.org/wiki/TracQuery
>
> Clemens


Thanks! I did look on the webpage that you sent (before you sent it and
before I wrote the question); however I had not seen the secret sauce
"today" on the webpage...

At the moment I'm assuming that I can do the following (for the dates that
occur in the upcoming/next week)
[[TicketQuery(date=today..1w)]]

Or do I only need to say [[TicketQuery(date=1w)]] for the dates that are
today, tomorrow, up to the next week?

Kindly,
Aikido Guy


--
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@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/ed7196b2-c766-4a3b-a50f-316f85497542n%40googlegroups.com.