Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
MaarchCourrier
Commits
2f63a4ee
Commit
2f63a4ee
authored
Sep 10, 2021
by
lionel.marie-louise
Browse files
FIX #18164 Management of actions with multiple statuses
parent
9362ce3c
Changes
3
Hide whitespace changes
Inline
Side-by-side
migration/20.03/2003.sql
View file @
2f63a4ee
...
...
@@ -6,7 +6,7 @@
-- --
-- *************************************************************************--
/*SGAMI-SO DEBUT*/
UPDATE
parameters
SET
param_value_string
=
'20.03.2
2
_TMA1'
WHERE
id
=
'database_version'
;
UPDATE
parameters
SET
param_value_string
=
'20.03.2
3
_TMA1'
WHERE
id
=
'database_version'
;
/*SGAMI-SO FIN*/
UPDATE
parameters
SET
description
=
'Département par défaut sélectionné dans les autocomplétions de la Base Adresse Nationale'
WHERE
id
=
'defaultDepartment'
;
...
...
@@ -952,3 +952,51 @@ INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_val
INSERT
INTO
indexing_models_fields
(
model_id
,
identifier
,
mandatory
,
default_value
,
unit
)
VALUES
(
4
,
'recipients'
,
FALSE
,
null
,
'contact'
);
INSERT
INTO
indexing_models_fields
(
model_id
,
identifier
,
mandatory
,
default_value
,
unit
)
VALUES
(
4
,
'initiator'
,
TRUE
,
null
,
'process'
);
INSERT
INTO
indexing_models_fields
(
model_id
,
identifier
,
mandatory
,
default_value
,
unit
)
VALUES
(
4
,
'destination'
,
TRUE
,
null
,
'process'
);
--- SGAMI-SO DEBUT TCKT_18164
-- Status
INSERT
INTO
public
.
status
(
id
,
label_status
,
is_system
,
img_filename
,
maarch_module
,
can_be_searched
,
can_be_modified
)
VALUES
(
'INDEX'
,
'Indexation'
,
'N'
,
'fm-letter-status-new'
,
'apps'
,
'Y'
,
'Y'
);
-- actions
INSERT
INTO
public
.
actions
(
keyword
,
label_action
,
id_status
,
is_system
,
action_page
,
component
,
history
,
parameters
)
VALUES
(
''
,
'Indexation courrier'
,
'INDEX'
,
'N'
,
'confirm_status'
,
'confirmAction'
,
'Y'
,
'{}'
);
-- indexBasket
INSERT
INTO
public
.
baskets
(
coll_id
,
basket_id
,
basket_name
,
basket_desc
,
basket_clause
,
is_visible
,
enabled
,
basket_order
,
color
,
basket_res_order
,
flag_notif
)
VALUES
(
'letterbox_coll'
,
'IndexBasket'
,
'Corbeille Indexation courrier'
,
'Corbeille Indexation courrier'
,
'status=
''
INDEX
''
'
,
'Y'
,
'Y'
,
null
,
null
,
'res_id desc'
,
'N'
);
-- groupbasket
INSERT
INTO
groupbasket
(
group_id
,
basket_id
,
list_display
,
list_event
,
list_event_data
)
VALUES
(
'AGENT'
,
'IndexBasket'
,
'[{"templateColumns":7,"subInfos":[{"value":"getPriority","cssClasses":[],"icon":"fa-traffic-light"},{"value":"getCategory","cssClasses":[],"icon":"fa-exchange-alt"},{"value":"getDoctype","cssClasses":[],"icon":"fa-suitcase"},{"value":"getAssignee","cssClasses":[],"icon":"fa-sitemap"},{"value":"getRecipients","cssClasses":[],"icon":"fa-user"},{"value":"getSenders","cssClasses":[],"icon":"fa-book"},{"value":"getCreationAndProcessLimitDates","cssClasses":["align_rightData"],"icon":"fa-calendar"}]}]'
,
'processDocument'
,
'{"defaultTab":"dashboard"}'
);
-- actions_groupbasket
--INSERT INTO actions_groupbaskets ( where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES ( '', 'AGENT', 'IndexBasket', 'Y', 'Y', 'N');
-- actions_groupbasket
INSERT
INTO
actions_groupbaskets
(
id_action
,
where_clause
,
group_id
,
basket_id
,
used_in_basketlist
,
used_in_action_page
,
default_action_list
)
VALUES
(
'19'
,
''
,
'AGENT'
,
'IndexBasket'
,
'Y'
,
'Y'
,
'Y'
);
INSERT
INTO
actions_groupbaskets
(
id_action
,
where_clause
,
group_id
,
basket_id
,
used_in_basketlist
,
used_in_action_page
,
default_action_list
)
VALUES
(
'20'
,
''
,
'AGENT'
,
'IndexBasket'
,
'Y'
,
'Y'
,
'N'
);
INSERT
INTO
actions_groupbaskets
(
id_action
,
where_clause
,
group_id
,
basket_id
,
used_in_basketlist
,
used_in_action_page
,
default_action_list
)
VALUES
(
'21'
,
''
,
'AGENT'
,
'IndexBasket'
,
'Y'
,
'Y'
,
'N'
);
-- usergroups
DO
$$
DECLARE
varIndex
int
;
BEGIN
varIndex
:
=
(
SELECT
id
FROM
actions
WHERE
id_status
=
'INDEX'
);
UPDATE
usergroups
SET
indexation_parameters
=
(
'{"actions": ["'
||
varIndex
||
'"], "entities": [], "keywords": ["ALL_ENTITIES"]}'
)::
jsonb
WHERE
group_id
=
'AGENT'
;
END
;
$$
;
-- users_baskets_preferences
INSERT
INTO
users_baskets_preferences
(
user_serial_id
,
group_serial_id
,
basket_id
,
display
)
select
distinct
usergroup_content
.
user_id
,
usergroups
.
id
,
'IndexBasket'
,
TRUE
FROM
usergroups
,
usergroup_content
,
groupbasket
WHERE
groupbasket
.
group_id
=
usergroups
.
group_id
AND
usergroups
.
id
=
usergroup_content
.
group_id
and
usergroup_content
.
group_id
=
(
select
distinct
id
FROM
usergroups
WHERE
group_id
=
'AGENT'
);
--- SGAMI-SO FIN
\ No newline at end of file
migration/20.03/200323.sql
0 → 100644
View file @
2f63a4ee
-- *************************************************************************--
-- --
-- --
-- Model migration script - 20.03.22 to 20.03.23 --
-- --
-- --
-- *************************************************************************--
--- SGAMI-SO DEBUT TCKT_18164
-- Status
INSERT
INTO
public
.
status
(
id
,
label_status
,
is_system
,
img_filename
,
maarch_module
,
can_be_searched
,
can_be_modified
)
VALUES
(
'INDEX'
,
'Indexation'
,
'N'
,
'fm-letter-status-new'
,
'apps'
,
'Y'
,
'Y'
);
-- actions
INSERT
INTO
public
.
actions
(
keyword
,
label_action
,
id_status
,
is_system
,
action_page
,
component
,
history
,
parameters
)
VALUES
(
''
,
'Indexation courrier'
,
'INDEX'
,
'N'
,
'confirm_status'
,
'confirmAction'
,
'Y'
,
'{}'
);
-- indexBasket
INSERT
INTO
public
.
baskets
(
coll_id
,
basket_id
,
basket_name
,
basket_desc
,
basket_clause
,
is_visible
,
enabled
,
basket_order
,
color
,
basket_res_order
,
flag_notif
)
VALUES
(
'letterbox_coll'
,
'IndexBasket'
,
'Corbeille Indexation courrier'
,
'Corbeille Indexation courrier'
,
'status=
''
INDEX
''
'
,
'Y'
,
'Y'
,
null
,
null
,
'res_id desc'
,
'N'
);
-- groupbasket
INSERT
INTO
groupbasket
(
group_id
,
basket_id
,
list_display
,
list_event
,
list_event_data
)
VALUES
(
'AGENT'
,
'IndexBasket'
,
'{"templateColumns":7,"subInfos":[{"value":"getPriority","cssClasses":[],"icon":"fa-traffic-light"},{"value":"getCategory","cssClasses":[],"icon":"fa-exchange-alt"},{"value":"getDoctype","cssClasses":[],"icon":"fa-suitcase"},{"value":"getAssignee","cssClasses":[],"icon":"fa-sitemap"},{"value":"getRecipients","cssClasses":[],"icon":"fa-user"},{"value":"getSenders","cssClasses":[],"icon":"fa-book"},{"value":"getCreationAndProcessLimitDates","cssClasses":["align_rightData"],"icon":"fa-calendar"}]}'
,
'processDocument'
,
'{"defaultTab":"dashboard"}'
);
-- actions_groupbasket
--INSERT INTO actions_groupbaskets ( where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES ( '', 'AGENT', 'IndexBasket', 'Y', 'Y', 'N');
-- actions_groupbasket
INSERT
INTO
actions_groupbaskets
(
id_action
,
where_clause
,
group_id
,
basket_id
,
used_in_basketlist
,
used_in_action_page
,
default_action_list
)
VALUES
(
'19'
,
''
,
'AGENT'
,
'IndexBasket'
,
'Y'
,
'Y'
,
'Y'
);
INSERT
INTO
actions_groupbaskets
(
id_action
,
where_clause
,
group_id
,
basket_id
,
used_in_basketlist
,
used_in_action_page
,
default_action_list
)
VALUES
(
'20'
,
''
,
'AGENT'
,
'IndexBasket'
,
'Y'
,
'Y'
,
'N'
);
INSERT
INTO
actions_groupbaskets
(
id_action
,
where_clause
,
group_id
,
basket_id
,
used_in_basketlist
,
used_in_action_page
,
default_action_list
)
VALUES
(
'21'
,
''
,
'AGENT'
,
'IndexBasket'
,
'Y'
,
'Y'
,
'N'
);
DO
$$
DECLARE
varIndex
int
;
BEGIN
varIndex
:
=
(
SELECT
id
FROM
actions
WHERE
id_status
=
'INDEX'
);
UPDATE
usergroups
SET
indexation_parameters
=
(
'{"actions": ["'
||
varIndex
||
'"], "entities": [], "keywords": ["ALL_ENTITIES"]}'
)::
jsonb
WHERE
group_id
=
'AGENT'
;
END
;
$$
;
-- users_baskets_preferences
INSERT
INTO
users_baskets_preferences
(
user_serial_id
,
group_serial_id
,
basket_id
,
display
)
select
distinct
usergroup_content
.
user_id
,
usergroups
.
id
,
'IndexBasket'
,
TRUE
FROM
usergroups
,
usergroup_content
,
groupbasket
WHERE
groupbasket
.
group_id
=
usergroups
.
group_id
AND
usergroups
.
id
=
usergroup_content
.
group_id
and
usergroup_content
.
group_id
=
(
select
distinct
id
FROM
usergroups
WHERE
group_id
=
'AGENT'
);
UPDATE
parameters
SET
param_value_string
=
'20.03.23_TMA1'
WHERE
id
=
'database_version'
;
--- SGAMI-SO FIN
\ No newline at end of file
migration/20.03/sgamiChangeNameCustmonFields.php
View file @
2f63a4ee
...
...
@@ -24,12 +24,14 @@ foreach ($customs as $custom) {
$newXml
=
[];
$path
=
"custom/
{
$custom
}
/apps/maarch_entreprise/xml/index_letterbox.xml"
;
$baseXml
=
simplexml_load_file
(
$base
);
if
(
file_exists
(
$path
))
{
if
(
!
is_readable
(
$path
)
||
!
is_writable
(
$path
))
{
continue
;
}
$baseXml
=
simplexml_load_file
(
$base
);
$customXml
=
simplexml_load_file
(
$path
);
$nbCustom
=
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment