Bug in 1.0.6


#1

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.


#2

Correct. This is already fixed in the CVS codebase for 1.0.x. 1.0.7 should be
out this week.

    -jOn Wed, Jan 17, 2001 at 05:53:58PM -0700, Forrest W. Christian wrote:

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.


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


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

jesse reed vincent – root@eruditorum.orgjesse@fsck.com
70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90

I have images of Marc in well worn combat fatigues, covered in mud,
sweat and blood, knife in one hand and PSION int he other, being
restrained by several other people, screaming “Let me at it!
Just let me at it!” Eichin standing calmly by with something
automated, milspec, and likely recoilless.
-xiphmont on opensource peer review