[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rt-devel
Subject:    [rt-devel] DBIx::Searchbuilder woes
From:       Robie Basak <robie () principle ! co ! uk>
Date:       2002-08-22 10:51:21
[Download RAW message or body]

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.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic