[PATCH] Searches like Created = 'YYYY-MM-DD'(was: [rt-users] Query Problem)

Ruslan Zakirov ruslan.zakirov at gmail.com
Tue Aug 2 06:46:15 EDT 2005


On 8/1/05, Olivier Horec <olivier.horec at gmail.com> wrote:
> Hi,
> 
> I have made a few tests with the patch "Searches by Owner's fields". I
> have detected two problems.
> 
> First, I can't search Ticketsw with the owner Id anymore (it was used
> to display your tickets on the "RT at a glance" page)
Is it your code? If so, please, show code sample.

> 
> When I make a search with "Owner = 'Nobody'",  I get the Tickets
> contained in the "___Approvals" queue. (when I don't use "Owner =
> 'Nobody'", I don't get these tickets)
What's results you get without patch?

> 
> Has anyone tried to install this patch ?
Yeah, I made some hand testing, but could miss something...

> 
> Thanks in advance
> 
> Olivier
> 
> 2005/8/1, Olivier Horec <olivier.horec at gmail.com>:
> > Hi Ruslan,
> >
> > Thanks for your help
> >
> > I applied this patch and it solves my problem : it was just a problem
> > with the GMT+4 timezone.
> >
> > I applied the pacth "Searches by Owner's fields" about the first
> > problem and it was successful too !
> >
> > Thanks again,
> >
> > Olivier
> >
> > 2005/7/30, Ruslan Zakirov <ruslan.zakirov at gmail.com>:
> > > Ok, here what we get:
> > > * I enter '2005-07-30' in search box
> > > * Time::ParseDate converts it to '2005-07-29 20:00' because of GMT+4 timezone
> > > * Then constuct search with interval ['2005-07-29 00:00'; '2005-07-29 23:59']
> > >
> > > I think if we play only with dates then we should ignore timezone, so
> > > I propose attached patch.
> > >
> > > Olivier, could you confirm that patch fixes your problem?
> > >
> > > On 7/28/05, Olivier Horec <olivier.horec at gmail.com> wrote:
> > > > I had a look at the SQL queries about the date problem.
> > > >
> > > > In fact, when I search with a query like : Created = '2005-07-19',
> > > > I find this in the SQL log :
> > > > ( ( (main.Created >= '2005-07-18 00:00')AND(main.Created <=
> > > > '2005-07-18 23:59') ) )
> > > >
> > > > Has anyone an idea ?
> > > >
> > > > Olivier
> > > >
> > > > 2005/7/28, Ruslan Zakirov <ruslan.zakirov at gmail.com>:
> > > > > On 7/28/05, Olivier Horec <olivier.horec at gmail.com> wrote:
> > > > > > Hi,
> > > > > >
> > >
> > > [snip]
> > >
> > > > > > The second problem is when you search tickets with dates : you get the
> > > > > > tickets one day before the query.
> > > > > >
> > > > > > Has anyone tried to solve the problem or can anyone give me some ideas
> > > > > > to help me to solve it.
> > > > > >
> > > > > > Thanks in advance
> > > > > >
> > > > > > Olivier
> > > > > > _______________________________________________
> > > > > > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> > > > > >
> > > > > > Be sure to check out the RT Wiki at http://wiki.bestpractical.com
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Best regards, Ruslan.
> > > > >
> > > >
> > >
> > >
> > > --
> > > Best regards, Ruslan.
> > >
> > >
> > >
> >
> 


-- 
Best regards, Ruslan.



More information about the rt-users mailing list