Skip to content

Conversation

@marioserrano09
Copy link
Contributor

This pull request introduces support for account-level time zone resolution in the SaaS module, alongside improvements to locale handling and project dependency updates. The main change is the addition of a new provider for account time zones, which complements the existing locale provider and ensures that both locale and time zone can be resolved per account session. Additionally, all Maven module versions and key dependencies have been updated for consistency and to keep the project current.

Account Session Enhancements

  • Added a new AccountTimeZoneProvider class that supplies the default time zone based on the current account session, similar to how locale is resolved. This enables account-specific time zone handling for SaaS environments.
  • Updated AccountSessionHolder to store and resolve ZoneId for the account, including logic to load the time zone from the account and fall back to the system default if not set. Also refactored locale loading for clarity and error handling.

Provider Documentation

  • Improved Javadoc comments for AccountLocaleProvider to clarify its purpose, usage, and priority in locale resolution.

Dependency and Version Updates

  • Updated all module and dependency versions from 3.4.1 to 3.4.2 in pom.xml files across the codebase, ensuring consistency and compatibility.
  • Bumped key parent and property versions: dynamiatools.version to 5.4.1 and springboot.version to 3.5.5 in the root pom.xml.

Copilot AI review requested due to automatic review settings August 24, 2025 10:26
@marioserrano09 marioserrano09 merged commit 43576f2 into master Aug 24, 2025
1 check passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the SaaS module from version 3.4.1 to 3.4.2, adds account-level time zone resolution capabilities, and updates key dependencies including DynamiaTools to v5.4.1 and Spring Boot to v3.5.5.

  • Added AccountTimeZoneProvider class for account-specific time zone handling in SaaS environments
  • Enhanced AccountSessionHolder with time zone loading and improved locale handling with better error management
  • Updated all Maven module versions and key dependency versions for consistency

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sources/pom.xml Updated parent version, DynamiaTools to 5.4.1, and Spring Boot to 3.5.5
sources/core/src/main/java/tools/dynamia/modules/saas/AccountTimeZoneProvider.java New provider class for account-level time zone resolution
sources/core/src/main/java/tools/dynamia/modules/saas/AccountSessionHolder.java Added time zone loading and refactored locale loading with error handling
sources/core/src/main/java/tools/dynamia/modules/saas/AccountLocaleProvider.java Enhanced Javadoc documentation for clarity
sources/ui/pom.xml Updated parent and module versions to 3.4.2
sources/remote/pom.xml Updated parent and dependency versions to 3.4.2
sources/jpa/pom.xml Updated parent and dependency versions to 3.4.2
sources/core/pom.xml Updated parent, module, and dependency versions to 3.4.2
sources/api/pom.xml Updated parent and module versions to 3.4.2

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +137 to +142
public ZoneId getAccountTimeZone() {
if (accountTimeZone == null) {
accountTimeZone = ZoneId.systemDefault();
}
return accountTimeZone;
}
Copy link

Copilot AI Aug 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method getAccountTimeZone() always returns a non-null value by falling back to system default, but this behavior should be documented in the method's Javadoc to clarify the fallback behavior for API consumers.

Suggested change
public ZoneId getAccountTimeZone() {
if (accountTimeZone == null) {
accountTimeZone = ZoneId.systemDefault();
}
return accountTimeZone;
}
/**
* Returns the account's time zone. If the account time zone is not set,
* this method falls back to the system default time zone ({@link ZoneId#systemDefault()}).
* This method never returns {@code null}.
*
* @return the account's time zone, or the system default if not set
*/
public ZoneId getAccountTimeZone() {
if (accountTimeZone == null) {
accountTimeZone = ZoneId.systemDefault();
}
return accountTimeZone;
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants