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" diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Table.php b/workflow/engine/src/ProcessMaker/BusinessModel/Table.php index 7e055e12b..244619e69 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,12 @@ 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); + $nametype = ($reportFlag == false) ? 'pmt_tab_name' : '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.")); + 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_') { 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);