Skip to content

Commit 262cc3c

Browse files
authored
N°5882 - AuditRule: Add Owner and Process (#775)
* N°5882 - Audit Rule: Add "Owner" and "Correction Process" fields * Fix PHP CS
1 parent b5fe12c commit 262cc3c

21 files changed

+81
-12
lines changed

application/audit.category.class.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static function Init()
4848
MetaModel::Init_AddAttribute(new AttributeString("name", ["description" => "Short name for this category", "allowed_values" => null, "sql" => "name", "default_value" => "", "is_null_allowed" => false, "depends_on" => []]));
4949
MetaModel::Init_AddAttribute(new AttributeString("description", ["allowed_values" => null, "sql" => "description", "default_value" => "", "is_null_allowed" => true, "depends_on" => []]));
5050
MetaModel::Init_AddAttribute(new AttributeOQL("definition_set", ["allowed_values" => null, "sql" => "definition_set", "default_value" => "", "is_null_allowed" => false, "depends_on" => []]));
51-
MetaModel::Init_AddAttribute(new AttributeLinkedSet("rules_list", ["linked_class" => "AuditRule", "ext_key_to_me" => "category_id", "allowed_values" => null, "count_min" => 0, "count_max" => 0, "depends_on" => [], "edit_mode" => LINKSET_EDITMODE_INPLACE, "tracking_level" => LINKSET_TRACKING_ALL]));
51+
MetaModel::Init_AddAttribute(new AttributeLinkedSet("rules_list", ["linked_class" => "AuditRule", "ext_key_to_me" => "category_id", "allowed_values" => null, "count_min" => 0, "count_max" => 0, "depends_on" => [], "edit_mode" => LINKSET_EDITMODE_INPLACE, "edit_when" => LINKSET_EDITWHEN_ALWAYS, "tracking_level" => LINKSET_TRACKING_ALL]));
5252
MetaModel::Init_AddAttribute(new AttributeInteger("ok_error_tolerance", ["allowed_values" => null, "sql" => "ok_error_tolerance", "default_value" => 5, "is_null_allowed" => true, "depends_on" => []]));
5353
MetaModel::Init_AddAttribute(new AttributeInteger("warning_error_tolerance", ["allowed_values" => null, "sql" => "warning_error_tolerance", "default_value" => 25, "is_null_allowed" => true, "depends_on" => []]));
5454
MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect(

application/audit.rule.class.inc.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@ public static function Init()
5252
MetaModel::Init_AddAttribute(new AttributeEnum("valid_flag", ["allowed_values" => new ValueSetEnum('true,false'), "sql" => "valid_flag", "default_value" => "true", "is_null_allowed" => false, "depends_on" => []]));
5353
MetaModel::Init_AddAttribute(new AttributeExternalKey("category_id", ["allowed_values" => null, "sql" => "category_id", "targetclass" => "AuditCategory", "is_null_allowed" => false, "on_target_delete" => DEL_MANUAL, "depends_on" => []]));
5454
MetaModel::Init_AddAttribute(new AttributeExternalField("category_name", ["allowed_values" => null, "extkey_attcode" => 'category_id', "target_attcode" => "name"]));
55-
55+
MetaModel::Init_AddAttribute(new AttributeExternalKey("contact_id", ["allowed_values" => null, "sql" => "contact_id", "targetclass" => "Contact", "is_null_allowed" => true, "on_target_delete" => DEL_MANUAL, "depends_on" => []]));
56+
MetaModel::Init_AddAttribute(new AttributeHTML("process", ["allowed_values" => null, "sql" => "process", "default_value" => "", "is_null_allowed" => true, "depends_on" => []]));
5657
// Display lists
57-
MetaModel::Init_SetZListItems('details', ['category_id', 'name', 'description', 'query', 'valid_flag']); // Attributes to be displayed for the complete details
58-
MetaModel::Init_SetZListItems('list', ['category_id', 'description', 'valid_flag']); // Attributes to be displayed for a list
58+
MetaModel::Init_SetZListItems('details', ['category_id', 'name', 'description', 'query', 'valid_flag', 'process', 'contact_id']); // Attributes to be displayed for the complete details
59+
MetaModel::Init_SetZListItems('list', ['category_id', 'description', 'query']); // Attributes to be displayed for a list
5960
// Search criteria
6061
MetaModel::Init_SetZListItems('standard_search', ['category_id', 'name', 'description', 'valid_flag', 'query']); // Criteria of the std search form
61-
MetaModel::Init_SetZListItems('default_search', ['name', 'description', 'category_id']); // Criteria of the advanced search form
62+
MetaModel::Init_SetZListItems('default_search', ['name', 'description', 'category_id', 'contact_id', 'query']); // Criteria of the advanced search form
6263
}
6364

6465
public static function GetShortcutActions($sFinalClass)

application/exceptions/oql/CoreOqlException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* @copyright Copyright (C) 2010-2024 Combodo SAS
45
* @license http://opensource.org/licenses/AGPL-3.0
@@ -9,5 +10,4 @@
910
*/
1011
class CoreOqlException extends CoreException
1112
{
12-
1313
}

application/exceptions/oql/CoreOqlMultipleResultsForbiddenException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* @copyright Copyright (C) 2010-2024 Combodo SAS
45
* @license http://opensource.org/licenses/AGPL-3.0
@@ -9,5 +10,4 @@
910
*/
1011
class CoreOqlMultipleResultsForbiddenException extends CoreOqlException
1112
{
12-
1313
}

dictionaries/cs.dictionary.itop.ui.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
'Class:AuditRule/Attribute:name+' => 'Krátký název pro toto pravidlo',
4141
'Class:AuditRule/Attribute:description' => 'Popis pravidla',
4242
'Class:AuditRule/Attribute:description+' => 'Dlouhý popis tohoto pravidla auditu',
43+
'Class:AuditRule/Attribute:process' => 'Correction process~~',
44+
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
4345
'Class:AuditRule/Attribute:query' => 'Dotaz ke spuštění',
4446
'Class:AuditRule/Attribute:query+' => 'OQL výraz ke spuštění',
4547
'Class:AuditRule/Attribute:valid_flag' => 'Interpretace',
@@ -52,7 +54,9 @@
5254
'Class:AuditRule/Attribute:category_id+' => 'Kategorie pro toto pravidlo',
5355
'Class:AuditRule/Attribute:category_name' => 'Kategorie',
5456
'Class:AuditRule/Attribute:category_name+' => 'Název kategorie pro toto pravidlo',
55-
]);
57+
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
58+
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
59+
]);
5660

