mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 09:38:48 +02:00
♻️ Make ticket reference generation working with new sub-classes (#78)
This commit is contained in:
committed by
OИUЯd da silva
parent
d9bf3339d2
commit
af332a34d6
@@ -902,6 +902,17 @@
|
||||
</states>
|
||||
</lifecycle>
|
||||
<methods>
|
||||
<method id="GetTicketRefFormat">
|
||||
<static>true</static>
|
||||
<access>public</access>
|
||||
<type>Overload-DBObject</type>
|
||||
<code><![CDATA[
|
||||
public static function GetTicketRefFormat()
|
||||
{
|
||||
return 'C-%06d';
|
||||
}
|
||||
]]></code>
|
||||
</method>
|
||||
<method id="SetClosureDate">
|
||||
<comment><![CDATA[/**
|
||||
* To be deprecated: use SetCurrentDate() instead
|
||||
|
||||
@@ -452,6 +452,17 @@
|
||||
</states>
|
||||
</lifecycle>
|
||||
<methods>
|
||||
<method id="GetTicketRefFormat">
|
||||
<static>true</static>
|
||||
<access>public</access>
|
||||
<type>Overload-DBObject</type>
|
||||
<code><![CDATA[
|
||||
public static function GetTicketRefFormat()
|
||||
{
|
||||
return 'C-%06d';
|
||||
}
|
||||
]]></code>
|
||||
</method>
|
||||
<method id="SetApprovalDate">
|
||||
<comment><![CDATA[/**
|
||||
* To be deprecated: use SetCurrentDate() instead
|
||||
|
||||
@@ -947,6 +947,17 @@
|
||||
</states>
|
||||
</lifecycle>
|
||||
<methods>
|
||||
<method id="GetTicketRefFormat">
|
||||
<static>true</static>
|
||||
<access>public</access>
|
||||
<type>Overload-DBObject</type>
|
||||
<code><![CDATA[
|
||||
public static function GetTicketRefFormat()
|
||||
{
|
||||
return 'I-%06d';
|
||||
}
|
||||
]]></code>
|
||||
</method>
|
||||
<method id="SetAssignedDate">
|
||||
<comment><![CDATA[/**
|
||||
* To be deprecated: use SetCurrentDate() instead
|
||||
|
||||
@@ -362,6 +362,17 @@
|
||||
</states>
|
||||
</lifecycle>
|
||||
<methods>
|
||||
<method id="GetTicketRefFormat">
|
||||
<static>true</static>
|
||||
<access>public</access>
|
||||
<type>Overload-DBObject</type>
|
||||
<code><![CDATA[
|
||||
public static function GetTicketRefFormat()
|
||||
{
|
||||
return 'P-%06d';
|
||||
}
|
||||
]]></code>
|
||||
</method>
|
||||
<method id="SetAssignedDate">
|
||||
<comment><![CDATA[/**
|
||||
* To be deprecated: use SetCurrentDate() instead
|
||||
|
||||
@@ -1074,6 +1074,17 @@
|
||||
</states>
|
||||
</lifecycle>
|
||||
<methods>
|
||||
<method id="GetTicketRefFormat">
|
||||
<static>true</static>
|
||||
<access>public</access>
|
||||
<type>Overload-DBObject</type>
|
||||
<code><![CDATA[
|
||||
public static function GetTicketRefFormat()
|
||||
{
|
||||
return 'R-%06d';
|
||||
}
|
||||
]]></code>
|
||||
</method>
|
||||
<method id="SetAssignedDate">
|
||||
<comment><![CDATA[/**
|
||||
* To be deprecated: use SetCurrentDate() instead
|
||||
|
||||
@@ -1086,6 +1086,17 @@
|
||||
</states>
|
||||
</lifecycle>
|
||||
<methods>
|
||||
<method id="GetTicketRefFormat">
|
||||
<static>true</static>
|
||||
<access>public</access>
|
||||
<type>Overload-DBObject</type>
|
||||
<code><![CDATA[
|
||||
public static function GetTicketRefFormat()
|
||||
{
|
||||
return 'R-%06d';
|
||||
}
|
||||
]]></code>
|
||||
</method>
|
||||
<method id="SetAssignedDate">
|
||||
<comment><![CDATA[/**
|
||||
* To be deprecated: use SetCurrentDate() instead
|
||||
|
||||
@@ -223,31 +223,18 @@
|
||||
<code><![CDATA[
|
||||
protected function MakeTicketRef($iNextId)
|
||||
{
|
||||
switch(get_class($this))
|
||||
{
|
||||
case 'UserRequest':
|
||||
$sFormat = 'R-%06d';
|
||||
break;
|
||||
|
||||
case 'Incident':
|
||||
$sFormat = 'I-%06d';
|
||||
break;
|
||||
|
||||
case 'Change':
|
||||
case 'RoutineChange':
|
||||
case 'EmergencyChange':
|
||||
case 'NormalChange':
|
||||
$sFormat = 'C-%06d';
|
||||
break;
|
||||
|
||||
case 'Problem':
|
||||
$sFormat = 'P-%06d';
|
||||
break;
|
||||
|
||||
default:
|
||||
$sFormat = 'T-%06d';
|
||||
}
|
||||
return sprintf($sFormat, $iNextId);
|
||||
return sprintf(static::GetTicketRefFormat(), $iNextId);
|
||||
}
|
||||
]]></code>
|
||||
</method>
|
||||
<method id="GetTicketRefFormat">
|
||||
<static>true</static>
|
||||
<access>public</access>
|
||||
<type>Overload-DBObject</type>
|
||||
<code><![CDATA[
|
||||
public static function GetTicketRefFormat()
|
||||
{
|
||||
return 'T-%06d';
|
||||
}
|
||||
]]></code>
|
||||
</method>
|
||||
|
||||
Reference in New Issue
Block a user