mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
Fixed limitation: tickets named automatically even if a name is specified (attribute : ref) ; this is stopper when importing tickets from an existing workflow tool
SVN:trunk[890]
This commit is contained in:
@@ -209,17 +209,21 @@ class Problem extends Ticket
|
||||
|
||||
public function ComputeValues()
|
||||
{
|
||||
// Compute the priority of the ticket
|
||||
$this->Set('priority', $this->ComputePriority());
|
||||
// Compute the priority of the ticket
|
||||
$this->Set('priority', $this->ComputePriority());
|
||||
|
||||
$iKey = $this->GetKey();
|
||||
if ($iKey < 0)
|
||||
$sCurrRef = $this->Get('ref');
|
||||
if (strlen($sCurrRef) == 0)
|
||||
{
|
||||
// Object not yet in the Database
|
||||
$iKey = MetaModel::GetNextKey(get_class($this));
|
||||
$iKey = $this->GetKey();
|
||||
if ($iKey < 0)
|
||||
{
|
||||
// Object not yet in the Database
|
||||
$iKey = MetaModel::GetNextKey(get_class($this));
|
||||
}
|
||||
$sName = sprintf('P-%06d', $iKey);
|
||||
$this->Set('ref', $sName);
|
||||
}
|
||||
$sName = sprintf('P-%06d', $iKey);
|
||||
$this->Set('ref', $sName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user