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

Commits:

6 changed files:

Changes:

  • CHANGELOG.md
    1 1
     # ObServe changelog
    
    2 2
     
    
    3 3
      * Author [Tony Chemit](mailto:dev@tchemit.fr)
    
    4
    - * Last generated at 2021-10-26 20:34.
    
    4
    + * Last generated at 2021-10-27 12:34.
    
    5 5
     
    
    6 6
     ## Version [9.0.0-RC-17](https://gitlab.com/ultreiaio/ird-observe/-/milestones/205)
    
    7 7
     
    
    8
    -**Closed at 2021-10-26.**
    
    8
    +**Closed at 2021-10-27.**
    
    9 9
     
    
    10 10
     ### Download
    
    11 11
     * [Application (observe-9.0.0-RC-17.zip)](https://repo1.maven.org/maven2/fr/ird/observe/observe/9.0.0-RC-17/observe-9.0.0-RC-17.zip)
    
    ... ... @@ -47,7 +47,9 @@
    47 47
       * [[Type::Evolution 1618]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1618) **[PS][Logbook] Rajout d'un champ** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
    
    48 48
       * [[Type::Evolution 1773]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1773) **S'assurer qu'il y aura une date sur les landings PS** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
    
    49 49
       * [[Type::Evolution 1862]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1862) **Migration des données Logbook depuis AVDTH** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
    
    50
    +  * [[Type::Evolution 1871]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1871) **Migration des TargetCatch de la v7/8 vers Catch de la v9 : De la catégorie au poids moyen** (Thanks to Pascal Cauquil) (Reported by Pascal Cauquil)
    
    50 51
       * [[Type::Evolution 1883]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1883) **Captures logbook avec espèce de type Appât** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
    
    52
    +  * [[Type::Evolution 1888]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1888) **Synthèse des catégories de poids actuellement en vigueur** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
    
    51 53
       * [[Type::Evolution 1890]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1890) **Déporter la regex de contrôle de la syntaxe des cuves dans la configuration de l'application** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
    
    52 54
       * [[Type::Evolution 1963]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1963) **Rajouter un programme logbook sur la marée** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
    
    53 55
       * [[Type::Evolution 2026]](https://gitlab.com/ultreiaio/ird-observe/-/issues/2026) **Logs de l'import AVDTH** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
    

  • client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/simple/ContentSimpleUIModelSupport.java
    ... ... @@ -61,7 +61,7 @@ public abstract class ContentSimpleUIModelSupport<D extends DataDto> extends Con
    61 61
                     result = bean.get(showDataPropertyName);
    
    62 62
                     if (result) {
    
    63 63
                         // got a matching bean property
    
    64
    -                    log.info(String.format("%sUse dto bean property %s to enable %s create action.", getPrefix(), showDataPropertyName, dtoType.getName()));
    
    64
    +                    log.debug(String.format("%sUse dto bean property %s to enable %s create action.", getPrefix(), showDataPropertyName, dtoType.getName()));
    
    65 65
                     }
    
    66 66
                 }
    
    67 67
                 return result;
    

  • client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/WeightCategoryHelper.java
    ... ... @@ -43,6 +43,7 @@ import java.util.stream.Collectors;
    43 43
      * @since 9.0.0
    
    44 44
      */
    
    45 45
     public class WeightCategoryHelper {
    
    46
    +    public static final String AVAILABLE_WEIGHT_CATEGORY = "availableWeightCategory";
    
    46 47
         private static final Logger log = LogManager.getLogger(WeightCategoryHelper.class);
    
    47 48
         final ContentTableUIModelStates<?, ?> states;
    
    48 49
         final PropertyChangeListener speciesChanged;
    
    ... ... @@ -53,16 +54,18 @@ public class WeightCategoryHelper {
    53 54
         }
    
    54 55
     
    
    55 56
         public void install(FilterableComboBox<WeightCategoryReference> editor) {
    
    56
    -        states.addPropertyChangeListener("availableWeightCategory", evt -> {
    
    57
    -            WeightCategoryReference weightCategory = states.getTableEditBean().get("weightCategory");
    
    57
    +        states.addPropertyChangeListener(AVAILABLE_WEIGHT_CATEGORY, evt -> {
    
    58
    +            WeightCategoryReference previousWeightCategory = states.getTableEditBean().get("weightCategory");
    
    58 59
                 @SuppressWarnings("unchecked") List<WeightCategoryReference> newValue = (List<WeightCategoryReference>) evt.getNewValue();
    
    59
    -//            boolean weightCategoryModified = false;
    
    60
    -            if (newValue == null || !newValue.contains(weightCategory)) {
    
    61
    -                weightCategory = null;
    
    62
    -//                weightCategoryModified = true;
    
    60
    +            WeightCategoryReference newWeightCategory;
    
    61
    +            if (newValue == null || !newValue.contains(previousWeightCategory)) {
    
    62
    +                newWeightCategory = null;
    
    63
    +            } else {
    
    64
    +                newWeightCategory = previousWeightCategory;
    
    63 65
                 }
    
    66
    +            log.info(String.format("Will use category %s, from %d category(ies)", newWeightCategory, newValue == null ? 0 : newValue.size()));
    
    64 67
                 editor.setData(newValue);
    
    65
    -            editor.setSelectedItem(weightCategory);
    
    68
    +            editor.setSelectedItem(newWeightCategory);
    
    66 69
             });
    
    67 70
         }
    
    68 71
     
    
    ... ... @@ -79,8 +82,7 @@ public class WeightCategoryHelper {
    79 82
             if (states.isReadingMode() || !states.isEditing()) {
    
    80 83
                 return;
    
    81 84
             }
    
    82
    -        List<WeightCategoryReference> newCategories;
    
    83
    -        List<WeightCategoryReference> referentialReferences = states.getReferenceCache().getReferentialReferences(CatchDto.PROPERTY_WEIGHT_CATEGORY);
    
    85
    +        List<WeightCategoryReference> allCategories = states.getReferenceCache().getReferentialReferences(CatchDto.PROPERTY_WEIGHT_CATEGORY);
    
    84 86
             Predicate<WeightCategoryReference> predicate;
    
    85 87
             if (species == null) {
    
    86 88
                 // get all categories with no species
    
    ... ... @@ -89,8 +91,8 @@ public class WeightCategoryHelper {
    89 91
                 // get all categories with no species, or with this species
    
    90 92
                 predicate = r -> r.getSpecies() == null || r.getSpecies().equals(species);
    
    91 93
             }
    
    92
    -        newCategories = referentialReferences.stream().filter(predicate).collect(Collectors.toList());
    
    94
    +        List<WeightCategoryReference> newCategories = allCategories.stream().filter(predicate).collect(Collectors.toList());
    
    93 95
             log.info(String.format("For species: %s, found %d category(ies)", species, newCategories.size()));
    
    94
    -        states.firePropertyChanged("availableWeightCategory", newCategories);
    
    96
    +        states.firePropertyChanged(AVAILABLE_WEIGHT_CATEGORY, newCategories);
    
    95 97
         }
    
    96 98
     }

  • pom.xml
    ... ... @@ -24,7 +24,7 @@
    24 24
       <parent>
    
    25 25
         <groupId>io.ultreia.maven</groupId>
    
    26 26
         <artifactId>pom</artifactId>
    
    27
    -    <version>2021.113</version>
    
    27
    +    <version>2021.116</version>
    
    28 28
       </parent>
    
    29 29
     
    
    30 30
       <groupId>fr.ird.observe</groupId>
    
    ... ... @@ -161,7 +161,7 @@
    161 161
         <maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format>
    
    162 162
         <buildDate>${maven.build.timestamp}</buildDate>
    
    163 163
     
    
    164
    -    <lib.version.toolkit>5.0.51</lib.version.toolkit>
    
    164
    +    <lib.version.toolkit>5.0.52</lib.version.toolkit>
    
    165 165
     
    
    166 166
         <lib.version.ognl>3.1.29</lib.version.ognl>
    
    167 167
         <!--can't use 1.4.197 (date has changed + blob also)-->
    

  • services/local-impl/src/main/java/fr/ird/observe/services/local/service/referential/ReferentialServiceLocalSupport.java
    ... ... @@ -278,7 +278,7 @@ class ReferentialServiceLocalSupport extends ObserveServiceLocal implements Refe
    278 278
             }
    
    279 279
             OneSideSqlRequest sqlRequest = OneSideSqlRequest.builder().addTasks(SynchronizeTaskType.ADD, missingReferentialIds).build();
    
    280 280
             OneSideSqlResult sqlResult = serviceContext.getTopiaApplicationContext()
    
    281
    -                .newOneSideSqlResultBuilder(getTopiaPersistenceContext(), getApplicationLocale())
    
    281
    +                .newOneSideSqlResultBuilder(getTopiaPersistenceContext(), getApplicationLocale(), now())
    
    282 282
                     .build(sqlRequest);
    
    283 283
     
    
    284 284
             Path temporaryDirectoryRoot = serviceContext.getServiceInitializer().getInitializerConfig().getTemporaryDirectoryRoot().toPath();
    

  • services/local-impl/src/main/java/fr/ird/observe/services/local/service/referential/SynchronizeServiceLocalSupport.java
    ... ... @@ -89,7 +89,7 @@ public class SynchronizeServiceLocalSupport extends ObserveServiceLocal implemen
    89 89
         public OneSideSqlResult produceSqlResult(OneSideSqlRequest request) {
    
    90 90
             long startTime = TimeLog.getTime();
    
    91 91
             OneSideSqlResult result = serviceContext.getTopiaApplicationContext()
    
    92
    -                .newOneSideSqlResultBuilder(getTopiaPersistenceContext(), getApplicationLocale())
    
    92
    +                .newOneSideSqlResultBuilder(getTopiaPersistenceContext(), getApplicationLocale(), now())
    
    93 93
                     .build(request);
    
    94 94
             TIME_LOG.log(startTime, "produceSqlResult");
    
    95 95
             return result;