Commit 82357809 authored by kiko%async.com.br's avatar kiko%async.com.br

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.
parent b5c21790
......@@ -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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment