diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index 4e4ed34b5..33445cb8f 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -1732,7 +1732,7 @@ class AttributeLinkedSet extends AttributeDefinition */ public function GetHasConstraint() { - return $this->GetOptional('with_constrain', false); + return $this->GetOptional('with_constraint', false); } /** diff --git a/core/datamodel.core.xml b/core/datamodel.core.xml index 05ab9fba1..57c14f76c 100644 --- a/core/datamodel.core.xml +++ b/core/datamodel.core.xml @@ -482,8 +482,8 @@ boolean true - - with_constrain + + with_constraint false boolean false diff --git a/core/userrights.class.inc.php b/core/userrights.class.inc.php index a35dfb3bd..c67efee1b 100644 --- a/core/userrights.class.inc.php +++ b/core/userrights.class.inc.php @@ -248,8 +248,8 @@ abstract class User extends cmdbAbstractObject "depends_on" => array(), ))); - MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("profile_list",array("linked_class" => "URP_UserProfile", "ext_key_to_me" => "userid", "ext_key_to_remote" => "profileid", "allowed_values" => null, "count_min" => 1, "count_max" => 0, "depends_on" => array(), "display_style" => 'property', "with_constrain" => true))); - MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("allowed_org_list", array("linked_class" => "URP_UserOrg", "ext_key_to_me" => "userid", "ext_key_to_remote" => "allowed_org_id", "allowed_values" => null, "count_min" => 1, "count_max" => 0, "depends_on" => array(), 'with_constrain' => true))); + MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("profile_list",array("linked_class" => "URP_UserProfile", "ext_key_to_me" => "userid", "ext_key_to_remote" => "profileid", "allowed_values" => null, "count_min" => 1, "count_max" => 0, "depends_on" => array(), "display_style" => 'property', "with_constraint" => true))); + MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("allowed_org_list", array("linked_class" => "URP_UserOrg", "ext_key_to_me" => "userid", "ext_key_to_remote" => "allowed_org_id", "allowed_values" => null, "count_min" => 1, "count_max" => 0, "depends_on" => array(), 'with_constraint' => true))); MetaModel::Init_AddAttribute(new AttributeCaseLog("log", array("sql" => 'log', "is_null_allowed" => true, "default_value" => '', "allowed_values" => null, "depends_on" => array(), "always_load_in_tables" => false))); // Display lists diff --git a/setup/compiler.class.inc.php b/setup/compiler.class.inc.php index b1f5d338e..828cf0e04 100644 --- a/setup/compiler.class.inc.php +++ b/setup/compiler.class.inc.php @@ -2064,7 +2064,7 @@ EOF $this->CompileCommonProperty('display_style', $oField, $aParameters, $sModuleRelativeDir); $this->CompileCommonProperty('filter', $oField, $aParameters, $sModuleRelativeDir); $this->CompileCommonProperty('allowed_values', $oField, $aParameters, $sModuleRelativeDir); - $this->CompileCommonProperty('with_constrain', $oField, $aParameters, $sModuleRelativeDir, false); + $this->CompileCommonProperty('with_constraint', $oField, $aParameters, $sModuleRelativeDir, false); $aParameters['depends_on'] = $sDependencies; } elseif ($sAttType == 'AttributeLinkedSet') { $this->CompileCommonProperty('linked_class', $oField, $aParameters, $sModuleRelativeDir); @@ -2074,7 +2074,7 @@ EOF $this->CompileCommonProperty('display_style', $oField, $aParameters, $sModuleRelativeDir); $this->CompileCommonProperty('edit_mode', $oField, $aParameters, $sModuleRelativeDir); $this->CompileCommonProperty('filter', $oField, $aParameters, $sModuleRelativeDir); - $this->CompileCommonProperty('with_constrain', $oField, $aParameters, $sModuleRelativeDir, false); + $this->CompileCommonProperty('with_constraint', $oField, $aParameters, $sModuleRelativeDir, false); $aParameters['depends_on'] = $sDependencies; } elseif ($sAttType == 'AttributeExternalKey') { $this->CompileCommonProperty('target_class', $oField, $aParameters, $sModuleRelativeDir); diff --git a/setup/itopdesignformat.class.inc.php b/setup/itopdesignformat.class.inc.php index 1b0db8799..348421db1 100644 --- a/setup/itopdesignformat.class.inc.php +++ b/setup/itopdesignformat.class.inc.php @@ -1133,9 +1133,9 @@ class iTopDesignFormat $this->RemoveNodeFromXPath("/itop_design/classes//class/fields/field[@xsi:type='AttributeLinkedSetIndirect']/display_style"); // N°6228 - Remove last Profil of a User / Exceed SaaS User quota without control - // - Remove with_constrain - $this->RemoveNodeFromXPath("/itop_design/classes//class/fields/field[@xsi:type='AttributeLinkedSet']/with_constrain"); - $this->RemoveNodeFromXPath("/itop_design/classes//class/fields/field[@xsi:type='AttributeLinkedSetIndirect']/with_constrain"); + // - Remove with_constraint + $this->RemoveNodeFromXPath("/itop_design/classes//class/fields/field[@xsi:type='AttributeLinkedSet']/with_constraint"); + $this->RemoveNodeFromXPath("/itop_design/classes//class/fields/field[@xsi:type='AttributeLinkedSetIndirect']/with_constraint"); // N°2783 - Custom zlists $this->RemoveNodeFromXPath("/itop_design/classes//class/presentation/custom_presentations"); diff --git a/tests/php-unit-tests/unitary-tests/setup/iTopDesignFormat/Convert-samples/3.1_to_3.0.input.xml b/tests/php-unit-tests/unitary-tests/setup/iTopDesignFormat/Convert-samples/3.1_to_3.0.input.xml index a5f29dd3e..35570f510 100644 --- a/tests/php-unit-tests/unitary-tests/setup/iTopDesignFormat/Convert-samples/3.1_to_3.0.input.xml +++ b/tests/php-unit-tests/unitary-tests/setup/iTopDesignFormat/Convert-samples/3.1_to_3.0.input.xml @@ -92,14 +92,14 @@ - true + true - true + true