diff --git a/modules/attachments/remove_letterbox.php b/modules/attachments/remove_letterbox.php index bb2d98d4ea3b34ccf6b27717ae6ab7e649f3b670..f3a9914a5fa01ec83afda1241d02a6fb14addc15 100755 --- a/modules/attachments/remove_letterbox.php +++ b/modules/attachments/remove_letterbox.php @@ -21,7 +21,7 @@ $close_incoming = $_SESSION['modules_loaded']['attachments']['reconciliation'][' // Modification of the incoming document, as deleted \Resource\models\ResModel::update([ 'set' => ['status' => 'DEL'], - 'where' => ['res_id = (?)'], + 'where' => ['res_id = ?'], 'data' => [$res_id] ]); @@ -32,7 +32,7 @@ if($delete_response_project == 'true'){ \SrcCore\models\DatabaseModel::update([ 'set' => ['status' => 'DEL'], 'table' => $attachmentTable, - 'where' => ["res_id_master = (?) AND identifier = (?) AND status NOT IN ('DEL','TMP') AND attachment_type = 'response_project'"], + 'where' => ["res_id_master = ? AND identifier = ? AND status NOT IN ('DEL','TMP') AND attachment_type = 'response_project'"], 'data' => [$res_id_master[0], $tabFormValues['chrono_number']], ]); diff --git a/modules/attachments/xml/IVS/validation_rules.xml b/modules/attachments/xml/IVS/validation_rules.xml index 7eaa544c41c018d4cba1cf700a93bab14ddf203c..87a61ff459bcfcc8cad7a2ee361c8d61effda96f 100755 --- a/modules/attachments/xml/IVS/validation_rules.xml +++ b/modules/attachments/xml/IVS/validation_rules.xml @@ -29,6 +29,8 @@ <validationRule name="get_chrono_attachment" extends="standardForm" mode="error"> <parameter name="module" type="identifier" /> <parameter name="index" type="integer" /> + <parameter name="type_id" type="string" /> + <parameter name="attachment" type="string" /> </validationRule> <validationRule name="frame_list_attachments" extends="standardForm" mode="error"> diff --git a/sql/develop.sql b/sql/develop.sql index 558c40c3115dacd69a48aec29fc48d9c3c5b503a..cdb84e5dd3e0fd48cabd5078be8d541e70882970 100755 --- a/sql/develop.sql +++ b/sql/develop.sql @@ -139,6 +139,11 @@ DROP VIEW IF EXISTS res_view_letterbox; /* Alter table here because view depends on it*/ ALTER TABLE res_letterbox ALTER COLUMN priority TYPE character varying(16); +ALTER TABLE res_attachments ALTER COLUMN priority TYPE character varying(16); +ALTER TABLE res_x ALTER COLUMN priority TYPE character varying(16); +ALTER TABLE res_version_attachments ALTER COLUMN priority TYPE character varying(16); +ALTER TABLE res_version_letterbox ALTER COLUMN priority TYPE character varying(16); +ALTER TABLE res_version_x ALTER COLUMN priority TYPE character varying(16); --ALTER TABLE for external infos webservice ALTER TABLE res_letterbox DROP COLUMN IF EXISTS external_id; diff --git a/sql/structure.sql b/sql/structure.sql index bebc7e196e49ae80fa6329b2826e8d57ee4121d2..8188fb02eecc74a1432944053754ef7425f71763 100755 --- a/sql/structure.sql +++ b/sql/structure.sql @@ -334,7 +334,7 @@ CREATE TABLE res_attachments work_batch bigint, origin character varying(50) DEFAULT NULL::character varying, is_ingoing character(1) DEFAULT NULL::bpchar, - priority smallint, + priority character varying(16), initiator character varying(50) DEFAULT NULL::character varying, dest_user character varying(128) DEFAULT NULL::character varying, coll_id character varying(32) NOT NULL, @@ -1416,7 +1416,7 @@ CREATE TABLE res_x work_batch bigint, origin character varying(50) DEFAULT NULL::character varying, is_ingoing character(1) DEFAULT NULL::bpchar, - priority smallint, + priority character varying(16), arbatch_id bigint DEFAULT NULL, policy_id character varying(32) DEFAULT NULL::character varying, cycle_id character varying(32) DEFAULT NULL::character varying, @@ -1742,7 +1742,7 @@ CREATE TABLE res_version_letterbox work_batch bigint, origin character varying(50) DEFAULT NULL::character varying, is_ingoing character(1) DEFAULT NULL::bpchar, - priority smallint, + priority character varying(16), arbatch_id bigint, policy_id character varying(32), cycle_id character varying(32), @@ -1857,7 +1857,7 @@ CREATE TABLE res_version_x work_batch bigint, origin character varying(50) DEFAULT NULL::character varying, is_ingoing character(1) DEFAULT NULL::bpchar, - priority smallint, + priority character varying(16), arbatch_id bigint, policy_id character varying(32), cycle_id character varying(32), @@ -2470,7 +2470,7 @@ CREATE TABLE res_version_attachments work_batch bigint, origin character varying(50) DEFAULT NULL::character varying, is_ingoing character(1) DEFAULT NULL::bpchar, - priority smallint, + priority character varying(16), arbatch_id bigint, policy_id character varying(32), cycle_id character varying(32),