mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-18 06:48:50 +02:00
Customer portal: the list of service subcategories of a user request must be filtered on 'service request'
SVN:trunk[4079]
This commit is contained in:
@@ -31,43 +31,6 @@
|
||||
$oRet = new UserRequest();
|
||||
}
|
||||
return $oRet;
|
||||
}]]></code>
|
||||
</method>
|
||||
</methods>
|
||||
</class>
|
||||
<class id="UserRequest">
|
||||
<fields>
|
||||
<field id="request_type" xsi:type="AttributeEnum">
|
||||
<default_value _delta="redefine"></default_value>
|
||||
</field>
|
||||
<field id="servicesubcategory_id" xsi:type="AttributeExternalKey">
|
||||
<filter _delta="redefine">
|
||||
<![CDATA[SELECT ServiceSubcategory WHERE service_id = :this->service_id AND (ISNULL(:this->request_type) OR request_type = :this->request_type) AND status != 'obsolete']]></filter>
|
||||
</field>
|
||||
</fields>
|
||||
<methods>
|
||||
<method id="ComputeValues" _delta="redefine">
|
||||
<static>false</static>
|
||||
<access>public</access>
|
||||
<type>Overload-DBObject</type>
|
||||
<code><![CDATA[ public function ComputeValues()
|
||||
{
|
||||
// Compute the priority of the ticket
|
||||
$this->Set('priority', $this->ComputePriority());
|
||||
|
||||
// Compute the request_type if not already given
|
||||
$sType = $this->Get('request_type');
|
||||
if (is_null($sType) || ($sType === ''))
|
||||
{
|
||||
$iSvcSubcat = $this->Get('servicesubcategory_id');
|
||||
if ($iSvcSubcat != 0)
|
||||
{
|
||||
$sType = $this->Get('servicesubcategory_id->request_type');
|
||||
$this->Set('request_type', $sType);
|
||||
}
|
||||
}
|
||||
|
||||
return parent::ComputeValues();
|
||||
}]]></code>
|
||||
</method>
|
||||
</methods>
|
||||
|
||||
Reference in New Issue
Block a user