Skip to content

Commit

Permalink
Add reference about date searching to Query Builder POD
Browse files Browse the repository at this point in the history
Add reference about general date searching with absolute dates and
also relative dates to Query Builder POD with a few examples.
  • Loading branch information
richieri-bps committed Nov 22, 2023
1 parent 464dacd commit e54cfc2
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions docs/query_builder.pod
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,47 @@ tickets the transactions should be on. In our example, we probably only want
to see active tickets, so in the bottom Ticket Fields section you can select
Status "is" and "Active". This will then filter out inactive statuses.

=head2 Searching on Date fields

It is a common use case to search tickets based on when they were created,
resolved, or last updated.

In the query builder, you can pick the Date or DateTime field you want to
search on and then pick one of the comparison operators (before, on and
after). You can then click on the value field and pick a date from the
calendar that appears.

=head3 Relative Dates

Alternatively, you can also build search templates with relative dates
such as "today", "yesterday", "tomorrow", "last week", "next month", and
even more complex dates such as "beginning of last month".

To use relative dates, you can type them directly into the value field
of the search builder.

For example, if you want to search for tickets created during the current
week, you can use the following search criteria:

Field: Created
Operator: after
Value: last Sunday

Another helpful example is to search for tickets resolved during the last
month. You can use 2 criteria to do that:

Field: Resolved
Operator: after
Value: beginning of last month

Field: Resolved
Operator: before
Value: this month

You can check all compatible relative date strings that RT supports at
L<DateTime::Format::Natural::Lang::EN> and L<Time::ParseDate>.


=head1 Advanced

In addition to the graphical query builder, RT also has an Advanced page
Expand Down

0 comments on commit e54cfc2

Please sign in to comment.