Revert "N°4702 - DataModel : wrong attribute type for SLA.customercontracts_list"

This reverts commit 6b7183d500706a2bcf6340eca3478a7ca22ce7e3.
This commit is contained in:
vdumas
2022-04-25 15:05:39 +02:00
parent 8008e4d840
commit cc88ee1de0
2 changed files with 36 additions and 2 deletions

View File

@@ -1580,7 +1580,41 @@ public function PrefillSearchForm(&$aContextParam)
<edit_mode>none</edit_mode>
</field>
</fields>
<methods/>
<methods>
<method id="DoCheckToWrite">
<static>false</static>
<access>public</access>
<code><![CDATA[
public function DoCheckToWrite()
{
parent::DoCheckToWrite();
/* This check is now useless as customercontracts_list is no more editable from the SLA side
$aCustomerContracts = $this->Get("customercontracts_list");
foreach ($aCustomerContracts as $sAttCode => $oCustomerContracts)
{
// Recurse inside the subdirectories
$sOql = "SELECT lnkCustomerContractToService AS ccs WHERE ccs.customercontract_id=:customercontract_id AND ccs.service_id=:service_id";
$aQueryParams['customercontract_id'] = $oCustomerContracts->Get("customercontract_id");
$aQueryParams['service_id'] = $oCustomerContracts->Get("service_id");
if ($this->Get("id") != null)
{
$sOql = $sOql." AND ccs.sla_id!=:sla_id";
$aQueryParams['sla_id'] = $this->Get("id");
}
$oQuery = DBSearch::FromOQL($sOql, $aQueryParams);
$oResultSql = new DBObjectSet($oQuery);
$oResultSql->OptimizeColumnLoad(['ccs' => ['customercontract_name','service_name']]);
if ($aCurrentRow = $oResultSql->Fetch())
{
$this->m_aCheckIssues[] = Dict::Format('Class:SLA/Error:UniqueLnkCustomerContractToService',$aCurrentRow->Get('customercontract_name'),$aCurrentRow->Get('service_name'));
}
}
*/
}
]]></code>
</method>
</methods>
<presentation>
<details>
<items>

View File

@@ -224,7 +224,7 @@ Dict::Add('EN US', 'English', 'English', array(
'Class:cmdbAbstractObject/Method:SetComputedDateIfNull/Param:1' => 'Target Field',
'Class:cmdbAbstractObject/Method:SetComputedDateIfNull/Param:1+' => 'The field to set, in the current object',
'Class:cmdbAbstractObject/Method:SetComputedDateIfNull/Param:2' => 'Modifier',
'Class:cmdbAbstractObject/Method:SetComputedDateIfNull/Param:2+' => 'Textual information to modify the source date, eg. "monday next week"',
'Class:cmdbAbstractObject/Method:SetComputedDateIfNull/Param:2+' => 'Textual information to modify the source date, eg. "+3 days"',
'Class:cmdbAbstractObject/Method:SetComputedDateIfNull/Param:3' => 'Source field',
'Class:cmdbAbstractObject/Method:SetComputedDateIfNull/Param:3+' => 'The field used as source to apply the Modifier logic',
'Class:cmdbAbstractObject/Method:Reset' => 'Reset',