Prevent trigger without friendlyname

Make 'description' mandatory as it is used as friendly name, and a blank value is not clickable in the UI
This commit is contained in:
Vincent Dumas
2019-12-12 15:47:39 +01:00
committed by GitHub
parent 611e828d1a
commit 7cc63e21dd

View File

@@ -54,7 +54,7 @@ abstract class Trigger extends cmdbAbstractObject
);
MetaModel::Init_Params($aParams);
//MetaModel::Init_InheritAttributes();
MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values" => null, "sql" => "description", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values" => null, "sql" => "description", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("action_list", array("linked_class" => "lnkTriggerAction", "ext_key_to_me" => "trigger_id", "ext_key_to_remote" => "action_id", "allowed_values" => null, "count_min" => 1, "count_max" => 0, "depends_on" => array())));
// Display lists