Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe

Commits:

15 changed files:

Changes:

  • client/core/src/main/i18n/getters/java.getter
    ... ... @@ -135,6 +135,9 @@ observe.ui.datasource.editor.actions.data.import.result
    135 135
     observe.ui.datasource.editor.actions.data.import.title.require.add.missing.referential
    
    136 136
     observe.ui.datasource.editor.actions.data.insertMissingReferentialToLeft
    
    137 137
     observe.ui.datasource.editor.actions.data.insertMissingReferentialToRight
    
    138
    +observe.ui.datasource.storage.config.test.message.failure
    
    139
    +observe.ui.datasource.storage.config.test.message.success
    
    140
    +observe.ui.datasource.storage.config.test.title
    
    138 141
     observe.ui.datasource.storage.error.badUrl
    
    139 142
     observe.ui.datasource.storage.error.dbVersionMismatch
    
    140 143
     observe.ui.datasource.storage.error.serverVersionMismatch
    

  • client/core/src/main/java/fr/ird/observe/client/datasource/presets/actions/Create.java
    ... ... @@ -48,15 +48,6 @@ public class Create extends RemotePresetsUIActionSupport {
    48 48
         protected void doActionPerformed(ActionEvent e, RemotePresetsUI ui) {
    
    49 49
     
    
    50 50
             switch (ui.getTabs().getSelectedIndex()) {
    
    51
    -            case 0: {
    
    52
    -                RemoteDataSourceConfiguration configuration = new RemoteDataSourceConfiguration();
    
    53
    -                List<RemoteDataSourceConfiguration> configurations = new ArrayList<>(ui.getModel().getRemoteDataSourceConfigurations());
    
    54
    -                configurations.add(configuration);
    
    55
    -                ui.getModel().setRemoteDataSourceConfigurations(configurations);
    
    56
    -                ui.getModel().setRemoteCreateMode(true);
    
    57
    -                ui.getRemoteConfigurations().setSelectedValue(configuration, true);
    
    58
    -            }
    
    59
    -            break;
    
    60 51
                 case 1: {
    
    61 52
                     ServerDataSourceConfiguration configuration = new ServerDataSourceConfiguration();
    
    62 53
                     List<ServerDataSourceConfiguration> configurations = new ArrayList<>(ui.getModel().getServerDataSourceConfigurations());
    
    ... ... @@ -66,6 +57,15 @@ public class Create extends RemotePresetsUIActionSupport {
    66 57
                     ui.getServerConfigurations().setSelectedValue(configuration, true);
    
    67 58
                 }
    
    68 59
                 break;
    
    60
    +            case 0: {
    
    61
    +                RemoteDataSourceConfiguration configuration = new RemoteDataSourceConfiguration();
    
    62
    +                List<RemoteDataSourceConfiguration> configurations = new ArrayList<>(ui.getModel().getRemoteDataSourceConfigurations());
    
    63
    +                configurations.add(configuration);
    
    64
    +                ui.getModel().setRemoteDataSourceConfigurations(configurations);
    
    65
    +                ui.getModel().setRemoteCreateMode(true);
    
    66
    +                ui.getRemoteConfigurations().setSelectedValue(configuration, true);
    
    67
    +            }
    
    68
    +            break;
    
    69 69
             }
    
    70 70
     
    
    71 71
         }
    

  • client/core/src/main/java/fr/ird/observe/client/datasource/presets/actions/TestRemote.java
    ... ... @@ -54,6 +54,7 @@ public class TestRemote extends RemoteActionSupport {
    54 54
     
    
    55 55
             String connexionStatusError = null;
    
    56 56
             Version modelVersion = getClientConfig().getModelVersion();
    
    57
    +        config.setModelVersion(modelVersion);
    
    57 58
             ObserveSwingDataSource dataSource = getDataSourcesManager().newDataSource(config);
    
    58 59
             try {
    
    59 60
                 ObserveDataSourceInformation dataSourceInformation = dataSource.checkCanConnect(false);
    
    ... ... @@ -74,9 +75,9 @@ public class TestRemote extends RemoteActionSupport {
    74 75
                     }
    
    75 76
                 } finally {
    
    76 77
                     if (connexionStatusError == null) {
    
    77
    -                    displayInfo("Test de connexion", "Le connexion a été établie avec succès.");
    
    78
    +                    displayWarning(t("observe.ui.datasource.storage.config.test.title"), t("observe.ui.datasource.storage.config.test.message.success"));
    
    78 79
                     } else {
    
    79
    -                    displayWarning("Test de connexion", "Le test de connexion a échoué :\n" + connexionStatusError);
    
    80
    +                    displayWarning(t("observe.ui.datasource.storage.config.test.title"), t("observe.ui.datasource.storage.config.test.message.failure", connexionStatusError));
    
    80 81
                     }
    
    81 82
                 }
    
    82 83
             }
    

  • client/core/src/main/java/fr/ird/observe/client/datasource/presets/actions/TestServer.java
    ... ... @@ -103,9 +103,9 @@ public class TestServer extends ServerActionSupport {
    103 103
                     }
    
    104 104
                 } finally {
    
    105 105
                     if (connexionStatusError == null) {
    
    106
    -                    displayInfo("Test de connexion", "Le connexion a été établie avec succès.");
    
    106
    +                    displayInfo(t("observe.ui.datasource.storage.config.test.title"), t("observe.ui.datasource.storage.config.test.message.success"));
    
    107 107
                     } else {
    
    108
    -                    displayWarning("Test de connexion", "Le test de connexion a échoué :\n" + connexionStatusError);
    
    108
    +                    displayWarning(t("observe.ui.datasource.storage.config.test.title"), t("observe.ui.datasource.storage.config.test.message.failure", connexionStatusError));
    
    109 109
                     }
    
    110 110
                 }
    
    111 111
             }
    

  • client/runner/src/main/i18n/translations/client-runner_en_GB.properties
    ... ... @@ -688,6 +688,9 @@ observe.ui.datasource.storage.config.referentiel.mode=Referential import mode
    688 688
     observe.ui.datasource.storage.config.referentiel.storage=Central data source configuration
    
    689 689
     observe.ui.datasource.storage.config.right.storage=Right data source configuration
    
    690 690
     observe.ui.datasource.storage.config.source.storage=Configuration of data source to update
    
    691
    +observe.ui.datasource.storage.config.test.message.failure=The connexion has failed\: %s
    
    692
    +observe.ui.datasource.storage.config.test.message.success=The connexion was successful
    
    693
    +observe.ui.datasource.storage.config.test.title=Testing connexion
    
    691 694
     observe.ui.datasource.storage.error.badUrl=The url format is not valid (%s)
    
    692 695
     observe.ui.datasource.storage.error.dbVersionMismatch=Version of remote database (%s) is not compliant with the model version (%s)
    
    693 696
     observe.ui.datasource.storage.error.serverVersionMismatch=Remote server version (%s) is not compliant with the client version (%s)
    

  • client/runner/src/main/i18n/translations/client-runner_es_ES.properties
    ... ... @@ -688,6 +688,9 @@ observe.ui.datasource.storage.config.referentiel.mode=Modo de importación del r
    688 688
     observe.ui.datasource.storage.config.referentiel.storage=Configuración de la base de referencia
    
    689 689
     observe.ui.datasource.storage.config.right.storage=Configuration de la base de la derecha
    
    690 690
     observe.ui.datasource.storage.config.source.storage=Configuración de la base de la izquierda
    
    691
    +observe.ui.datasource.storage.config.test.message.failure=The connexion has failed\: %s \#TODO
    
    692
    +observe.ui.datasource.storage.config.test.message.success=The connexion was successful \#TODO
    
    693
    +observe.ui.datasource.storage.config.test.title=Testing connexion \#TODO
    
    691 694
     observe.ui.datasource.storage.error.badUrl=Error en el formato de la dirección (URL) %s
    
    692 695
     observe.ui.datasource.storage.error.dbVersionMismatch=La versión de la base remota (%s) no es compatible con la versión del modelo (%s).
    
    693 696
     observe.ui.datasource.storage.error.serverVersionMismatch=La versión del servidor remoto (%s) no es compatible con la versión del modelo (%s)
    

  • client/runner/src/main/i18n/translations/client-runner_fr_FR.properties
    ... ... @@ -688,6 +688,9 @@ observe.ui.datasource.storage.config.referentiel.mode=Mode d'import du référen
    688 688
     observe.ui.datasource.storage.config.referentiel.storage=Configuration de la base de référence
    
    689 689
     observe.ui.datasource.storage.config.right.storage=Configuration de la base de droite
    
    690 690
     observe.ui.datasource.storage.config.source.storage=Configuration de la base à mettre à jour
    
    691
    +observe.ui.datasource.storage.config.test.message.failure=Le test de connexion a échoué \: \n %s
    
    692
    +observe.ui.datasource.storage.config.test.message.success=Le connexion a été établie avec succès.
    
    693
    +observe.ui.datasource.storage.config.test.title=Testing connexion
    
    691 694
     observe.ui.datasource.storage.error.badUrl=Erreur dans le format de l'URL %s
    
    692 695
     observe.ui.datasource.storage.error.dbVersionMismatch=La version de la base distante (%s) n'est pas compatible avec la version du modèle (%s)
    
    693 696
     observe.ui.datasource.storage.error.serverVersionMismatch=La version du serveur distant (%s) n'est pas compatible avec la version du client (%s)
    

  • core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/logbook/Sample/validation-create.json
    ... ... @@ -3,7 +3,7 @@
    3 3
         "errors": [
    
    4 4
           "0.0 <= bigsWeight <= 200.0",
    
    5 5
           "bigsWeight is a positive number",
    
    6
    -      "bigsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0)",
    
    6
    +      "bigsWeight is mandatory except if (totalWeight != null && totalWeight > 0)",
    
    7 7
           "bigsWeight not allowed if totalWeight filled"
    
    8 8
         ]
    
    9 9
       },
    
    ... ... @@ -54,7 +54,7 @@
    54 54
         "errors": [
    
    55 55
           "0.0 <= smallsWeight <= 200.0",
    
    56 56
           "smallsWeight is a positive number",
    
    57
    -      "smallsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0)",
    
    57
    +      "smallsWeight is mandatory except if (totalWeight != null && totalWeight > 0)",
    
    58 58
           "smallsWeight not allowed if totalWeight filled"
    
    59 59
         ]
    
    60 60
       },
    
    ... ... @@ -67,7 +67,7 @@
    67 67
         "errors": [
    
    68 68
           "0.0 <= totalWeight <= 200.0",
    
    69 69
           "totalWeight is a positive number",
    
    70
    -      "totalWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0)",
    
    70
    +      "totalWeight is mandatory except if (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0)",
    
    71 71
           "totalWeight not allowed if bigsWeight and smallsWeight filled"
    
    72 72
         ]
    
    73 73
       },
    

  • core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/logbook/Sample/validation-update.json
    ... ... @@ -3,7 +3,7 @@
    3 3
         "errors": [
    
    4 4
           "0.0 <= bigsWeight <= 200.0",
    
    5 5
           "bigsWeight is a positive number",
    
    6
    -      "bigsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0)",
    
    6
    +      "bigsWeight is mandatory except if (totalWeight != null && totalWeight > 0)",
    
    7 7
           "bigsWeight not allowed if totalWeight filled"
    
    8 8
         ]
    
    9 9
       },
    
    ... ... @@ -54,7 +54,7 @@
    54 54
         "errors": [
    
    55 55
           "0.0 <= smallsWeight <= 200.0",
    
    56 56
           "smallsWeight is a positive number",
    
    57
    -      "smallsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0)",
    
    57
    +      "smallsWeight is mandatory except if (totalWeight != null && totalWeight > 0)",
    
    58 58
           "smallsWeight not allowed if totalWeight filled"
    
    59 59
         ]
    
    60 60
       },
    
    ... ... @@ -67,7 +67,7 @@
    67 67
         "errors": [
    
    68 68
           "0.0 <= totalWeight <= 200.0",
    
    69 69
           "totalWeight is a positive number",
    
    70
    -      "totalWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0)",
    
    70
    +      "totalWeight is mandatory except if (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0)",
    
    71 71
           "totalWeight not allowed if bigsWeight and smallsWeight filled"
    
    72 72
         ]
    
    73 73
       },
    

  • core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ValidateService-referentialResult.json
    ... ... @@ -118397,6 +118397,33 @@
    118397 118397
             }
    
    118398 118398
           ]
    
    118399 118399
         },
    
    118400
    +    {
    
    118401
    +      "reference": {
    
    118402
    +        "type": "fr.ird.observe.dto.referential.ll.landing.DataSourceReference",
    
    118403
    +        "content": {
    
    118404
    +          "code": "R Dogley",
    
    118405
    +          "label": "Ruby Dogley (Technicien SFA)",
    
    118406
    +          "needComment": false,
    
    118407
    +          "enabled": true,
    
    118408
    +          "id": "fr.ird.referential.ll.landing.DataSource#1651919221463#0.13484675401101676",
    
    118409
    +          "lastUpdateDate": "2022-05-07T14:27:01.463Z",
    
    118410
    +          "topiaVersion": 1,
    
    118411
    +          "topiaCreateDate": "2022-05-07T14:25:57.747Z"
    
    118412
    +        }
    
    118413
    +      },
    
    118414
    +      "messages": [
    
    118415
    +        {
    
    118416
    +          "fieldName": "label1",
    
    118417
    +          "scope": "WARNING",
    
    118418
    +          "message": "Le libellé anglais n\u0027est pas traduit."
    
    118419
    +        },
    
    118420
    +        {
    
    118421
    +          "fieldName": "label3",
    
    118422
    +          "scope": "WARNING",
    
    118423
    +          "message": "Le libellé espagnol n\u0027est pas traduit."
    
    118424
    +        }
    
    118425
    +      ]
    
    118426
    +    },
    
    118400 118427
         {
    
    118401 118428
           "reference": {
    
    118402 118429
             "type": "fr.ird.observe.dto.referential.ll.landing.DataSourceReference",
    

  • model/src/main/models/Observe/dto/attribute/notNullIf.properties
    ... ... @@ -48,9 +48,9 @@ data.ps.logbook.Activity.attribute.longitude=floatingObjectEnabled && !setEnable
    48 48
     data.ps.logbook.Activity.attribute.quadrant=floatingObjectEnabled && !setEnabled
    
    49 49
     data.ps.logbook.Activity.attribute.setCount=!setEnabled
    
    50 50
     data.ps.logbook.Activity.attribute.setSuccessStatus=!setEnabled || reasonForNoFishing != null
    
    51
    -data.ps.logbook.Sample.attribute.bigsWeight=(smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0)
    
    52
    -data.ps.logbook.Sample.attribute.smallsWeight=(smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0)
    
    53
    -data.ps.logbook.Sample.attribute.totalWeight=(smallsWeight == null && bigsWeight == null && totalWeight == null) || (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0)
    
    51
    +data.ps.logbook.Sample.attribute.bigsWeight=(totalWeight != null && totalWeight > 0)
    
    52
    +data.ps.logbook.Sample.attribute.smallsWeight=(totalWeight != null && totalWeight > 0)
    
    53
    +data.ps.logbook.Sample.attribute.totalWeight=(bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0)
    
    54 54
     data.ps.observation.Catch.attribute.catchWeight=totalCount != null
    
    55 55
     data.ps.observation.Catch.attribute.totalCount=catchWeight != null
    
    56 56
     data.ps.observation.SampleMeasure.attribute.length=acquisitionMode == 1 && weight != null
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/logbook/Sample/validation-create-error.xml
    ... ... @@ -25,9 +25,9 @@
    25 25
     <validators>
    
    26 26
     
    
    27 27
       <field name="bigsWeight">
    
    28
    -    <!-- bigsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) -->
    
    28
    +    <!-- bigsWeight is mandatory except if (totalWeight != null && totalWeight > 0) -->
    
    29 29
         <field-validator type="mandatory" short-circuit="true">
    
    30
    -      <param name="skip"><![CDATA[ (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) ]]></param>
    
    30
    +      <param name="skip"><![CDATA[ (totalWeight != null && totalWeight > 0) ]]></param>
    
    31 31
           <message>observe.data.ps.logbook.Sample.bigsWeight.validation.required</message>
    
    32 32
         </field-validator>
    
    33 33
     
    
    ... ... @@ -111,9 +111,9 @@
    111 111
       </field>
    
    112 112
     
    
    113 113
       <field name="smallsWeight">
    
    114
    -    <!-- smallsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) -->
    
    114
    +    <!-- smallsWeight is mandatory except if (totalWeight != null && totalWeight > 0) -->
    
    115 115
         <field-validator type="mandatory" short-circuit="true">
    
    116
    -      <param name="skip"><![CDATA[ (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) ]]></param>
    
    116
    +      <param name="skip"><![CDATA[ (totalWeight != null && totalWeight > 0) ]]></param>
    
    117 117
           <message>observe.data.ps.logbook.Sample.smallsWeight.validation.required</message>
    
    118 118
         </field-validator>
    
    119 119
     
    
    ... ... @@ -144,9 +144,9 @@
    144 144
       </field>
    
    145 145
     
    
    146 146
       <field name="totalWeight">
    
    147
    -    <!-- totalWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0) -->
    
    147
    +    <!-- totalWeight is mandatory except if (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0) -->
    
    148 148
         <field-validator type="mandatory" short-circuit="true">
    
    149
    -      <param name="skip"><![CDATA[ (smallsWeight == null && bigsWeight == null && totalWeight == null) || (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0) ]]></param>
    
    149
    +      <param name="skip"><![CDATA[ (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0) ]]></param>
    
    150 150
           <message>observe.data.ps.logbook.Sample.totalWeight.validation.required</message>
    
    151 151
         </field-validator>
    
    152 152
     
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/logbook/Sample/validation-create.json
    ... ... @@ -3,7 +3,7 @@
    3 3
         "errors": [
    
    4 4
           "0.0 <= bigsWeight <= 200.0",
    
    5 5
           "bigsWeight is a positive number",
    
    6
    -      "bigsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0)",
    
    6
    +      "bigsWeight is mandatory except if (totalWeight != null && totalWeight > 0)",
    
    7 7
           "bigsWeight not allowed if totalWeight filled"
    
    8 8
         ]
    
    9 9
       },
    
    ... ... @@ -54,7 +54,7 @@
    54 54
         "errors": [
    
    55 55
           "0.0 <= smallsWeight <= 200.0",
    
    56 56
           "smallsWeight is a positive number",
    
    57
    -      "smallsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0)",
    
    57
    +      "smallsWeight is mandatory except if (totalWeight != null && totalWeight > 0)",
    
    58 58
           "smallsWeight not allowed if totalWeight filled"
    
    59 59
         ]
    
    60 60
       },
    
    ... ... @@ -67,7 +67,7 @@
    67 67
         "errors": [
    
    68 68
           "0.0 <= totalWeight <= 200.0",
    
    69 69
           "totalWeight is a positive number",
    
    70
    -      "totalWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0)",
    
    70
    +      "totalWeight is mandatory except if (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0)",
    
    71 71
           "totalWeight not allowed if bigsWeight and smallsWeight filled"
    
    72 72
         ]
    
    73 73
       },
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/logbook/Sample/validation-update-error.xml
    ... ... @@ -25,9 +25,9 @@
    25 25
     <validators>
    
    26 26
     
    
    27 27
       <field name="bigsWeight">
    
    28
    -    <!-- bigsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) -->
    
    28
    +    <!-- bigsWeight is mandatory except if (totalWeight != null && totalWeight > 0) -->
    
    29 29
         <field-validator type="mandatory" short-circuit="true">
    
    30
    -      <param name="skip"><![CDATA[ (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) ]]></param>
    
    30
    +      <param name="skip"><![CDATA[ (totalWeight != null && totalWeight > 0) ]]></param>
    
    31 31
           <message>observe.data.ps.logbook.Sample.bigsWeight.validation.required</message>
    
    32 32
         </field-validator>
    
    33 33
     
    
    ... ... @@ -111,9 +111,9 @@
    111 111
       </field>
    
    112 112
     
    
    113 113
       <field name="smallsWeight">
    
    114
    -    <!-- smallsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) -->
    
    114
    +    <!-- smallsWeight is mandatory except if (totalWeight != null && totalWeight > 0) -->
    
    115 115
         <field-validator type="mandatory" short-circuit="true">
    
    116
    -      <param name="skip"><![CDATA[ (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) ]]></param>
    
    116
    +      <param name="skip"><![CDATA[ (totalWeight != null && totalWeight > 0) ]]></param>
    
    117 117
           <message>observe.data.ps.logbook.Sample.smallsWeight.validation.required</message>
    
    118 118
         </field-validator>
    
    119 119
     
    
    ... ... @@ -144,9 +144,9 @@
    144 144
       </field>
    
    145 145
     
    
    146 146
       <field name="totalWeight">
    
    147
    -    <!-- totalWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0) -->
    
    147
    +    <!-- totalWeight is mandatory except if (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0) -->
    
    148 148
         <field-validator type="mandatory" short-circuit="true">
    
    149
    -      <param name="skip"><![CDATA[ (smallsWeight == null && bigsWeight == null && totalWeight == null) || (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0) ]]></param>
    
    149
    +      <param name="skip"><![CDATA[ (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0) ]]></param>
    
    150 150
           <message>observe.data.ps.logbook.Sample.totalWeight.validation.required</message>
    
    151 151
         </field-validator>
    
    152 152
     
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/logbook/Sample/validation-update.json
    ... ... @@ -3,7 +3,7 @@
    3 3
         "errors": [
    
    4 4
           "0.0 <= bigsWeight <= 200.0",
    
    5 5
           "bigsWeight is a positive number",
    
    6
    -      "bigsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0)",
    
    6
    +      "bigsWeight is mandatory except if (totalWeight != null && totalWeight > 0)",
    
    7 7
           "bigsWeight not allowed if totalWeight filled"
    
    8 8
         ]
    
    9 9
       },
    
    ... ... @@ -54,7 +54,7 @@
    54 54
         "errors": [
    
    55 55
           "0.0 <= smallsWeight <= 200.0",
    
    56 56
           "smallsWeight is a positive number",
    
    57
    -      "smallsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0)",
    
    57
    +      "smallsWeight is mandatory except if (totalWeight != null && totalWeight > 0)",
    
    58 58
           "smallsWeight not allowed if totalWeight filled"
    
    59 59
         ]
    
    60 60
       },
    
    ... ... @@ -67,7 +67,7 @@
    67 67
         "errors": [
    
    68 68
           "0.0 <= totalWeight <= 200.0",
    
    69 69
           "totalWeight is a positive number",
    
    70
    -      "totalWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0)",
    
    70
    +      "totalWeight is mandatory except if (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0)",
    
    71 71
           "totalWeight not allowed if bigsWeight and smallsWeight filled"
    
    72 72
         ]
    
    73 73
       },