[rt-devel] Bug in 2.0.13?

Joop JoopvandeWege at mococo.nl
Fri Mar 29 03:00:32 EST 2002


Hello RT-developers,

I just installed 2.0.13 and because I'm running it against Oracle I have
to modify some lines in Searchbuilder.pm. Because I was a bit in a hurry
and it is friday morning I managed to overwrite my original copy of my
modified searchbuilder so I had to start from scratch looking what line
(s) to modify.
I inserted a couple of prints to STDERR of QueryString to see what was
being executed by Oracle which it didn't grok.
As it turns out I might have found a little bug. Have a look at the
following query which is tidied up a little:
select distinct   main.*
from     tickets main
,        watchers watchers_1
where    (   (main.status = 'open')
          or (main.status = 'new') )
and      ((main.effectiveid = main.id) )
and      ((watchers_1.scope = 'Ticket') )
and      ((watchers_1.type = 'Requestor') )
and      (
              (lower(watchers_1.email) = 'joopvandewege at mococo.nl')
           or (lower(users_2.emailaddress) = 'joopvandewege at mococo.nl') )
and      main.id = watchers_1.value  

I get an invalid column name from this query.
After having a very good look I see an alias users_2 which isn't defined
I think the users table should be included so the query goes like:
select distinct   main.*
from     tickets main
,        watchers watchers_1
,        users users_2
where    (   (main.status = 'open')
          or (main.status = 'new') )
and      ((main.effectiveid = main.id) )
and      ((watchers_1.scope = 'Ticket') )
and      ((watchers_1.type = 'Requestor') )
and      (
              (lower(watchers_1.email) = 'joopvandewege at mococo.nl')
           or (lower(users_2.emailaddress) = 'joopvandewege at mococo.nl') )
and      main.id = watchers_1.value  

This query is generated when I click on the link HOME.

Joop

-- 
Joop <JoopvandeWege at mococo.nl>





More information about the Rt-devel mailing list