5761
//
5862
// Class: AuditDomain

dictionaries/da.dictionary.itop.ui.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
'Class:AuditRule/Attribute:name+' => 'Kort navn for denne regel',
4141
'Class:AuditRule/Attribute:description' => 'Audit-regel beskrivelse',
4242
'Class:AuditRule/Attribute:description+' => 'Udførlig beskrivelse af denne Audit-regel',
43+
'Class:AuditRule/Attribute:process' => 'Correction process~~',
44+
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
4345
'Class:AuditRule/Attribute:query' => 'Søgning at udføre',
4446
'Class:AuditRule/Attribute:query+' => 'Den OQL forespørgsel, der skal udføres',
4547
'Class:AuditRule/Attribute:valid_flag' => 'Gyldige objekter?',
@@ -52,6 +54,8 @@
5254
'Class:AuditRule/Attribute:category_id+' => 'Kategori for denne regel',
5355
'Class:AuditRule/Attribute:category_name' => 'Kategori',
5456
'Class:AuditRule/Attribute:category_name+' => 'Kategorinavn for denne regel',
57+
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
58+
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
5559
]);
5660

5761
//

dictionaries/de.dictionary.itop.ui.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
'Class:AuditRule/Attribute:name+' => 'Kurzname für diese Regel',
4141
'Class:AuditRule/Attribute:description' => 'Beschreibung der Audit-Regel',
4242
'Class:AuditRule/Attribute:description+' => 'Ausführliche Beschreibung dieser Audit-Regel',
43+
'Class:AuditRule/Attribute:process' => 'Correction process~~',
44+
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
4345
'Class:AuditRule/Attribute:query' => 'Durchzuführende Abfrage',
4446
'Class:AuditRule/Attribute:query+' => 'Die auszuführende OQL-Abfrage',
4547
'Class:AuditRule/Attribute:valid_flag' => 'Gültiges Objekt?',
@@ -52,6 +54,8 @@
5254
'Class:AuditRule/Attribute:category_id+' => 'Kategorie für diese Regel',
5355
'Class:AuditRule/Attribute:category_name' => 'Kategorie',
5456
'Class:AuditRule/Attribute:category_name+' => 'Kategoriename für diese Regel',
57+
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
58+
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
5559
]);
5660

