[rt-devel] DBIx::Searchbuilder woes

Robie Basak robie at principle.co.uk
Thu Aug 22 06:51:21 EDT 2002


Hi,

I'm trying to use DBIx::SearchBuilder, but failing miserably.

I'm trying to change the requestor-mode interface so that the open and
closed ticket pages contain a list of everything where the logged-in
user is either the requestor _or_ the Cc (permissions have been set
appropriately).

In WebRT/html/SelfService/Elements/MyRequests, there is:

$MyTickets->LimitRequestor(VALUE =>
$session{'CurrentUser'}->EmailAddress);

so I added
$MyTickets->LimitCc(VALUE => $session{'CurrentUser'}->EmailAddress);

This resulted in no records. Presumably it's doing an AND instead of an
OR.

Searching the archives and googling randomly didn't seem to help;
DBIx::SearchBuilder->Limit isn't really documented properly anywhere;
the manpage doesn't really explain it, and seems to be really outdated.

I dug around in the code, and tried an ENTRYAGGREGATOR = 'OR', but what
I don't understand is that it appears that this is supposed to be the
default anyway.

How does ENTRYAGGREGATOR work? I don't understand if it's supposed to
be added to the first Limit call, the second or both. Is it prefix or
postfix or something else?

If someone would explain it I'll happily document what I learnt.

Cheers,
Robie.




More information about the Rt-devel mailing list