#906 Better way to handle the lock in order to prevent duplicates in the numbering of Tickets. Note that the iTopMutex now supports re-entrancy inside the same PHP page.

SVN:trunk[3230]
This commit is contained in:
Denis Flaven
2014-06-27 13:45:48 +00:00
parent ec16c5f86f
commit 61b5b5cc71
7 changed files with 41 additions and 82 deletions

View File

@@ -1667,14 +1667,6 @@
// Compute the priority of the ticket
$this->Set('priority', $this->ComputePriority());
if ($this->IsNew())
{
// Object not yet in the Database
$iKey = MetaModel::GetNextKey(get_class($this));
$sName = sprintf('R-%06d', $iKey);
$this->Set('ref', $sName);
}
return parent::ComputeValues();
}]]></code>
</method>