Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: da908f05 by Tony Chemit at 2023-06-13T14:40:51+02:00 Une erreur de validation sur ps_localMarket.SurveyPart.proportion - Closes #2727 - - - - - bf6b3e5c by Tony Chemit at 2023-06-13T14:54:36+02:00 Borne max de poids sur le formulaire Lots de faux-poisson - Closes #2719 - - - - - 20 changed files: - core/api/validation/src/main/filtered-resources/META-INF/validators/validation.json - core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/BatchDto-create-error-validation.xml - core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/BatchDto-update-error-validation.xml - core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/SurveyPartDto-create-error-validation.xml - core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/SurveyPartDto-update-error-validation.xml - core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/localmarket/Batch/validation-create.json - core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/localmarket/Batch/validation-update.json - core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/localmarket/SurveyPart/validation-create.json - core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/localmarket/SurveyPart/validation-update.json - model/src/main/models/Observe/dto/attribute/boundNumber.properties - model/src/main/models/Observe/dto/attribute/positiveNumber.properties - model/src/main/models/Observe/dto/attribute/strictlyPositiveNumber.properties - server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/Batch/validation-create-error.xml - server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/Batch/validation-create.json - server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/Batch/validation-update-error.xml - server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/Batch/validation-update.json - server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/SurveyPart/validation-create-error.xml - server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/SurveyPart/validation-create.json - server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/SurveyPart/validation-update-error.xml - server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/SurveyPart/validation-update.json Changes: ===================================== core/api/validation/src/main/filtered-resources/META-INF/validators/validation.json ===================================== @@ -9074,8 +9074,8 @@ { "name": "weight", "comments": [ - "0.0 <= weight <= 5.0 except if !countOrWeightValid", - "weight is a positive number", + "0.0001 <= weight <= 100.0 except if !countOrWeightValid", + "weight is a strictly positive number", "weight is mandatory except if countOrWeightValid" ] } @@ -9173,8 +9173,8 @@ { "name": "weight", "comments": [ - "0.0 <= weight <= 5.0 except if !countOrWeightValid", - "weight is a positive number", + "0.0001 <= weight <= 100.0 except if !countOrWeightValid", + "weight is a strictly positive number", "weight is mandatory except if countOrWeightValid" ] } @@ -9787,10 +9787,10 @@ { "name": "proportion", "comments": [ + "0.0 <= proportion <= 100.0", "proportion is a proportion", "proportion is a strictly positive number", - "proportion is mandatory except if dataEmpty", - "proportion=0.0 <= proportion <= 100.0" + "proportion is mandatory except if dataEmpty" ] }, { @@ -9836,10 +9836,10 @@ { "name": "proportion", "comments": [ + "0.0 <= proportion <= 100.0", "proportion is a proportion", "proportion is a strictly positive number", - "proportion is mandatory except if dataEmpty", - "proportion=0.0 <= proportion <= 100.0" + "proportion is mandatory except if dataEmpty" ] }, { ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/BatchDto-create-error-validation.xml ===================================== @@ -110,16 +110,17 @@ <message>observe.data.ps.localmarket.Batch.weight.validation.required</message> </field-validator> - <!-- weight is a positive number --> + <!-- weight is a strictly positive number --> <field-validator type="positiveNumber"> + <param name="strict">true</param> <message/> </field-validator> - <!-- 0.0 <= weight <= 5.0 except if !countOrWeightValid --> + <!-- 0.0001 <= weight <= 100.0 except if !countOrWeightValid --> <field-validator type="boundNumber"> <param name="skip"><![CDATA[ !countOrWeightValid ]]></param> - <param name="min">0.0</param> - <param name="max">5.0</param> + <param name="min">0.0001</param> + <param name="max">100.0</param> <message/> </field-validator> </field> ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/BatchDto-update-error-validation.xml ===================================== @@ -110,16 +110,17 @@ <message>observe.data.ps.localmarket.Batch.weight.validation.required</message> </field-validator> - <!-- weight is a positive number --> + <!-- weight is a strictly positive number --> <field-validator type="positiveNumber"> + <param name="strict">true</param> <message/> </field-validator> - <!-- 0.0 <= weight <= 5.0 except if !countOrWeightValid --> + <!-- 0.0001 <= weight <= 100.0 except if !countOrWeightValid --> <field-validator type="boundNumber"> <param name="skip"><![CDATA[ !countOrWeightValid ]]></param> - <param name="min">0.0</param> - <param name="max">5.0</param> + <param name="min">0.0001</param> + <param name="max">100.0</param> <message/> </field-validator> </field> ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/SurveyPartDto-create-error-validation.xml ===================================== @@ -49,9 +49,9 @@ <message/> </field-validator> - <!-- proportion=0.0 <= proportion <= 100.0 --> + <!-- 0.0 <= proportion <= 100.0 --> <field-validator type="boundNumber"> - <param name="min">proportion=0.0</param> + <param name="min">0.0</param> <param name="max">100.0</param> <message/> </field-validator> ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/SurveyPartDto-update-error-validation.xml ===================================== @@ -49,9 +49,9 @@ <message/> </field-validator> - <!-- proportion=0.0 <= proportion <= 100.0 --> + <!-- 0.0 <= proportion <= 100.0 --> <field-validator type="boundNumber"> - <param name="min">proportion=0.0</param> + <param name="min">0.0</param> <param name="max">100.0</param> <message/> </field-validator> ===================================== core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/localmarket/Batch/validation-create.json ===================================== @@ -58,8 +58,8 @@ }, "weight": { "errors": [ - "0.0 <= weight <= 5.0 except if !countOrWeightValid", - "weight is a positive number", + "0.0001 <= weight <= 100.0 except if !countOrWeightValid", + "weight is a strictly positive number", "weight is mandatory except if countOrWeightValid" ] } ===================================== core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/localmarket/Batch/validation-update.json ===================================== @@ -58,8 +58,8 @@ }, "weight": { "errors": [ - "0.0 <= weight <= 5.0 except if !countOrWeightValid", - "weight is a positive number", + "0.0001 <= weight <= 100.0 except if !countOrWeightValid", + "weight is a strictly positive number", "weight is mandatory except if countOrWeightValid" ] } ===================================== core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/localmarket/SurveyPart/validation-create.json ===================================== @@ -6,10 +6,10 @@ }, "proportion": { "errors": [ + "0.0 <= proportion <= 100.0", "proportion is a proportion", "proportion is a strictly positive number", - "proportion is mandatory except if dataEmpty", - "proportion=0.0 <= proportion <= 100.0" + "proportion is mandatory except if dataEmpty" ], "warnings": [ "the hole data is empty" ===================================== core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/localmarket/SurveyPart/validation-update.json ===================================== @@ -6,10 +6,10 @@ }, "proportion": { "errors": [ + "0.0 <= proportion <= 100.0", "proportion is a proportion", "proportion is a strictly positive number", - "proportion is mandatory except if dataEmpty", - "proportion=0.0 <= proportion <= 100.0" + "proportion is mandatory except if dataEmpty" ], "warnings": [ "the hole data is empty" ===================================== model/src/main/models/Observe/dto/attribute/boundNumber.properties ===================================== @@ -61,8 +61,8 @@ data.ps.common.Trip.attribute.landingTotalWeight=0.0:2000.0:!targetWellsSampling data.ps.common.Trip.attribute.localMarketTotalWeight=0.0:1500.0:!localmarketWellsSamplingEnabled && !localmarketSurveySamplingEnabled data.ps.common.Trip.attribute.timeAtSea=10:2400:!logbookEnabled data.ps.landing.Landing.attribute.weight=0.0:600.0 -data.ps.localmarket.Batch.attribute.weight=0.0:5.0:!countOrWeightValid -data.ps.localmarket.SurveyPart.attribute.proportion=proportion=0.0:100.0 +data.ps.localmarket.Batch.attribute.weight=0.0001:100.0:!countOrWeightValid +data.ps.localmarket.SurveyPart.attribute.proportion=0.0:100.0 data.ps.logbook.Activity.attribute.currentDirection=0:359 data.ps.logbook.Activity.attribute.currentSpeed=0.0:40.0 data.ps.logbook.Activity.attribute.setCount=0:8:!setEnabled ===================================== model/src/main/models/Observe/dto/attribute/positiveNumber.properties ===================================== @@ -111,7 +111,6 @@ data.ps.common.Trip.attribute.localMarketTotalWeight=true data.ps.common.Trip.attribute.loch=true data.ps.common.Trip.attribute.timeAtSea=true data.ps.localmarket.Batch.attribute.count=true -data.ps.localmarket.Batch.attribute.weight=true data.ps.logbook.Activity.attribute.currentDirection=true data.ps.logbook.Activity.attribute.currentSpeed=true data.ps.logbook.Activity.attribute.setCount=true ===================================== model/src/main/models/Observe/dto/attribute/strictlyPositiveNumber.properties ===================================== @@ -25,6 +25,7 @@ data.ll.logbook.Activity.attribute.seaSurfaceTemperature=true data.ll.logbook.Catch.attribute.depredatedProportion=true data.ll.observation.Activity.attribute.seaSurfaceTemperature=true data.ll.observation.Set.attribute.basketsPerSectionCount=true +data.ps.localmarket.Batch.attribute.weight=true data.ps.localmarket.SampleSpeciesMeasure.attribute.count=true data.ps.localmarket.SampleSpeciesMeasure.attribute.sizeClass=true data.ps.localmarket.Survey.attribute.number=true ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/Batch/validation-create-error.xml ===================================== @@ -110,16 +110,17 @@ <message>observe.data.ps.localmarket.Batch.weight.validation.required</message> </field-validator> - <!-- weight is a positive number --> + <!-- weight is a strictly positive number --> <field-validator type="positiveNumber"> + <param name="strict">true</param> <message/> </field-validator> - <!-- 0.0 <= weight <= 5.0 except if !countOrWeightValid --> + <!-- 0.0001 <= weight <= 100.0 except if !countOrWeightValid --> <field-validator type="boundNumber"> <param name="skip"><![CDATA[ !countOrWeightValid ]]></param> - <param name="min">0.0</param> - <param name="max">5.0</param> + <param name="min">0.0001</param> + <param name="max">100.0</param> <message/> </field-validator> </field> ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/Batch/validation-create.json ===================================== @@ -58,8 +58,8 @@ }, "weight": { "errors": [ - "0.0 <= weight <= 5.0 except if !countOrWeightValid", - "weight is a positive number", + "0.0001 <= weight <= 100.0 except if !countOrWeightValid", + "weight is a strictly positive number", "weight is mandatory except if countOrWeightValid" ] } ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/Batch/validation-update-error.xml ===================================== @@ -110,16 +110,17 @@ <message>observe.data.ps.localmarket.Batch.weight.validation.required</message> </field-validator> - <!-- weight is a positive number --> + <!-- weight is a strictly positive number --> <field-validator type="positiveNumber"> + <param name="strict">true</param> <message/> </field-validator> - <!-- 0.0 <= weight <= 5.0 except if !countOrWeightValid --> + <!-- 0.0001 <= weight <= 100.0 except if !countOrWeightValid --> <field-validator type="boundNumber"> <param name="skip"><![CDATA[ !countOrWeightValid ]]></param> - <param name="min">0.0</param> - <param name="max">5.0</param> + <param name="min">0.0001</param> + <param name="max">100.0</param> <message/> </field-validator> </field> ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/Batch/validation-update.json ===================================== @@ -58,8 +58,8 @@ }, "weight": { "errors": [ - "0.0 <= weight <= 5.0 except if !countOrWeightValid", - "weight is a positive number", + "0.0001 <= weight <= 100.0 except if !countOrWeightValid", + "weight is a strictly positive number", "weight is mandatory except if countOrWeightValid" ] } ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/SurveyPart/validation-create-error.xml ===================================== @@ -49,9 +49,9 @@ <message/> </field-validator> - <!-- proportion=0.0 <= proportion <= 100.0 --> + <!-- 0.0 <= proportion <= 100.0 --> <field-validator type="boundNumber"> - <param name="min">proportion=0.0</param> + <param name="min">0.0</param> <param name="max">100.0</param> <message/> </field-validator> ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/SurveyPart/validation-create.json ===================================== @@ -6,10 +6,10 @@ }, "proportion": { "errors": [ + "0.0 <= proportion <= 100.0", "proportion is a proportion", "proportion is a strictly positive number", - "proportion is mandatory except if dataEmpty", - "proportion=0.0 <= proportion <= 100.0" + "proportion is mandatory except if dataEmpty" ], "warnings": [ "the hole data is empty" ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/SurveyPart/validation-update-error.xml ===================================== @@ -49,9 +49,9 @@ <message/> </field-validator> - <!-- proportion=0.0 <= proportion <= 100.0 --> + <!-- 0.0 <= proportion <= 100.0 --> <field-validator type="boundNumber"> - <param name="min">proportion=0.0</param> + <param name="min">0.0</param> <param name="max">100.0</param> <message/> </field-validator> ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/SurveyPart/validation-update.json ===================================== @@ -6,10 +6,10 @@ }, "proportion": { "errors": [ + "0.0 <= proportion <= 100.0", "proportion is a proportion", "proportion is a strictly positive number", - "proportion is mandatory except if dataEmpty", - "proportion=0.0 <= proportion <= 100.0" + "proportion is mandatory except if dataEmpty" ], "warnings": [ "the hole data is empty" View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/931ed7b03d38d8a00070b9093... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/931ed7b03d38d8a00070b9093... You're receiving this email because of your account on gitlab.com.