mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
Fixed bug in the history of tickets (incident or any other type, for which the name is based on the ticket ID, which remained undetermined until the record is created)
SVN:code[142]
This commit is contained in:
@@ -180,16 +180,15 @@ class bizChangeTicket extends cmdbAbstractObject
|
||||
return true;
|
||||
}
|
||||
|
||||
public function ComputeFields()
|
||||
public function ComputeValues()
|
||||
{
|
||||
if ($this->GetKey() > 0)
|
||||
$iKey = $this->GetKey();
|
||||
if ($iKey < 0)
|
||||
{
|
||||
$sName = sprintf('C-%06d', $this->GetKey());
|
||||
}
|
||||
else
|
||||
{
|
||||
$sName = "Id not set";
|
||||
// Object not yet in the Database
|
||||
$iKey = MetaModel::GetNextKey(get_class($this));
|
||||
}
|
||||
$sName = sprintf('C-%06d', $iKey);
|
||||
$this->Set('name', $sName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,16 +144,15 @@ class bizServiceCall extends cmdbAbstractObject
|
||||
return true;
|
||||
}
|
||||
|
||||
public function ComputeFields()
|
||||
public function ComputeValues()
|
||||
{
|
||||
if ($this->GetKey() > 0)
|
||||
$iKey = $this->GetKey();
|
||||
if ($iKey < 0)
|
||||
{
|
||||
$sName = sprintf('I-%06d', $this->GetKey());
|
||||
}
|
||||
else
|
||||
{
|
||||
$sName = "Id not set";
|
||||
// Object not yet in the Database
|
||||
$iKey = MetaModel::GetNextKey(get_class($this));
|
||||
}
|
||||
$sName = sprintf('S-%06d', $iKey);
|
||||
$this->Set('name', $sName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,16 +149,15 @@ class bizIncidentTicket extends cmdbAbstractObject
|
||||
return true;
|
||||
}
|
||||
|
||||
public function ComputeFields()
|
||||
public function ComputeValues()
|
||||
{
|
||||
if ($this->GetKey() > 0)
|
||||
$iKey = $this->GetKey();
|
||||
if ($iKey < 0)
|
||||
{
|
||||
$sName = sprintf('I-%06d', $this->GetKey());
|
||||
}
|
||||
else
|
||||
{
|
||||
$sName = "Id not set";
|
||||
// Object not yet in the Database
|
||||
$iKey = MetaModel::GetNextKey(get_class($this));
|
||||
}
|
||||
$sName = sprintf('I-%06d', $iKey);
|
||||
$this->Set('name', $sName);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user