Added an automatic naming for the change tickets based on their Id (Same as for Incident tickets but starting with C-).

SVN:trunk[132]
This commit is contained in:
Denis Flaven
2009-09-10 14:08:22 +00:00
parent 9b7b2dd4f3
commit 156fd80320

View File

@@ -179,6 +179,19 @@ class bizChangeTicket extends cmdbAbstractObject
$this->Set('last_update', time());
return true;
}
public function ComputeFields()
{
if ($this->GetKey() > 0)
{
$sName = sprintf('C-%06d', $this->GetKey());
}
else
{
$sName = "Id not set";
}
$this->Set('name', $sName);
}
}
////////////////////////////////////////////////////////////////////////////////////