|
@@ -118,7 +118,7 @@ abstract class Change extends Ticket
|
|
|
'workgroup_id' => OPT_ATT_MANDATORY,
|
|
|
'supervisor_group_id' => OPT_ATT_MANDATORY,
|
|
|
'manager_group_id' => OPT_ATT_MANDATORY,
|
|
|
- 'description' => OPT_ATT_READONLY,
|
|
|
+ 'description' => OPT_ATT_READONLY,
|
|
|
'requestor_id' => OPT_ATT_READONLY,
|
|
|
'title' => OPT_ATT_MANDATORY,
|
|
|
),
|
|
@@ -141,7 +141,7 @@ abstract class Change extends Ticket
|
|
|
'agent_id' => OPT_ATT_MUSTCHANGE,
|
|
|
'supervisor_id' => OPT_ATT_MUSTCHANGE,
|
|
|
'manager_id' => OPT_ATT_MUSTCHANGE,
|
|
|
- 'description' => OPT_ATT_READONLY,
|
|
|
+ 'description' => OPT_ATT_READONLY,
|
|
|
'requestor_id' => OPT_ATT_READONLY,
|
|
|
),
|
|
|
)
|
|
@@ -288,14 +288,18 @@ abstract class Change extends Ticket
|
|
|
|
|
|
public function ComputeValues()
|
|
|
{
|
|
|
- $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('C-%06d', $iKey);
|
|
|
+ $this->Set('ref', $sName);
|
|
|
}
|
|
|
- $sName = sprintf('C-%06d', $iKey);
|
|
|
- $this->Set('ref', $sName);
|
|
|
}
|
|
|
|
|
|
/**
|