Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 5ccdb8cd by Tony Chemit at 2024-12-11T14:19:14+01:00 Fix speciesList 100 labels - - - - - 2378fde7 by Tony Chemit at 2024-12-11T14:19:20+01:00 Fix speciesList 101 labels - - - - - 2cae2d9f by Tony Chemit at 2024-12-11T14:28:09+01:00 add speciesList 102 and 103 - - - - - d3d58cd2 by Tony Chemit at 2024-12-11T14:29:14+01:00 Update tests fixtures - - - - - d7fc7e17 by Tony Chemit at 2024-12-11T14:45:00+01:00 Merge branch 'feature/issue_2958' into develop A propos des listes d'espèces pour les calculs de consolidation - Closes #2958 - - - - - 7 changed files: - core/persistence/migration/src/main/java/fr/ird/observe/spi/migration/v9/DataSourceMigrationForVersion_9_4.java - core/persistence/migration/src/main/resources/db/migration/v9/9.4/01_issue-2931-common.sql - core/persistence/migration/src/main/resources/db/migration/v9/9.4/04_02_issue-2669-common.sql - + core/persistence/migration/src/main/resources/db/migration/v9/9.4/07_issue-2958-common.sql - core/persistence/test/src/test/resources/fixtures/persistence/table_count/referential.properties - core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ValidateService-referentialResult-common-default.json - model/src/main/resources/fixtures/global.properties Changes: ===================================== core/persistence/migration/src/main/java/fr/ird/observe/spi/migration/v9/DataSourceMigrationForVersion_9_4.java ===================================== @@ -71,6 +71,10 @@ public class DataSourceMigrationForVersion_9_4 extends ByMajorMigrationVersionRe issue2932(executor,withIds); // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2959 issue2959(executor,withIds); + if (withIds) { + // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2958 + executor.addScript("07", "issue-2958"); + } } private void issue2914(MigrationVersionResourceExecutor executor) { ===================================== core/persistence/migration/src/main/resources/db/migration/v9/9.4/01_issue-2931-common.sql ===================================== @@ -20,7 +20,7 @@ -- #L% --- -- add a new species list PS - Catch -INSERT INTO common.SpeciesList (topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate, homeid) VALUES ('fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}100', 0, ${CURRENT_DATE}, '100', 1, null, 'Consolidation (PS Logbook SampleActivity.weightedWeight)', 'Consolidation (PS Logbook SampleActivity.weightedWeight)', 'Consolidation (PS Logbook SampleActivity.weightedWeight) TODO', null, null, null, null, null, false, ${CURRENT_TIMESTAMP} , null); +INSERT INTO common.SpeciesList (topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate, homeid) VALUES ('fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}100', 0, ${CURRENT_DATE}, '100', 1, null, 'Consolidation - PS Logbook - Weighted weights - fleet France', 'Consolidation - PS Logbook - Poids pondérés - flotte France', 'Consolidación - PS Logbook - Pesos ponderados - flota de Francia', null, null, null, null, null, false, ${CURRENT_TIMESTAMP} , null); INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685474#0.8943253454598569', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}100'); INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685474#0.975344121171992', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}100'); INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685475#0.13349466123905152', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}100'); ===================================== core/persistence/migration/src/main/resources/db/migration/v9/9.4/04_02_issue-2669-common.sql ===================================== @@ -19,7 +19,7 @@ -- <http://www.gnu.org/licenses/gpl-3.0.html>. -- #L% --- -INSERT INTO common.SpeciesList (topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate, homeid) VALUES ('fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}101', 0, ${CURRENT_DATE}, '101', 1, null, 'Consolidation (PS Logbook Sample.weights)', 'Consolidation (PS Logbook Sample.weights)', 'Consolidation (PS Logbook Sample.weights) TODO', null, null, null, null, null, false, ${CURRENT_TIMESTAMP} , null); +INSERT INTO common.SpeciesList (topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate, homeid) VALUES ('fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}101', 0, ${CURRENT_DATE}, '101', 1, null, ' Consolidation - PS Logbook - Categories'' weights - fleet France', 'Consolidation - PS Logbook - Poids des catégories - flotte France', 'Consolidación - PS Logbook - Pesos de categorías - flota de Francia', null, null, null, null, null, false, ${CURRENT_TIMESTAMP} , null); INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685475#0.13349466123905152', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}101'); -- BET INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685474#0.8943253454598569', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}101'); -- YFT INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685474#0.975344121171992', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}101'); -- SKJ ===================================== core/persistence/migration/src/main/resources/db/migration/v9/9.4/07_issue-2958-common.sql ===================================== @@ -0,0 +1,40 @@ +--- +-- #%L +-- ObServe Core :: Persistence :: Migration +-- %% +-- Copyright (C) 2008 - 2024 IRD, Ultreia.io +-- %% +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public +-- License along with this program. If not, see +-- <http://www.gnu.org/licenses/gpl-3.0.html>. +-- #L% +--- +INSERT INTO common.SpeciesList (topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate, homeid) VALUES ('fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}102', 0, ${CURRENT_DATE}, '102', 1, null, 'Consolidation - PS Logbook - Weighted weights - fleet Spain', 'Consolidation - PS Logbook - Poids pondérés - flotte Espagne', 'Consolidación - PS Logbook - Pesos ponderados - flota de España', null, null, null, null, null, false, ${CURRENT_TIMESTAMP} , null); +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685474#0.8943253454598569', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}102'); +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685474#0.975344121171992', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}102'); +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685475#0.13349466123905152', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}102'); +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685476#0.5618871286604711', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}102'); +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685477#0.8024257002747615', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}102'); +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685477#0.3846921632590058', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}102'); +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1441287921299#0.016754076421811148', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}102'); +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1433499265113#0.891799515346065', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}102'); +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685477#0.2673009297087321', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}102'); +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685478#0.7676744877900202', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}102'); +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685477#0.5989181185528589', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}102'); +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685476#0.36339915670317835', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}102'); +INSERT INTO common.SpeciesList (topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate, homeid) VALUES ('fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}103', 0, ${CURRENT_DATE}, '103', 1, null, ' Consolidation - PS Logbook - Categories'' weights - fleet Spain', 'Consolidation - PS Logbook - Poids des catégories - flotte Espagne', 'Consolidación - PS Logbook - Pesos de categorías - flota de España', null, null, null, null, null, false, ${CURRENT_TIMESTAMP} , null); +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685475#0.13349466123905152', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}103'); -- BET +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685474#0.8943253454598569', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}103'); -- YFT +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685474#0.975344121171992', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}103'); -- SKJ +INSERT INTO common.speciesList_species (species, speciesList) VALUES ('fr.ird.referential.common.Species#1239832685476#0.5618871286604711', 'fr.ird.referential.common.SpeciesList#${REFERENTIAL_PREFIX}103'); -- ALB +UPDATE common.LastUpdateDate SET lastUpdateDate = ${CURRENT_TIMESTAMP} WHERE type = 'fr.ird.observe.entities.referential.common.SpeciesList'; ===================================== core/persistence/test/src/test/resources/fixtures/persistence/table_count/referential.properties ===================================== @@ -42,7 +42,7 @@ common.sizeMeasureType=21 common.species=315 common.speciesGroup=12 common.speciesGroupReleaseMode=10 -common.speciesList=12 +common.speciesList=14 common.vessel=1250 common.vesselSizeCategory=13 common.vesselType=18 @@ -120,4 +120,4 @@ common.gear_allowedGearCharacteristic=108 common.gear_defaultGearCharacteristic=45 common.species_ocean=553 common.speciesGroup_speciesGroupReleaseMode=19 -common.speciesList_species=981 +common.speciesList_species=997 ===================================== core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ValidateService-referentialResult-common-default.json ===================================== @@ -44081,24 +44081,14 @@ }, { "datum": { - "text": "100##Consolidation (PS Logbook SampleActivity.weightedWeight)", + "text": "100##Consolidation - PS Logbook - Poids pondérés - flotte France", "type": "fr.ird.observe.dto.referential.common.SpeciesListDto", "id": "fr.ird.referential.common.SpeciesList#1464000000000#100", "topiaVersion": 0, "lastUpdateDate": "2024-09-11T00:00:00.000Z" }, "messages": [ - { - "fieldName": "label1", - "scope": "WARNING", - "message": "Le libellé anglais n'est pas traduit." - }, - { - "fieldName": "label3", - "scope": "WARNING", - "message": "Le libellé espagnol n'est pas traduit." - }, - { + { "fieldName": "uri", "scope": "WARNING", "message": "Le champ n'est pas renseigné." @@ -44107,23 +44097,46 @@ }, { "datum": { - "text": "101##Consolidation (PS Logbook Sample.weights)", + "text": "101##Consolidation - PS Logbook - Poids des catégories - flotte France", "type": "fr.ird.observe.dto.referential.common.SpeciesListDto", "id": "fr.ird.referential.common.SpeciesList#1464000000000#101", "topiaVersion": 0, "lastUpdateDate": "2024-09-11T00:00:00.000Z" }, "messages": [ + { - "fieldName": "label1", + "fieldName": "uri", "scope": "WARNING", - "message": "Le libellé anglais n'est pas traduit." - }, + "message": "Le champ n'est pas renseigné." + } + ] + }, + { + "datum": { + "text": "100##Consolidation - PS Logbook - Poids pondérés - flotte Espagne", + "type": "fr.ird.observe.dto.referential.common.SpeciesListDto", + "id": "fr.ird.referential.common.SpeciesList#1464000000000#102", + "topiaVersion": 0, + "lastUpdateDate": "2024-09-11T00:00:00.000Z" + }, + "messages": [ { - "fieldName": "label3", + "fieldName": "uri", "scope": "WARNING", - "message": "Le libellé espagnol n'est pas traduit." - }, + "message": "Le champ n'est pas renseigné." + } + ] + }, + { + "datum": { + "text": "101##Consolidation - PS Logbook - Poids des catégories - flotte Espagne", + "type": "fr.ird.observe.dto.referential.common.SpeciesListDto", + "id": "fr.ird.referential.common.SpeciesList#1464000000000#103", + "topiaVersion": 0, + "lastUpdateDate": "2024-09-11T00:00:00.000Z" + }, + "messages": [ { "fieldName": "uri", "scope": "WARNING", ===================================== model/src/main/resources/fixtures/global.properties ===================================== @@ -25,4 +25,4 @@ REFERENCE_DATA_COUNT=68 ENTITIES_LIMIT_SIZE=100 # fr.ird.observe.services.service.referential.ReferentialService # fr.ird.observe.services.local.service.referential.DifferentialModelTest -REFERENTIAL_COUNT=4393 +REFERENTIAL_COUNT=4395 View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/62e92c6727efc2b1d37343e57... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/62e92c6727efc2b1d37343e57... You're receiving this email because of your account on gitlab.com.