diff options
author | kiko%async.com.br <> | 2004-07-29 12:09:10 +0200 |
---|---|---|
committer | kiko%async.com.br <> | 2004-07-29 12:09:10 +0200 |
commit | 82357809ddc5fcc41680149d1ad7a27045bbdaf9 (patch) | |
tree | faa6e8505e531d13121adbaea3e5f15535935508 | |
parent | b5c21790186a08e0f03dc7f484a515ded65bc4d0 (diff) | |
download | bugzilla-82357809ddc5fcc41680149d1ad7a27045bbdaf9.tar.gz bugzilla-82357809ddc5fcc41680149d1ad7a27045bbdaf9.tar.xz |
Fix for bug 216008: Time Tracking: default values cause change bug
errors. Check if the time values haven't actually changed by using integer comparison (instead of string comparison). r=jouni, a=justdave.
-rwxr-xr-x | process_bug.cgi | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/process_bug.cgi b/process_bug.cgi index 93d90c996..c0e6e13a6 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -361,14 +361,20 @@ sub CheckCanChangeField { } } } - + # Return true if they haven't changed this field at all. if ($oldvalue eq $newvalue) { return 1; } elsif (trim($oldvalue) eq trim($newvalue)) { return 1; + # numeric fields need to be compared using == + } elsif (($field eq "estimated_time" || $field eq "remaining_time") && + $oldvalue == $newvalue) { + return 1; } + + # A resolution change is always accompanied by a status change. So, we # always OK resolution changes; if they really can't do this, we will @@ -1150,6 +1156,7 @@ foreach my $id (@idlist) { } $i++; } + $oldhash{'product'} = get_product_name($oldhash{'product_id'}); if (!CanEditProductId($oldhash{'product_id'})) { ThrowUserError("product_edit_denied", |