Complete tests, and check validations for WebEntry CRUD.
This commit is contained in:
davidcallizaya
2017-05-22 11:26:15 -04:00
parent bfc0be7e44
commit 2b918b25fc
12 changed files with 227 additions and 45 deletions

View File

@@ -8,7 +8,7 @@ class WebEntry
"TAS_UID" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "taskUid"),
"DYN_UID" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "dynaFormUid"),
"USR_UID" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "userUid"),
"USR_UID" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "userUid"),
"WE_TITLE" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "webEntryTitle"),
"WE_DESCRIPTION" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "webEntryDescription"),
"WE_METHOD" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array("WS", "HTML"), "fieldNameAux" => "webEntryMethod"),
@@ -16,7 +16,7 @@ class WebEntry
);
private $arrayUserFieldDefinition = array(
"USR_UID" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "userUid")
"USR_UID" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "userUid")
);
private $formatFieldNameInUppercase = true;
@@ -293,7 +293,7 @@ class WebEntry
}
}
if ($arrayDataMain["WE_METHOD"] == "WS" && isset($arrayData["TAS_UID"])) {
if ($arrayDataMain["WE_METHOD"] == "WS" && isset($arrayData["TAS_UID"]) && (!isset($arrayData["WE_AUTHENTICATION"]) || $arrayData["WE_AUTHENTICATION"]!='LOGIN_REQUIRED')) {
$task = new \Tasks();
if ($task->assignUsertoTask($arrayData["TAS_UID"]) == 0) {