[Git][ultreiaio/ird-observe][develop] 6 commits: low log level
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: daa07bd4 by Tony Chemit at 2021-10-27T12:02:41+02:00 low log level - - - - - 6dfac180 by Tony Chemit at 2021-10-27T12:04:09+02:00 improve WeightCategoryHelper code - - - - - a709fbdc by Tony Chemit at 2021-10-27T12:14:31+02:00 update pom - - - - - 1e948a7b by Tony Chemit at 2021-10-27T12:34:40+02:00 update CHANGELOG [skip ci] - - - - - 762b5622 by Tony Chemit at 2021-10-27T13:21:45+02:00 Gestion des dates de mises à jour lors de suppression de référentiels via les synchronisations - Close ultreiaio/ird-observe-toolkit#102 On utilise toujours une date par defaut si on ne la pas trouvée depuis la Task lors de la génération du code sql, cette date est nécessaire pour mettee à jour certaines associations lors de remplacement - - - - - 76d2d058 by Tony Chemit at 2021-10-27T15:12:40+02:00 update pom - - - - - 6 changed files: - CHANGELOG.md - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/simple/ContentSimpleUIModelSupport.java - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/WeightCategoryHelper.java - pom.xml - services/local-impl/src/main/java/fr/ird/observe/services/local/service/referential/ReferentialServiceLocalSupport.java - services/local-impl/src/main/java/fr/ird/observe/services/local/service/referential/SynchronizeServiceLocalSupport.java Changes: ===================================== CHANGELOG.md ===================================== @@ -1,11 +1,11 @@ # ObServe changelog * Author [Tony Chemit](mailto:dev@tchemit.fr) - * Last generated at 2021-10-26 20:34. + * Last generated at 2021-10-27 12:34. ## Version [9.0.0-RC-17](https://gitlab.com/ultreiaio/ird-observe/-/milestones/205) -**Closed at 2021-10-26.** +**Closed at 2021-10-27.** ### Download * [Application (observe-9.0.0-RC-17.zip)](https://repo1.maven.org/maven2/fr/ird/observe/observe/9.0.0-RC-17/observe-9....) @@ -47,7 +47,9 @@ * [[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) * [[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) * [[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) + * [[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) * [[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) + * [[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) * [[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) * [[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) * [[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 result = bean.get(showDataPropertyName); if (result) { // got a matching bean property - log.info(String.format("%sUse dto bean property %s to enable %s create action.", getPrefix(), showDataPropertyName, dtoType.getName())); + log.debug(String.format("%sUse dto bean property %s to enable %s create action.", getPrefix(), showDataPropertyName, dtoType.getName())); } } 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; * @since 9.0.0 */ public class WeightCategoryHelper { + public static final String AVAILABLE_WEIGHT_CATEGORY = "availableWeightCategory"; private static final Logger log = LogManager.getLogger(WeightCategoryHelper.class); final ContentTableUIModelStates<?, ?> states; final PropertyChangeListener speciesChanged; @@ -53,16 +54,18 @@ public class WeightCategoryHelper { } public void install(FilterableComboBox<WeightCategoryReference> editor) { - states.addPropertyChangeListener("availableWeightCategory", evt -> { - WeightCategoryReference weightCategory = states.getTableEditBean().get("weightCategory"); + states.addPropertyChangeListener(AVAILABLE_WEIGHT_CATEGORY, evt -> { + WeightCategoryReference previousWeightCategory = states.getTableEditBean().get("weightCategory"); @SuppressWarnings("unchecked") List<WeightCategoryReference> newValue = (List<WeightCategoryReference>) evt.getNewValue(); -// boolean weightCategoryModified = false; - if (newValue == null || !newValue.contains(weightCategory)) { - weightCategory = null; -// weightCategoryModified = true; + WeightCategoryReference newWeightCategory; + if (newValue == null || !newValue.contains(previousWeightCategory)) { + newWeightCategory = null; + } else { + newWeightCategory = previousWeightCategory; } + log.info(String.format("Will use category %s, from %d category(ies)", newWeightCategory, newValue == null ? 0 : newValue.size())); editor.setData(newValue); - editor.setSelectedItem(weightCategory); + editor.setSelectedItem(newWeightCategory); }); } @@ -79,8 +82,7 @@ public class WeightCategoryHelper { if (states.isReadingMode() || !states.isEditing()) { return; } - List<WeightCategoryReference> newCategories; - List<WeightCategoryReference> referentialReferences = states.getReferenceCache().getReferentialReferences(CatchDto.PROPERTY_WEIGHT_CATEGORY); + List<WeightCategoryReference> allCategories = states.getReferenceCache().getReferentialReferences(CatchDto.PROPERTY_WEIGHT_CATEGORY); Predicate<WeightCategoryReference> predicate; if (species == null) { // get all categories with no species @@ -89,8 +91,8 @@ public class WeightCategoryHelper { // get all categories with no species, or with this species predicate = r -> r.getSpecies() == null || r.getSpecies().equals(species); } - newCategories = referentialReferences.stream().filter(predicate).collect(Collectors.toList()); + List<WeightCategoryReference> newCategories = allCategories.stream().filter(predicate).collect(Collectors.toList()); log.info(String.format("For species: %s, found %d category(ies)", species, newCategories.size())); - states.firePropertyChanged("availableWeightCategory", newCategories); + states.firePropertyChanged(AVAILABLE_WEIGHT_CATEGORY, newCategories); } } ===================================== pom.xml ===================================== @@ -24,7 +24,7 @@ <parent> <groupId>io.ultreia.maven</groupId> <artifactId>pom</artifactId> - <version>2021.113</version> + <version>2021.116</version> </parent> <groupId>fr.ird.observe</groupId> @@ -161,7 +161,7 @@ <maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format> <buildDate>${maven.build.timestamp}</buildDate> - <lib.version.toolkit>5.0.51</lib.version.toolkit> + <lib.version.toolkit>5.0.52</lib.version.toolkit> <lib.version.ognl>3.1.29</lib.version.ognl> <!--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 } OneSideSqlRequest sqlRequest = OneSideSqlRequest.builder().addTasks(SynchronizeTaskType.ADD, missingReferentialIds).build(); OneSideSqlResult sqlResult = serviceContext.getTopiaApplicationContext() - .newOneSideSqlResultBuilder(getTopiaPersistenceContext(), getApplicationLocale()) + .newOneSideSqlResultBuilder(getTopiaPersistenceContext(), getApplicationLocale(), now()) .build(sqlRequest); 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 public OneSideSqlResult produceSqlResult(OneSideSqlRequest request) { long startTime = TimeLog.getTime(); OneSideSqlResult result = serviceContext.getTopiaApplicationContext() - .newOneSideSqlResultBuilder(getTopiaPersistenceContext(), getApplicationLocale()) + .newOneSideSqlResultBuilder(getTopiaPersistenceContext(), getApplicationLocale(), now()) .build(request); TIME_LOG.log(startTime, "produceSqlResult"); return result; View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/d1c53add87dc53aa9b34d8176... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/d1c53add87dc53aa9b34d8176... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT (@tchemit)