Hi!
Issue::getStatusID() uses a static array to cache id values of issues:
function getStatusID($issue_id)
{
static $returns;
// ...
if (!empty($returns[$issue_id])) {
return $returns[$issue_id];
}
// ...
}
Doesn't that disregard the possibility that a status has been changed
after it has been queried once? When doing a sequence of calls like
$oldstatus = Issue::getStatusID($issue_id);
Issue::setStatus($issue_id, $newstatus);
if (Issue::getStatusID($issue_id) == $oldstatus)
echo "Status unchanged!";
the result will always be "Status unchanged".
The cache might be a good idea but shouldn't it rather be an ordinary
member variable that is updated on setStatus() calls?
Harri.