From 4b20b6918e70207026c7ec5eb40cbfcb23eab260 Mon Sep 17 00:00:00 2001 From: Brayan Osmar Pereyra Suxo Date: Tue, 13 May 2014 16:44:37 -0400 Subject: [PATCH 1/4] Adicion de label para exception en REPORT TABLE --- .../engine/src/ProcessMaker/BusinessModel/Table.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Table.php b/workflow/engine/src/ProcessMaker/BusinessModel/Table.php index 7e055e12b..2a5a97bce 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Table.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Table.php @@ -203,7 +203,7 @@ class Table $pro_uid = $this->validateProUid($pro_uid); $dataValidate['TAB_UID'] = (isset($dataValidate['REP_UID'])) ? $dataValidate['REP_UID'] : ''; $dataValidate['PRO_UID'] = $pro_uid; - $dataValidate['REP_TAB_NAME'] = $this->validateTabName($dataValidate['REP_TAB_NAME']); + $dataValidate['REP_TAB_NAME'] = $this->validateTabName($dataValidate['REP_TAB_NAME'], $reportFlag); $tempRepTabName = $dataValidate['REP_TAB_CONNECTION']; $dataValidate['REP_TAB_CONNECTION'] = $this->validateRepConnection($tempRepTabName, $pro_uid); if ($dataValidate['REP_TAB_TYPE'] == 'GRID') { @@ -969,11 +969,16 @@ class Table * * @return string */ - public function validateTabName ($rep_tab_name) + public function validateTabName ($rep_tab_name, $reportFlag = false) { $rep_tab_name = trim($rep_tab_name); if ((strpos($rep_tab_name, ' ')) || (strlen($rep_tab_name) < 4)) { - throw (new \Exception("The property pmt_tab_name: '$rep_tab_name' is incorrect.")); + if ($reportFlag) { + throw (new \Exception("The property rep_tab_name: '$rep_tab_name' is incorrect.")); + } else { + throw (new \Exception("The property pmt_tab_name: '$rep_tab_name' is incorrect.")); + } + } $rep_tab_name = G::toUpper($rep_tab_name); if (substr($rep_tab_name, 0, 4) != 'PMT_') { From 2281fa7232953e5a812d0c20ade55b09c4152866 Mon Sep 17 00:00:00 2001 From: Brayan Osmar Pereyra Suxo Date: Tue, 13 May 2014 16:47:46 -0400 Subject: [PATCH 2/4] Adicion de label para exception en REPORT TABLE --- workflow/engine/src/ProcessMaker/BusinessModel/Table.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Table.php b/workflow/engine/src/ProcessMaker/BusinessModel/Table.php index 2a5a97bce..244619e69 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Table.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Table.php @@ -972,13 +972,9 @@ class Table public function validateTabName ($rep_tab_name, $reportFlag = false) { $rep_tab_name = trim($rep_tab_name); + $nametype = ($reportFlag == false) ? 'pmt_tab_name' : 'rep_tab_name'; if ((strpos($rep_tab_name, ' ')) || (strlen($rep_tab_name) < 4)) { - if ($reportFlag) { - throw (new \Exception("The property rep_tab_name: '$rep_tab_name' is incorrect.")); - } else { - throw (new \Exception("The property pmt_tab_name: '$rep_tab_name' is incorrect.")); - } - + throw (new \Exception("The property $nametype: '$rep_tab_name' is incorrect.")); } $rep_tab_name = G::toUpper($rep_tab_name); if (substr($rep_tab_name, 0, 4) != 'PMT_') { From f72d3cae562e138bdabede9a10c7ff1de009cc3d Mon Sep 17 00:00:00 2001 From: Wendy Nestor Date: Tue, 13 May 2014 17:03:06 -0400 Subject: [PATCH 3/4] Arreglo en sintaxis para el feature export/import --- .../main_tests_project_export_import.feature | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/features/backend/projects/project_export_import/main_tests_project_export_import.feature b/features/backend/projects/project_export_import/main_tests_project_export_import.feature index 1f3fbf1f6..437a9efbd 100644 --- a/features/backend/projects/project_export_import/main_tests_project_export_import.feature +++ b/features/backend/projects/project_export_import/main_tests_project_export_import.feature @@ -145,7 +145,8 @@ Scenario Outline: Import a process Scenario Outline: Get a List DynaForms of a Project Process Complete BPMN Given I request "project/prj_uid/dynaforms" with the key "prj_uid" stored in session array as variable "prj_uid_" - And the content type is "application/json"se status code should be 200 + And the content type is "application/json" + Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" And the response has records @@ -157,8 +158,7 @@ Scenario Outline: Get a List DynaForms of a Project Process Complete BPMN | disable | 3 | 1455892245368ebeb11c1a5001393784 | 26 | | keep | 4 | 1455892245368ebeb11c1a5001393784 | 26 | - Then the respon - + Scenario Outline: Get the Input Documents List when there are exactly zero input documents Given I request "project/prj_uid/input-documents" with the key "prj_uid" stored in session array as variable "prj_uid_" And the content type is "application/json" From 7fdc554a696335bbbbdedee680c6c19cf08d7da4 Mon Sep 17 00:00:00 2001 From: Erik Amaru Ortiz Date: Wed, 14 May 2014 09:16:20 -0400 Subject: [PATCH 4/4] Little Fix, when a upload directory does not exists on most newest workspaces --- workflow/engine/src/ProcessMaker/Importer/Importer.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/workflow/engine/src/ProcessMaker/Importer/Importer.php b/workflow/engine/src/ProcessMaker/Importer/Importer.php index 5bfeafde0..58797862c 100644 --- a/workflow/engine/src/ProcessMaker/Importer/Importer.php +++ b/workflow/engine/src/ProcessMaker/Importer/Importer.php @@ -210,6 +210,10 @@ abstract class Importer throw new \Exception("Error while uploading file. Error code: {$data["error"]}"); } + if (! is_dir($this->getSaveDir())) { + Util\Common::mk_dir($this->getSaveDir()); + } + $this->filename = $this->getSaveDir() . $data["name"]; $oldUmask = umask(0);