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

This commit is contained in:
vdumas
2022-04-25 10:23:12 +02:00
parent 1d9a9bcb28
commit f4170ade8a
3 changed files with 40 additions and 39 deletions

View File

@@ -1544,43 +1544,42 @@ public function PrefillSearchForm(&$aContextParam)
</reconciliation>
</properties>
<fields>
<field id="name" xsi:type="AttributeString">
<sql>name</sql>
<default_value/>
<is_null_allowed>false</is_null_allowed>
</field>
<field id="description" xsi:type="AttributeText">
<sql>description</sql>
<default_value/>
<is_null_allowed>true</is_null_allowed>
</field>
<field id="org_id" xsi:type="AttributeExternalKey">
<sql>org_id</sql>
<target_class>Organization</target_class>
<is_null_allowed>false</is_null_allowed>
<on_target_delete>DEL_MANUAL</on_target_delete>
</field>
<field id="organization_name" xsi:type="AttributeExternalField">
<extkey_attcode>org_id</extkey_attcode>
<target_attcode>name</target_attcode>
</field>
<field id="slts_list" xsi:type="AttributeLinkedSetIndirect">
<linked_class>lnkSLAToSLT</linked_class>
<ext_key_to_me>sla_id</ext_key_to_me>
<count_min>0</count_min>
<count_max>0</count_max>
<ext_key_to_remote>slt_id</ext_key_to_remote>
<duplicates/>
</field>
<field id="customercontracts_list" xsi:type="AttributeLinkedSetIndirect">
<linked_class>lnkCustomerContractToService</linked_class>
<ext_key_to_me>sla_id</ext_key_to_me>
<count_min>0</count_min>
<count_max>0</count_max>
<ext_key_to_remote>customercontract_id</ext_key_to_remote>
<duplicates>true</duplicates>
</field>
</fields>
<field id="name" xsi:type="AttributeString">
<sql>name</sql>
<default_value/>
<is_null_allowed>false</is_null_allowed>
</field>
<field id="description" xsi:type="AttributeText">
<sql>description</sql>
<default_value/>
<is_null_allowed>true</is_null_allowed>
</field>
<field id="org_id" xsi:type="AttributeExternalKey">
<sql>org_id</sql>
<target_class>Organization</target_class>
<is_null_allowed>false</is_null_allowed>
<on_target_delete>DEL_MANUAL</on_target_delete>
</field>
<field id="organization_name" xsi:type="AttributeExternalField">
<extkey_attcode>org_id</extkey_attcode>
<target_attcode>name</target_attcode>
</field>
<field id="slts_list" xsi:type="AttributeLinkedSetIndirect">
<linked_class>lnkSLAToSLT</linked_class>
<ext_key_to_me>sla_id</ext_key_to_me>
<count_min>0</count_min>
<count_max>0</count_max>
<ext_key_to_remote>slt_id</ext_key_to_remote>
<duplicates/>
</field>
<field id="customercontracts_list" xsi:type="AttributeLinkedSet">
<linked_class>lnkCustomerContractToService</linked_class>
<ext_key_to_me>sla_id</ext_key_to_me>
<count_min>0</count_min>
<count_max>0</count_max>
<edit_mode>none</edit_mode>
</field>
</fields>
<methods>
<method id="DoCheckToWrite">
<static>false</static>
@@ -1590,6 +1589,7 @@ public function PrefillSearchForm(&$aContextParam)
{
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)
{
@@ -1610,6 +1610,7 @@ public function PrefillSearchForm(&$aContextParam)
$this->m_aCheckIssues[] = Dict::Format('Class:SLA/Error:UniqueLnkCustomerContractToService',$aCurrentRow->Get('customercontract_name'),$aCurrentRow->Get('service_name'));
}
}
*/
}
]]></code>
</method>

View File

@@ -341,7 +341,7 @@ Dict::Add('EN US', 'English', 'English', array(
'Class:SLA/Attribute:slts_list' => 'SLTs',
'Class:SLA/Attribute:slts_list+' => 'All the service level targets for this SLA',
'Class:SLA/Attribute:customercontracts_list' => 'Customer contracts',
'Class:SLA/Attribute:customercontracts_list+' => 'All the customer contracts using this SLA',
'Class:SLA/Attribute:customercontracts_list+' => 'All the customer contracted services using this SLA',
'Class:SLA/Error:UniqueLnkCustomerContractToService' => 'Could not save link with Customer contract %1$s and service %2$s : SLA already exists',
));

View File

@@ -331,7 +331,7 @@ Dict::Add('FR FR', 'French', 'Français', array(
'Class:SLA/Attribute:slts_list' => 'SLTs',
'Class:SLA/Attribute:slts_list+' => '',
'Class:SLA/Attribute:customercontracts_list' => 'Contrats clients',
'Class:SLA/Attribute:customercontracts_list+' => '',
'Class:SLA/Attribute:customercontracts_list+' => 'Services contractés par des clients avec ce niveau de service',
'Class:SLA/Error:UniqueLnkCustomerContractToService' => 'Impossible de sauvegarder le lien avec le contrat client %1$s et le service %2$s : un SLA existe déjà.',
));