Skip to content

[45885] Start Timer Event configuration affected by the user's profile date format#465

Merged
nolanpro merged 3 commits intodevelopfrom
bugfix/FOUR-25088
Apr 10, 2026
Merged

[45885] Start Timer Event configuration affected by the user's profile date format#465
nolanpro merged 3 commits intodevelopfrom
bugfix/FOUR-25088

Conversation

@marcoAntonioNina
Copy link
Copy Markdown
Contributor

@marcoAntonioNina marcoAntonioNina commented Sep 9, 2025

Ticket FOUR-25088

According to the date picker configuration, if it is a datetime type, a hh:mm is added by default if the date and time configuration does not have the time.

},
format() {
return this.datepicker ? getUserDateTimeFormat() : getUserDateFormat();
let format = this.datepicker ? getUserDateTimeFormat() : getUserDateFormat();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

add a fallback control
format = format || 'YYYY-MM-DD'; // fallback

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the functions getUserDateTimeFormat() and getUserDateFormat() already have a fallback defined.

const hasTimePattern = /[Hh]{1,2}:[mM]{1,2}/.test(format);
if (!hasTimePattern) {
// If forceDateTime is true and no time pattern exists, ensure the format includes hh:mm A
format = format.replace(/[\sHh:msaAzZ]/g, '') + ' hh:mm A';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is posible use
format =${format} hh:mm A;
instead of replace?

@processmaker-sonarqube
Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@nolanpro nolanpro merged commit f741322 into develop Apr 10, 2026
8 checks passed
@nolanpro nolanpro deleted the bugfix/FOUR-25088 branch April 10, 2026 20:10
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.

3 participants