Cannot search by requestor

Hi,

Searching by requestor seems to always return no results. I’m using RT
2.0.13 and on a remote postgres.

I found someone saying something similar in the archives and tried to
upgrade DBIx::SearchBuilder accordingly (I’m using Debian Woody, so
first I purged the package libdbix-searchbuilder-perl and then installed
0.61 from source, then restarted apache-perl) but this didn’t seem to
help.

I put:
use Data::Dumper;
print Dumper (%args);
in Limit() in RT/EasySearch.pm and the result is attached. Is the query
correct at that stage?

Here’s the postgres log:
ProcessQuery
CommitTransactionCommand
StartTransactionCommand
query: SELECT DISTINCT main.* FROM Tickets main, Watchers Watchers_1
LEFT JOIN Users as Users_2 ON Watchers_1.Owner = Users_2.id WHERE
((main.EffectiveId = main.id)) AND ((Watchers_1.Scope = ‘Ticket’)) AND
((main.id = ‘1’)) AND ((Watchers_1.Type = ‘Requestor’)) AND
((lower(Watchers_1.Email) =
‘robie@principle.co.uk’)OR(lower(Users_2.EmailAddress) =
‘robie@principle.co.uk’)) AND main.id = Watchers_1.Value
ERROR: parser: parse error at or near "left"
AbortCurrentTransaction

Robie.

typescript (1.5 KB)

Hi,

Searching by requestor seems to always return no results. I’m using RT
2.0.13 and on a remote postgres.

I found someone saying something similar in the archives and tried to
upgrade DBIx::SearchBuilder accordingly (I’m using Debian Woody, so
first I purged the package libdbix-searchbuilder-perl and then installed
0.61 from source, then restarted apache-perl) but this didn’t seem to
help.

[…]

query: SELECT DISTINCT main.* FROM Tickets main, Watchers Watchers_1
LEFT JOIN Users as Users_2 ON Watchers_1.Owner = Users_2.id WHERE
((main.EffectiveId = main.id)) AND ((Watchers_1.Scope = ‘Ticket’)) AND
((main.id = ‘1’)) AND ((Watchers_1.Type = ‘Requestor’)) AND
((lower(Watchers_1.Email) =
‘robie@principle.co.uk’)OR(lower(Users_2.EmailAddress) =
‘robie@principle.co.uk’)) AND main.id = Watchers_1.Value
ERROR: parser: parse error at or near "left"
AbortCurrentTransaction

A bit more investigation and fiddling with the query manually led to
postgres telling me that it doesn’t support outer joins (!)

I was running 7.0. Upgrading to 7.2(.1) fixed the problem :slight_smile:

So it was entirely my fault, since the docs clearly do say that >=7.1.1
is needed.

Robie.