[rt-devel] LimitDue works good, but LimitStarts not

Bruce Campbell bruce_campbell at ripe.net
Wed May 8 03:21:00 EDT 2002


On Tue, 7 May 2002, rt-devel wrote:

> But when i want to limit on the starts date, it displays just _all_ tickets:
>
>   $MyTickets->LimitDate(FIELD => 'Starts', OPERATOR => '<', VALUE => $EndDate->ISO);
> or
>   $MyTickets->LimitStarts(OPERATOR => '<', VALUE => $EndDate->ISO);

Ich got bitten by this before.  It is (from memory) a problem in the
default ENTRYAGGREGATOR keyword, which defaults to 'OR'.  A construct like
the following should help (change fields as appropriate

# Anything due before our EndDate
  $MyTickets->LimitDate(FIELD => 'Due',
			OPERATOR => '<',
			VALUE => $EndDate->ISO
			ENTRYAGGREGATOR => 'AND' );

# AND, anything due after our StartDate
  $MyTickets->LimitDate(FIELD => 'Due',
			OPERATOR => '>',
			VALUE => $StartDate->ISO
			ENTRYAGGREGATOR => 'AND' );

Regards,

-- 
                             Bruce Campbell                            RIPE
                   Systems/Network Engineer                             NCC
                 www.ripe.net - PGP562C8B1B                      Operations






More information about the Rt-devel mailing list