[rt-users] Bug in 1.0.6

Forrest W. Christian forrestc at imach.com
Wed Jan 17 19:53:58 EST 2001


There is a bug in 1.0.6.   Specifically, if you create a request through
the web interface setting a due date of January in any year, it will not
add the due date due to the existing comparison line in the code:

if ($rt::ui::web::FORM{'due'} and $rt::ui::web::FORM{'due_mday'} and
    $rt::ui::web::FORM{'due_month'} and $rt::ui::web::FORM{'due_year'}) {

I have fixed this in my codebase as follows:

if ($rt::ui::web::FORM{'due'} and $rt::ui::web::FORM{'due_mday'} and
   (defined $rt::ui::web::FORM{'due_month'}) and
   $rt::ui::web::FORM{'due_year'}) {

This is due to the fact that January is a Zero in "date format", and a
zero evaluates to false under perl.

- Forrest W. Christian (forrestc at imach.com) AC7DE
----------------------------------------------------------------------
iMach, Ltd., P.O. Box 5749, Helena, MT 59604      http://www.imach.com
Solutions for your high-tech problems.                  (406)-442-6648
----------------------------------------------------------------------





More information about the rt-users mailing list