Commit c65d2335 authored by Kristel Meikas's avatar Kristel Meikas
Browse files

Merge branch 'develop' into 'master'

Release: merge 'develop' into 'master' created by Kristel Meikas

See merge request teis/classifiers-service!76
parents f84965e9 b56f3d39
# Changelog
## [1.17.0] - 2021-02-07
* added data to classifier_item table for risk assessments: vocabulary, risk factor category and business type category
items
* updated fill_created_at_value function to not update modified_at value
* refactored DataType enum from classifiers package to root package
* added new scope type PUBLIC
* added new role privilege code TI_MANAGE_PARAMETERS
## [1.16.0] - 2021-01-22
* added classifier for new risk assessment status PUBLISHED
......
theGroup=ee.sm.ti.teis
theVersion=1.16.1
commonsVersion=1.17.0
theVersion=1.17.0
commonsVersion=1.19.0
officeApiGatewayVersion=1.17.0
schedulerVersion=1.12.0
schedulerVersion=1.13.0
pluginVersion=1.2.0
package ee.sm.ti.teis.classifiers.classifier.attribute;
import ee.sm.ti.teis.servicecommon.common.AuditedEntity;
import ee.sm.ti.teis.types.enums.classifier.DataType;
import ee.sm.ti.teis.types.enums.DataType;
import lombok.Getter;
import lombok.Setter;
......
......@@ -10,7 +10,7 @@ import ee.sm.ti.teis.classifiers.classifier.item.service.ClassifierItemNotifySer
import ee.sm.ti.teis.exceptions.TeisBusinessException;
import ee.sm.ti.teis.officegateway.classifiers.dto.ClassifierAttributeValueDto;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import ee.sm.ti.teis.types.enums.classifier.DataType;
import ee.sm.ti.teis.types.enums.DataType;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
......
--liquibase formatted sql
--changeset kristel:2021-02-02.TEIS-1896.update-risk-assessment-classifier-items-editable-and-valid_from-values
UPDATE classifier_item SET editable = true
WHERE classifier_definition_id IN ('VOCABULARY', 'RISK_BUSINESS_TYPE_CATEGORY', 'RISK_FACTOR_CATEGORY');
UPDATE classifier_item SET valid_from = now()
WHERE classifier_definition_id IN ('VOCABULARY', 'RISK_BUSINESS_TYPE_CATEGORY', 'RISK_FACTOR_CATEGORY');
\ No newline at end of file
......@@ -4,7 +4,7 @@
--changeset raigo:classif_import_test_data runAlways:false runOnChange:true context:local,dev,integtest,test
DELETE FROM classifier_attribute_value WHERE value LIKE 'TEIS-TEST%' OR classifier_item_id LIKE 'TEST_%';
DELETE FROM classifier_attribute_value WHERE value LIKE 'TEIS-TEST%' OR classifier_item_id LIKE 'TEST%' OR classifier_item_id LIKE '%_TEST%';
DELETE FROM classifier_item_link WHERE source_classifier_item_id LIKE 'TEST_%';
DELETE FROM classifier_item_link WHERE target_classifier_item_id LIKE 'TEST_%';
DELETE FROM classifier_item_link WHERE object_status = 'DELETED';
......@@ -22,8 +22,8 @@ VALUES
('TEST_NONHIERARCHICAL', null, false, 'Siilid', false,FALSE),
('TEST_EDITABLENONHIERARCHICAL', null, true, 'Rebased', false,TRUE),
('TEST_NONEDITABLEHIERARCHICAL', null, false, 'Kanad', true, FALSE),
('TEST_RISK_BUSINESS_TYPE_CATEGORY', null, true, 'Ärid', true, FALSE),
('TEST_RISK_FACTOR_CATEGORY', 'ACTIVE', true, 'Riskianalüüsi riski kategooriate grupp (liigituse kõrgem tase).', false, true);
('TEST_RISK_BUSINESS_TYPE_CATEGORY', null, true, 'TEST Ärid', true, FALSE),
('TEST_RISK_FACTOR_CATEGORY', 'ACTIVE', true, 'TEST Riskianalüüsi riski kategooriate grupp (liigituse kõrgem tase).', false, true);
INSERT INTO classifier_attribute_definition (id, classifier_definition_id, code, name, mandatory, data_type)
VALUES
......@@ -87,21 +87,21 @@ VALUES
('INSPECTION_TOPIC__INSPECTION_TOPIC_3_2_1','INSPECTION_TOPIC','INSPECTION_TOPIC_3_2_1',TRUE, '3.2.1. Kas liikumisteed on märgistatud korrektselt?', 'CURRENT', 100000001, 'INSPECTION_TOPIC__INSPECTION_TOPIC_3_2', now(), null, 3),
('INSPECTION_TOPIC__INSPECTION_TOPIC_3_2_2','INSPECTION_TOPIC','INSPECTION_TOPIC_3_2_2',TRUE, '3.2.2. Kas liikumisteel esinevad takistused on märgistatud?', 'CURRENT', 100000002, 'INSPECTION_TOPIC__INSPECTION_TOPIC_3_2', now(), null,3 ),
('INSPECTION_TOPIC__INSPECTION_TOPIC_3_2_3','INSPECTION_TOPIC','INSPECTION_TOPIC_3_2_3',TRUE, '3.2.3. Kas tõkestatud liikumisteede puhul on liikumine märgistusega ümber suunatud?', 'CURRENT', 100000003, 'INSPECTION_TOPIC__INSPECTION_TOPIC_3_2', now(), null, 3),
('TEST_RISK_BUSINESS_TYPE_CATEGORY__FISHING', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'FISHING', FALSE, 'just fishing stuff', 'CURRENT', 100000001, null,now(),null, 1),
('TEST_RISK_BUSINESS_TYPE_CATEGORY__DEMOLITION', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'DEMOLITION', FALSE, 'wrecking stuff', 'CURRENT', 100000002, null,now(),null, 1),
('TEST_RISK_BUSINESS_TYPE_CATEGORY__FORESTRY', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'FORESTRY', FALSE, 'Forest management', 'CURRENT', 100000002, null,now(),null, 1),
('TEST_RISK_BUSINESS_TYPE_CATEGORY__OFFICE', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'OFFICE', FALSE, 'Office work', 'CURRENT', 100000002, null,now(),null, 1),
('TEST_RISK_BUSINESS_TYPE_CATEGORY__MEDICINE', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'MEDICINE', FALSE, 'fixing humanoids', 'CURRENT', 100000003, null,now(),null, 1),
('TEST_RISK_FACTOR_CATEGORY__RADIATION', 'TEST_RISK_FACTOR_CATEGORY', 'RADIATION', FALSE, 'Radiatsiooni tase', 'CURRENT', 100000001, null,now(),null, null),
('TEST_RISK_FACTOR_CATEGORY__FORESTRY', 'TEST_RISK_FACTOR_CATEGORY', 'FORESTRY', FALSE, 'Puidutööstus', 'CURRENT', 100000001, null,now(),null, null),
('TEST_RISK_FACTOR_CATEGORY__OFFICE', 'TEST_RISK_FACTOR_CATEGORY', 'OFFICE', FALSE, 'Kontoritöö', 'CURRENT', 100000001, null,now(),null, null),
('TEST_RISK_FACTOR_CATEGORY__GENERAL', 'TEST_RISK_FACTOR_CATEGORY', 'GENERAL', FALSE, 'Kõik', 'CURRENT', 100000001, null,now(),null, null),
('TEST_RISK_FACTOR_CATEGORY__ABSORB', 'TEST_RISK_FACTOR_CATEGORY', 'ABSORB', FALSE, 'Imavuse tähtis mõõdik', 'CURRENT', 100000002, null,now(),null, null),
('RISK_BUSINESS_TYPE_CATEGORY__PLACEHOLDER_FOR_TESTING', 'RISK_BUSINESS_TYPE_CATEGORY', 'PLACEHOLDER_FOR_TESTING', TRUE, 'Ajutine klassifikaator testimiseks', 'CURRENT', 100000004, null, now(), null, null),
('RISK_BUSINESS_TYPE_CATEGORY__PLACEHOLDER_FOR_TESTING2', 'RISK_BUSINESS_TYPE_CATEGORY', 'PLACEHOLDER_FOR_TESTING2', TRUE, 'Ajutine klassifikaator 2 testimiseks, deleted', 'DELETED', 100000005, null, now(), null, null),
('RISK_BUSINESS_TYPE_CATEGORY__PLACEHOLDER_FOR_TESTING3', 'RISK_BUSINESS_TYPE_CATEGORY', 'PLACEHOLDER_FOR_TESTING3', TRUE, 'Ajutine klassifikaator 3 testimiseks', 'CURRENT', 100000006, null, now(), null, null),
('RISK_FACTOR_CATEGORY__PLACEHOLDER_FOR_TESTING', 'RISK_FACTOR_CATEGORY', 'PLACEHOLDER_FOR_TESTING', FALSE, 'Placeholder for testing risk factor category', 'CURRENT', 100000005, null, now(),null,null),
('RISK_FACTOR_CATEGORY__PLACEHOLDER_FOR_TESTING2', 'RISK_FACTOR_CATEGORY', 'PLACEHOLDER_FOR_TESTING2', FALSE, 'Placeholder for testing risk factor category, deleted', 'DELETED', 100000006, null, now(),null,null);
('TEST_RISK_BUSINESS_TYPE_CATEGORY__FISHING', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'FISHING', FALSE, 'TEST just fishing stuff', 'CURRENT', 100000001, null,now(),null, 1),
('TEST_RISK_BUSINESS_TYPE_CATEGORY__DEMOLITION', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'DEMOLITION', FALSE, 'TEST wrecking stuff', 'CURRENT', 100000002, null,now(),null, 1),
('TEST_RISK_BUSINESS_TYPE_CATEGORY__FORESTRY', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'FORESTRY', FALSE, 'TEST Forest management', 'CURRENT', 100000002, null,now(),null, 1),
('TEST_RISK_BUSINESS_TYPE_CATEGORY__OFFICE', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'OFFICE', FALSE, 'TEST Office work', 'CURRENT', 100000002, null,now(),null, 1),
('TEST_RISK_BUSINESS_TYPE_CATEGORY__MEDICINE', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'MEDICINE', FALSE, 'TEST fixing humanoids', 'CURRENT', 100000003, null,now(),null, 1),
('TEST_RISK_FACTOR_CATEGORY__RADIATION', 'TEST_RISK_FACTOR_CATEGORY', 'RADIATION', FALSE, 'TEST Radiatsiooni tase', 'CURRENT', 100000001, null,now(),null, null),
('TEST_RISK_FACTOR_CATEGORY__FORESTRY', 'TEST_RISK_FACTOR_CATEGORY', 'FORESTRY', FALSE, 'TEST Puidutööstus', 'CURRENT', 100000001, null,now(),null, null),
('TEST_RISK_FACTOR_CATEGORY__OFFICE', 'TEST_RISK_FACTOR_CATEGORY', 'OFFICE', FALSE, 'TEST Kontoritöö', 'CURRENT', 100000001, null,now(),null, null),
('TEST_RISK_FACTOR_CATEGORY__GENERAL', 'TEST_RISK_FACTOR_CATEGORY', 'GENERAL', FALSE, 'TEST Kõik', 'CURRENT', 100000001, null,now(),null, null),
('TEST_RISK_FACTOR_CATEGORY__ABSORB', 'TEST_RISK_FACTOR_CATEGORY', 'ABSORB', FALSE, 'TEST Imavuse tähtis mõõdik', 'CURRENT', 100000002, null,now(),null, null),
('RISK_BUSINESS_TYPE_CATEGORY__PLACEHOLDER_FOR_TESTING', 'RISK_BUSINESS_TYPE_CATEGORY', 'PLACEHOLDER_FOR_TESTING', TRUE, 'TEST Ajutine klassifikaator testimiseks', 'CURRENT', 100000004, null, now(), null, null),
('RISK_BUSINESS_TYPE_CATEGORY__PLACEHOLDER_FOR_TESTING2', 'RISK_BUSINESS_TYPE_CATEGORY', 'PLACEHOLDER_FOR_TESTING2', TRUE, 'TEST Ajutine klassifikaator 2 testimiseks, deleted', 'DELETED', 100000005, null, now(), null, null),
('RISK_BUSINESS_TYPE_CATEGORY__PLACEHOLDER_FOR_TESTING3', 'RISK_BUSINESS_TYPE_CATEGORY', 'PLACEHOLDER_FOR_TESTING3', TRUE, 'TEST Ajutine klassifikaator 3 testimiseks', 'CURRENT', 100000006, null, now(), null, null),
('RISK_FACTOR_CATEGORY__PLACEHOLDER_FOR_TESTING', 'RISK_FACTOR_CATEGORY', 'PLACEHOLDER_FOR_TESTING', FALSE, 'TEST Placeholder for testing risk factor category', 'CURRENT', 100000005, null, now(),null,null),
('RISK_FACTOR_CATEGORY__PLACEHOLDER_FOR_TESTING2', 'RISK_FACTOR_CATEGORY', 'PLACEHOLDER_FOR_TESTING2', FALSE, 'TEST Placeholder for testing risk factor category, deleted', 'DELETED', 100000006, null, now(),null,null);
/*ATTRIBUTE VALUES*/
INSERT INTO classifier_attribute_value (id, object_status, classifier_item_id, classifier_attribute_definition_id, value)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment