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:
Romain Quetiez
2016-05-13 13:33:05 +00:00
parent 291a5847f0
commit 73274ec461

View File

@@ -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>