Tony CHEMIT pushed to branch develop-9.0.x at ultreiaio / ird-observe
Commits:
-
d284b07e
by Tony Chemit at 2022-10-24T09:01:16+02:00
-
2cbb9d2d
by Tony Chemit at 2022-10-24T09:01:16+02:00
-
ce412c8c
by Tony Chemit at 2022-10-24T09:01:16+02:00
17 changed files:
- core/api/validation/src/main/filtered-resources/META-INF/validators/validation.json
- core/api/validation/src/main/i18n/getters/validation-messages.getter
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/logbook/ActivityDto-create-error-validation.xml
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/logbook/ActivityDto-update-error-validation.xml
- core/persistence/resources/src/main/resources/db/migration/v9/9.0/100-tck_add_referential_for_delete_test-common.sql
- core/persistence/resources/src/main/resources/db/migration/v9/9.0/21_0_adapt_table_common_ocean-common.sql
- core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/logbook/Activity/validation-create.json
- core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/logbook/Activity/validation-update.json
- core/persistence/test/src/test/resources/fixtures/persistence/table_count/referential.properties
- core/services/i18n/src/main/i18n/translations/services_en_GB.properties
- core/services/i18n/src/main/i18n/translations/services_es_ES.properties
- core/services/i18n/src/main/i18n/translations/services_fr_FR.properties
- core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ValidateService-dataResult.json
- core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ValidateService-referentialResult.json
- model/src/main/models/Observe/dto/attribute/notNullIf.properties
- model/src/main/resources/fixtures/global.properties
- model/src/main/resources/fixtures/variables.properties
Changes:
| ... | ... | @@ -9438,7 +9438,8 @@ |
| 9438 | 9438 | {
|
| 9439 | 9439 | "name": "schoolType",
|
| 9440 | 9440 | "comments": [
|
| 9441 | - "check if referential schoolType is disabled (only if validation is strong)"
|
|
| 9441 | + "check if referential schoolType is disabled (only if validation is strong)",
|
|
| 9442 | + "schoolType is mandatory except if !setEnabled"
|
|
| 9442 | 9443 | ]
|
| 9443 | 9444 | },
|
| 9444 | 9445 | {
|
| ... | ... | @@ -9709,7 +9710,8 @@ |
| 9709 | 9710 | {
|
| 9710 | 9711 | "name": "schoolType",
|
| 9711 | 9712 | "comments": [
|
| 9712 | - "check if referential schoolType is disabled (only if validation is strong)"
|
|
| 9713 | + "check if referential schoolType is disabled (only if validation is strong)",
|
|
| 9714 | + "schoolType is mandatory except if !setEnabled"
|
|
| 9713 | 9715 | ]
|
| 9714 | 9716 | },
|
| 9715 | 9717 | {
|
| ... | ... | @@ -79,6 +79,7 @@ observe.data.ps.localmarket.Survey.validation.date.after.currentPsCommonTrip.end |
| 79 | 79 | observe.data.ps.localmarket.Survey.validation.date.after.currentPsCommonTrip.startDate
|
| 80 | 80 | observe.data.ps.localmarket.Survey.validation.date.delay.too.long
|
| 81 | 81 | observe.data.ps.localmarket.Survey.validation.uniqueKey
|
| 82 | +observe.data.ps.logbook.Activity.schoolType.validation.required
|
|
| 82 | 83 | observe.data.ps.logbook.Activity.setCount.validation.required
|
| 83 | 84 | observe.data.ps.logbook.Activity.setSuccessStatus.validation.required
|
| 84 | 85 | observe.data.ps.logbook.Catch.weight.validation.required
|
| ... | ... | @@ -231,6 +231,12 @@ |
| 231 | 231 | </field>
|
| 232 | 232 | |
| 233 | 233 | <field name="schoolType">
|
| 234 | + <!-- schoolType is mandatory except if !setEnabled -->
|
|
| 235 | + <field-validator type="mandatory" short-circuit="true">
|
|
| 236 | + <param name="skip"><![CDATA[ !setEnabled ]]></param>
|
|
| 237 | + <message>observe.data.ps.logbook.Activity.schoolType.validation.required</message>
|
|
| 238 | + </field-validator>
|
|
| 239 | + |
|
| 234 | 240 | <!-- check if referential schoolType is disabled (only if validation is strong) -->
|
| 235 | 241 | <field-validator type="checkDisabledReferentialOnErrorScope">
|
| 236 | 242 | <message/>
|
| ... | ... | @@ -231,6 +231,12 @@ |
| 231 | 231 | </field>
|
| 232 | 232 | |
| 233 | 233 | <field name="schoolType">
|
| 234 | + <!-- schoolType is mandatory except if !setEnabled -->
|
|
| 235 | + <field-validator type="mandatory" short-circuit="true">
|
|
| 236 | + <param name="skip"><![CDATA[ !setEnabled ]]></param>
|
|
| 237 | + <message>observe.data.ps.logbook.Activity.schoolType.validation.required</message>
|
|
| 238 | + </field-validator>
|
|
| 239 | + |
|
| 234 | 240 | <!-- check if referential schoolType is disabled (only if validation is strong) -->
|
| 235 | 241 | <field-validator type="checkDisabledReferentialOnErrorScope">
|
| 236 | 242 | <message/>
|
| ... | ... | @@ -20,7 +20,8 @@ |
| 20 | 20 | -- #L%
|
| 21 | 21 | ---
|
| 22 | 22 | -- Ocean
|
| 23 | -INSERT INTO common.ocean(topiaId, topiaCreateDate, topiaVersion, lastUpdateDate, code, uri, homeId, needComment, status, label1, label2, label3, label4, label5, label6, label7, label8, northEastAllowed, southEastAllowed, southWestAllowed, northWestAllowed) VALUES ('fr.ird.referential.common.Ocean#0#0', '2009-04-15 00:00:00.002', 16, '2021-09-17 00:00:00.0', '32', NULL, NULL, false, 1, 'Med', 'Méditerranée', 'Méditerrano', NULL, NULL, NULL, NULL, NULL, true, true, true, true);
|
|
| 23 | +INSERT INTO common.ocean(topiaId, topiaCreateDate, topiaVersion, lastUpdateDate, code, uri, homeId, needComment, status, label1, label2, label3, label4, label5, label6, label7, label8, northEastAllowed, southEastAllowed, southWestAllowed, northWestAllowed) VALUES ('fr.ird.referential.common.Ocean#1651431107744#0.7000579392148572', '2009-04-15 00:00:00.002', 16, '2021-09-17 00:00:00.0', '4', NULL, NULL, false, 1, 'Med', 'Méditerranée', 'Méditerrano', NULL, NULL, NULL, NULL, NULL, true, false, false, true);
|
|
| 24 | +INSERT INTO common.ocean(topiaId, topiaCreateDate, topiaVersion, lastUpdateDate, code, uri, homeId, needComment, status, label1, label2, label3, label4, label5, label6, label7, label8, northEastAllowed, southEastAllowed, southWestAllowed, northWestAllowed) VALUES ('fr.ird.referential.common.Ocean#1651650345031#0.44320492543276846', '2009-04-15 00:00:00.002', 16, '2021-09-17 00:00:00.0', '99', NULL, NULL, false, 1, 'Multiple', 'Multiples', 'múltiple', NULL, NULL, NULL, NULL, NULL, true, true, true, true);
|
|
| 24 | 25 | -- Organism
|
| 25 | 26 | INSERT INTO common.organism(topiaId, topiaCreateDate, topiaVersion, lastUpdateDate, code, uri, homeId, needComment, status, label1, label2, label3, label4, label5, label6, label7, label8, description, country) VALUES ('fr.ird.referential.common.Organism#0#0', '2015-09-03 11:20:43.546', 2, '2018-10-19 13:30:23.388', '92', NULL, NULL, false, 1, 'Mayotte Marine National Parc 2', 'Parc Naturel Marin de Mayotte 2', 'Parc Naturel Marin de Mayotte 2', NULL, NULL, NULL, NULL, NULL, NULL, 'fr.ird.referential.common.Country#1239832675583#0.9493110781716075');
|
| 26 | 27 | -- Sex
|
| ... | ... | @@ -31,8 +31,8 @@ UPDATE common.Ocean set lastUpdateDate = ${CURRENT_TIMESTAMP}, topiaVersion = to |
| 31 | 31 | -- For Ocean 3 Pacific
|
| 32 | 32 | UPDATE common.Ocean set lastUpdateDate = ${CURRENT_TIMESTAMP}, topiaVersion = topiaVersion + 1, northEastAllowed = TRUE, southEastAllowed = TRUE, southWestAllowed = TRUE, northWestAllowed = TRUE WHERE topiaId = 'fr.ird.referential.common.Ocean#1239832686152#0.7039171539191688';
|
| 33 | 33 | -- For Ocean 4
|
| 34 | -UPDATE common.Ocean set lastUpdateDate = ${CURRENT_TIMESTAMP}, topiaVersion = topiaVersion + 1, northEastAllowed = TRUE, northWestAllowed = TRUE WHERE topiaId = 'fr.ird.entities.referentiel.Ocean#1651431107744#0.7000579392148572';
|
|
| 34 | +UPDATE common.Ocean set lastUpdateDate = ${CURRENT_TIMESTAMP}, topiaVersion = topiaVersion + 1, northEastAllowed = TRUE, northWestAllowed = TRUE WHERE topiaId = 'fr.ird.entities.referential.common.Ocean#1651431107744#0.7000579392148572';
|
|
| 35 | 35 | -- For Ocean 99
|
| 36 | -UPDATE common.Ocean set lastUpdateDate = ${CURRENT_TIMESTAMP}, topiaVersion = topiaVersion + 1, northEastAllowed = TRUE, southEastAllowed = TRUE, southWestAllowed = TRUE, northWestAllowed = TRUE WHERE topiaId = 'fr.ird.entities.referentiel.Ocean#1651650345031#0.44320492543276846';
|
|
| 36 | +UPDATE common.Ocean set lastUpdateDate = ${CURRENT_TIMESTAMP}, topiaVersion = topiaVersion + 1, northEastAllowed = TRUE, southEastAllowed = TRUE, southWestAllowed = TRUE, northWestAllowed = TRUE WHERE topiaId = 'fr.ird.entities.referential.common.Ocean#1651650345031#0.44320492543276846';
|
|
| 37 | 37 | |
| 38 | 38 | UPDATE common.LastUpdateDate SET lastUpdateDate = ${CURRENT_TIMESTAMP} WHERE type ='fr.ird.observe.entities.referential.common.Ocean'; |
| \ No newline at end of file |
| ... | ... | @@ -122,7 +122,8 @@ |
| 122 | 122 | },
|
| 123 | 123 | "schoolType": {
|
| 124 | 124 | "errors": [
|
| 125 | - "check if referential schoolType is disabled (only if validation is strong)"
|
|
| 125 | + "check if referential schoolType is disabled (only if validation is strong)",
|
|
| 126 | + "schoolType is mandatory except if !setEnabled"
|
|
| 126 | 127 | ],
|
| 127 | 128 | "warnings": [
|
| 128 | 129 | "check if referential schoolType is disabled (only if validation is not strong)"
|
| ... | ... | @@ -122,7 +122,8 @@ |
| 122 | 122 | },
|
| 123 | 123 | "schoolType": {
|
| 124 | 124 | "errors": [
|
| 125 | - "check if referential schoolType is disabled (only if validation is strong)"
|
|
| 125 | + "check if referential schoolType is disabled (only if validation is strong)",
|
|
| 126 | + "schoolType is mandatory except if !setEnabled"
|
|
| 126 | 127 | ],
|
| 127 | 128 | "warnings": [
|
| 128 | 129 | "check if referential schoolType is disabled (only if validation is not strong)"
|
| ... | ... | @@ -29,7 +29,7 @@ common.harbour=98 |
| 29 | 29 | common.lengthLengthParameter=1
|
| 30 | 30 | common.lengthMeasureMethod=4
|
| 31 | 31 | common.lengthWeightParameter=365
|
| 32 | -common.ocean=4
|
|
| 32 | +common.ocean=5
|
|
| 33 | 33 | common.organism=11
|
| 34 | 34 | common.person=741
|
| 35 | 35 | common.sex=6
|
| ... | ... | @@ -1079,6 +1079,7 @@ observe.data.ps.logbook.Activity.number=Order number |
| 1079 | 1079 | observe.data.ps.logbook.Activity.observedSystemTab=Observed systems
|
| 1080 | 1080 | observe.data.ps.logbook.Activity.originalDataModified=Original data modified?
|
| 1081 | 1081 | observe.data.ps.logbook.Activity.physicalMeasurements=Physical measurements
|
| 1082 | +observe.data.ps.logbook.Activity.schoolType.validation.required=Mandatory if set operation
|
|
| 1082 | 1083 | observe.data.ps.logbook.Activity.setCount=Set count
|
| 1083 | 1084 | observe.data.ps.logbook.Activity.setCount.validation.required=Mandatory if set operation
|
| 1084 | 1085 | observe.data.ps.logbook.Activity.setMeasurements=Set measurements
|
| ... | ... | @@ -1079,6 +1079,7 @@ observe.data.ps.logbook.Activity.number=Order number \#TODO |
| 1079 | 1079 | observe.data.ps.logbook.Activity.observedSystemTab=Sistema observado
|
| 1080 | 1080 | observe.data.ps.logbook.Activity.originalDataModified=Original data modified?\#TODO
|
| 1081 | 1081 | observe.data.ps.logbook.Activity.physicalMeasurements=Physical measurements
|
| 1082 | +observe.data.ps.logbook.Activity.schoolType.validation.required=Mandatory if set operation \#TODO
|
|
| 1082 | 1083 | observe.data.ps.logbook.Activity.setCount=Fishing operation count
|
| 1083 | 1084 | observe.data.ps.logbook.Activity.setCount.validation.required=Mandatory if set operation \#TODO
|
| 1084 | 1085 | observe.data.ps.logbook.Activity.setMeasurements=Fishing operation measurements
|
| ... | ... | @@ -1079,6 +1079,7 @@ observe.data.ps.logbook.Activity.number=Numéro d'ordre |
| 1079 | 1079 | observe.data.ps.logbook.Activity.observedSystemTab=Systèmes observés
|
| 1080 | 1080 | observe.data.ps.logbook.Activity.originalDataModified=Données d'origine modifiées ?
|
| 1081 | 1081 | observe.data.ps.logbook.Activity.physicalMeasurements=Paramètres physiques
|
| 1082 | +observe.data.ps.logbook.Activity.schoolType.validation.required=Obligatoire si opération de pêche
|
|
| 1082 | 1083 | observe.data.ps.logbook.Activity.setCount=Nombre de coups de pêche
|
| 1083 | 1084 | observe.data.ps.logbook.Activity.setCount.validation.required=Obligatoire si opération de pêche
|
| 1084 | 1085 | observe.data.ps.logbook.Activity.setMeasurements=Paramètres de calée
|
| ... | ... | @@ -39059,6 +39059,11 @@ |
| 39059 | 39059 | "scope": "WARNING",
|
| 39060 | 39060 | "message": "Le champ n\u0027est pas renseigné."
|
| 39061 | 39061 | },
|
| 39062 | + {
|
|
| 39063 | + "fieldName": "schoolType",
|
|
| 39064 | + "scope": "ERROR",
|
|
| 39065 | + "message": "Obligatoire si opération de pêche"
|
|
| 39066 | + },
|
|
| 39062 | 39067 | {
|
| 39063 | 39068 | "fieldName": "seaSurfaceTemperature",
|
| 39064 | 39069 | "scope": "WARNING",
|
| ... | ... | @@ -39133,6 +39138,11 @@ |
| 39133 | 39138 | "scope": "WARNING",
|
| 39134 | 39139 | "message": "Le champ n\u0027est pas renseigné."
|
| 39135 | 39140 | },
|
| 39141 | + {
|
|
| 39142 | + "fieldName": "schoolType",
|
|
| 39143 | + "scope": "ERROR",
|
|
| 39144 | + "message": "Obligatoire si opération de pêche"
|
|
| 39145 | + },
|
|
| 39136 | 39146 | {
|
| 39137 | 39147 | "fieldName": "seaSurfaceTemperature",
|
| 39138 | 39148 | "scope": "WARNING",
|
| ... | ... | @@ -39212,6 +39222,11 @@ |
| 39212 | 39222 | "scope": "WARNING",
|
| 39213 | 39223 | "message": "Le champ n\u0027est pas renseigné."
|
| 39214 | 39224 | },
|
| 39225 | + {
|
|
| 39226 | + "fieldName": "schoolType",
|
|
| 39227 | + "scope": "ERROR",
|
|
| 39228 | + "message": "Obligatoire si opération de pêche"
|
|
| 39229 | + },
|
|
| 39215 | 39230 | {
|
| 39216 | 39231 | "fieldName": "seaSurfaceTemperature",
|
| 39217 | 39232 | "scope": "WARNING",
|
| ... | ... | @@ -27309,7 +27309,7 @@ |
| 27309 | 27309 | "content": {
|
| 27310 | 27310 | "code": "110",
|
| 27311 | 27311 | "label": "Chavirage de la poche",
|
| 27312 | - "allowObservation": false,
|
|
| 27312 | + "allowObservation": true,
|
|
| 27313 | 27313 | "allowLogbook": true,
|
| 27314 | 27314 | "needComment": false,
|
| 27315 | 27315 | "enabled": true,
|
| ... | ... | @@ -174033,7 +174033,7 @@ |
| 174033 | 174033 | "localMarketWellsSampling": true,
|
| 174034 | 174034 | "localMarketSurveySampling": true,
|
| 174035 | 174035 | "advancedSampling": true,
|
| 174036 | - "fieldEnabler": true,
|
|
| 174036 | + "fieldEnabler": false,
|
|
| 174037 | 174037 | "needComment": false,
|
| 174038 | 174038 | "enabled": true,
|
| 174039 | 174039 | "id": "fr.ird.referential.ps.common.AcquisitionStatus#1464000000000#999",
|
| ... | ... | @@ -177677,6 +177677,54 @@ |
| 177677 | 177677 | }
|
| 177678 | 177678 | ]
|
| 177679 | 177679 | },
|
| 177680 | + {
|
|
| 177681 | + "reference": {
|
|
| 177682 | + "type": "fr.ird.observe.dto.referential.ps.common.ObservedSystemReference",
|
|
| 177683 | + "content": {
|
|
| 177684 | + "code": "74",
|
|
| 177685 | + "label": "Poisson à rostre",
|
|
| 177686 | + "allowObservation": false,
|
|
| 177687 | + "allowLogbook": true,
|
|
| 177688 | + "needComment": false,
|
|
| 177689 | + "enabled": true,
|
|
| 177690 | + "id": "fr.ird.referential.ps.common.ObservedSystem#1464000000000#74",
|
|
| 177691 | + "lastUpdateDate": "2021-09-17T00:00:00.000Z",
|
|
| 177692 | + "topiaVersion": 0,
|
|
| 177693 | + "topiaCreateDate": "2021-09-17T00:00:00.000Z"
|
|
| 177694 | + }
|
|
| 177695 | + },
|
|
| 177696 | + "messages": [
|
|
| 177697 | + {
|
|
| 177698 | + "fieldName": "label3",
|
|
| 177699 | + "scope": "WARNING",
|
|
| 177700 | + "message": "Le libellé espagnol n\u0027est pas traduit."
|
|
| 177701 | + }
|
|
| 177702 | + ]
|
|
| 177703 | + },
|
|
| 177704 | + {
|
|
| 177705 | + "reference": {
|
|
| 177706 | + "type": "fr.ird.observe.dto.referential.ps.common.ObservedSystemReference",
|
|
| 177707 | + "content": {
|
|
| 177708 | + "code": "81",
|
|
| 177709 | + "label": "Charogne",
|
|
| 177710 | + "allowObservation": false,
|
|
| 177711 | + "allowLogbook": true,
|
|
| 177712 | + "needComment": false,
|
|
| 177713 | + "enabled": true,
|
|
| 177714 | + "id": "fr.ird.referential.ps.common.ObservedSystem#1464000000000#81",
|
|
| 177715 | + "lastUpdateDate": "2021-09-17T00:00:00.000Z",
|
|
| 177716 | + "topiaVersion": 0,
|
|
| 177717 | + "topiaCreateDate": "2021-09-17T00:00:00.000Z"
|
|
| 177718 | + }
|
|
| 177719 | + },
|
|
| 177720 | + "messages": [
|
|
| 177721 | + {
|
|
| 177722 | + "fieldName": "label3",
|
|
| 177723 | + "scope": "WARNING",
|
|
| 177724 | + "message": "Le libellé espagnol n\u0027est pas traduit."
|
|
| 177725 | + }
|
|
| 177726 | + ]
|
|
| 177727 | + },
|
|
| 177680 | 177728 | {
|
| 177681 | 177729 | "reference": {
|
| 177682 | 177730 | "type": "fr.ird.observe.dto.referential.ps.common.ProgramReference",
|
| ... | ... | @@ -46,6 +46,7 @@ data.ps.localmarket.Batch.attribute.weight=countOrWeightValid |
| 46 | 46 | data.ps.logbook.Activity.attribute.latitude=floatingObjectEnabled && !setEnabled
|
| 47 | 47 | data.ps.logbook.Activity.attribute.longitude=floatingObjectEnabled && !setEnabled
|
| 48 | 48 | data.ps.logbook.Activity.attribute.quadrant=floatingObjectEnabled && !setEnabled
|
| 49 | +data.ps.logbook.Activity.attribute.schoolType=!setEnabled
|
|
| 49 | 50 | data.ps.logbook.Activity.attribute.setCount=!setEnabled
|
| 50 | 51 | data.ps.logbook.Activity.attribute.setSuccessStatus=!setEnabled || reasonForNoFishing != null
|
| 51 | 52 | data.ps.logbook.Catch.attribute.weight=count != null && count > 0
|
| ... | ... | @@ -25,4 +25,4 @@ REFERENCE_DATA_COUNT=66 |
| 25 | 25 | ENTITIES_LIMIT_SIZE=100
|
| 26 | 26 | # fr.ird.observe.services.service.referential.ReferentialService
|
| 27 | 27 | # fr.ird.observe.services.local.service.referential.DifferentialModelTest
|
| 28 | -REFERENTIAL_COUNT=4092 |
|
| 28 | +REFERENTIAL_COUNT=4093 |
| ... | ... | @@ -96,7 +96,7 @@ referential.common.common.Harbour.id=fr.ird.referential.common.Harbour#11#0.7 |
| 96 | 96 | referential.common.common.LengthLengthParameter.id=fr.ird.referential.common.LengthLengthParameter#1464000000000#0
|
| 97 | 97 | referential.common.common.LengthMeasureMethod.id=fr.ird.referential.common.LengthMeasureMethod#666#01
|
| 98 | 98 | referential.common.common.LengthWeightParameter.id=fr.ird.referential.common.LengthWeightParameter#201008191245#0.63
|
| 99 | -referential.common.common.Ocean.id.delete=fr.ird.referential.common.Ocean#0#0
|
|
| 99 | +referential.common.common.Ocean.id.delete=fr.ird.referential.common.Ocean#1651431107744#0.7000579392148572
|
|
| 100 | 100 | referential.common.common.Ocean.id=fr.ird.referential.common.Ocean#1239832686151#0.17595105505051245
|
| 101 | 101 | referential.common.common.Organism.id.delete=fr.ird.referential.common.Organism#0#0
|
| 102 | 102 | referential.common.common.Organism.id=fr.ird.referential.common.Organism#1267835067241#0.6705236825871838
|