5761
//

dictionaries/en.dictionary.itop.ui.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@
5050
'Class:AuditRule/Attribute:name' => 'Rule name',
5151
'Class:AuditRule/Attribute:name+' => 'Short name for this rule',
5252
'Class:AuditRule/Attribute:description' => 'Description',
53-
'Class:AuditRule/Attribute:description+' => 'What is checked? How should it be fixed? Who should do it? ...',
53+
'Class:AuditRule/Attribute:description+' => 'What is checked?',
54+
'Class:AuditRule/Attribute:process' => 'Correction process',
55+
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...',
5456
'Class:AuditRule/Attribute:query' => 'Query to run',
5557
'Class:AuditRule/Attribute:query+' => 'The OQL expression to run. Returned classes must be aligned with those of the category\'s scope',
5658
'Class:AuditRule/Attribute:valid_flag' => 'Returned objects: ',
@@ -65,6 +67,8 @@
6567
'Class:AuditRule/Attribute:category_id+' => 'The category of this rule',
6668
'Class:AuditRule/Attribute:category_name' => 'Category name',
6769
'Class:AuditRule/Attribute:category_name+' => 'Name of the category of this rule',
70+
'Class:AuditRule/Attribute:contact_id' => 'Owner',
71+
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule',
6872
]);
6973

7074
//

dictionaries/en_gb.dictionary.itop.ui.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@
5050
'Class:AuditRule/Attribute:name' => 'Rule name',
5151
'Class:AuditRule/Attribute:name+' => 'Short name for this rule',
5252
'Class:AuditRule/Attribute:description' => 'Description',
53-
'Class:AuditRule/Attribute:description+' => 'What is checked? How should it be fixed? Who should do it? ...',
53+
'Class:AuditRule/Attribute:description+' => 'What is checked?~~',
54+
'Class:AuditRule/Attribute:process' => 'Correction process~~',
55+
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
5456
'Class:AuditRule/Attribute:query' => 'Query to run',
5557
'Class:AuditRule/Attribute:query+' => 'The OQL expression to run. Returned classes must be aligned with those of the category\'s scope',
5658
'Class:AuditRule/Attribute:valid_flag' => 'Returned objects: ',
@@ -65,6 +67,8 @@
6567
'Class:AuditRule/Attribute:category_id+' => 'The category of this rule',
6668
'Class:AuditRule/Attribute:category_name' => 'Category name',
6769
'Class:AuditRule/Attribute:category_name+' => 'Name of the category of this rule',
70+
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
71+
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
6872
]);
6973

7074
//

dictionaries/es_cr.dictionary.itop.ui.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
'Class:AuditRule/Attribute:name+' => 'Nombre corto para esta regla',
3939
'Class:AuditRule/Attribute:description' => 'Descripción de regla de auditoría',
4040
'Class:AuditRule/Attribute:description+' => 'Descripción larga para esta regla de auditoría',
41+
'Class:AuditRule/Attribute:process' => 'Correction process~~',
42+
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
4143
'Class:AuditRule/Attribute:query' => 'Consulta a Ejecutar',
4244
'Class:AuditRule/Attribute:query+' => 'Expresión OQL a ejecutar',
4345
'Class:AuditRule/Attribute:valid_flag' => '¿Objetos Válidos?',
@@ -50,6 +52,8 @@
5052
'Class:AuditRule/Attribute:category_id+' => 'La categoría para esta regla',
5153
'Class:AuditRule/Attribute:category_name' => 'Categoría',
5254
'Class:AuditRule/Attribute:category_name+' => 'Nombre de la categoría para esta regla',
55+
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
56+
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
5357
]);
5458

5559
//

0 commit comments

Comments
 (0)