From 333fd40449bb64fc1d50bcfd4bf169041f4d0611 Mon Sep 17 00:00:00 2001 From: Ali Oezyetimoglu Date: Wed, 6 Mar 2024 10:41:51 +0100 Subject: [PATCH] RED-8561: flag for add to dictionary action was set to false in 3.6, but has to be true in 4.0 --- .../tenant/sql/205-add-dossier-dictionaries-as-entity.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/persistence-service-v1/persistence-service-processor-v1/src/main/resources/db/changelog/tenant/sql/205-add-dossier-dictionaries-as-entity.sql b/persistence-service-v1/persistence-service-processor-v1/src/main/resources/db/changelog/tenant/sql/205-add-dossier-dictionaries-as-entity.sql index 35290190e..180f15fcf 100644 --- a/persistence-service-v1/persistence-service-processor-v1/src/main/resources/db/changelog/tenant/sql/205-add-dossier-dictionaries-as-entity.sql +++ b/persistence-service-v1/persistence-service-processor-v1/src/main/resources/db/changelog/tenant/sql/205-add-dossier-dictionaries-as-entity.sql @@ -1,12 +1,12 @@ INSERT INTO entity (id, add_to_dictionary_action, description, dossier_id, dossier_template_id, hex_color, is_case_insensitive, is_hint, is_recommendation, label, rank, type, version, recommendation_hex_color, has_dictionary, system_managed, auto_hide_skipped, soft_deleted_time, skipped_hex_color, dossier_dictionary_only) -SELECT (SELECT trim(trailing ':' from trim(trailing e.dossier_id from e.id))), e.add_to_dictionary_action, e.description, NULL, e.dossier_template_id, e.hex_color, e.is_case_insensitive, e.is_hint, e.is_recommendation, +SELECT (SELECT trim(trailing ':' from trim(trailing e.dossier_id from e.id))), TRUE, e.description, NULL, e.dossier_template_id, e.hex_color, e.is_case_insensitive, e.is_hint, e.is_recommendation, e.label, e.rank, e.type, e.version, e.recommendation_hex_color, e.has_dictionary, e.system_managed, e.auto_hide_skipped, e.soft_deleted_time, e.skipped_hex_color, TRUE FROM entity e WHERE (SELECT trim(trailing ':' from trim(trailing e.dossier_id from e.id))) IS NOT NULL AND (SELECT substr(e.id, POSITION(':' IN e.id) + POSITION(':' IN substr(e.id, POSITION(':' IN e.id) + 1)) + 1)) = '' IS FALSE; UPDATE entity -SET dossier_dictionary_only = TRUE +SET dossier_dictionary_only = TRUE, add_to_dictionary_action = TRUE WHERE starts_with(id, (SELECT trim(trailing ':' from trim(trailing dossier_id from id)))); \ No newline at end of file