[rt-users] [FOLLOWUP] Re: HOWTO Date Custom Fields

Ernesto Hernandez-Novich emhnemhn at gmail.com
Wed Sep 24 16:30:15 EDT 2008


On Mon, 2008-09-01 at 21:35 -0500, Jesse Vincent wrote:
> We have a nearly complete patch for Date Custom Fields from Emmanuel  
> Lacour.
> 
> It's in Ticket 8721 on http://rt3.fsck.com
> 
> It came in just after the freeze for RT 3.8.0 and I really want it to  
> get a bit more testing before we package it up as a part of RT.
> 
> So. feedback is appreciated.

I took that patch and backported it to RT 3.6.1 running on Debian Etch.
I did several changes, some to actually make it work and some at our
customers' request.

Basically, they wanted "date only" values, meaning an ISO date without
time (2008-09-24) so that's what's being stored in the database instead
of a fully fledged ISO value as the original patch does; I believe the
latter is the right approach to the problem, but to keep things simple I
just used $DateObj->Date instead of $DateObj->ISO and used 'unknown'
while creating the RT::Date objects. I also added a regexp for those
cases when the field has to be mandatory.

I also changed the way the CF{} string is handled while building the
search form. The search form was breaking because the original patch
rips the quotes around it (maybe that works in newer versions of RT, but
it doesn't in 3.6.1) so I put that back in place. 

As far as my testing goes, it works fine; the customer will put it in
production early next week. If anyone is interested, just ask for the
patch via private e-mail.

Thanks for your help.
-- 
Ernesto Hernández-Novich - Linux 2.6.18 i686 - Unix: Live free or die!
Geek by nature, Linux by choice, Debian of course.
If you can't aptitude it, it isn't useful or doesn't exist.
GPG Key Fingerprint = 438C 49A2 A8C7 E7D7 1500 C507 96D6 A3D6 2F4C 85E3




More information about the rt-users mailing list