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.


git-svn-id: svn://10.0.0.236/trunk@160020 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kiko%async.com.br 2004-07-29 03:09:10 +00:00
parent 6196d928d3
commit e3ff662f81

View File

@ -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",