Skip to content

FOUR-33514 | Due Date is Shown in Wrong Format - #9081

Merged
nolanpro merged 1 commit into
developfrom
bugfix/FOUR-33514
Sep 28, 2026
Merged

nolanpro merged 1 commit into
developfrom
bugfix/FOUR-33514

Conversation

@mcraeteisha

@mcraeteisha mcraeteisha commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Issue

Ticket: FOUR-33514

On /tasks and /inbox, datetimes render as values like 7/5/2026 17:i instead of the profile format, such as 09/02/2025 11:47.

This is a regression from commit b4938316c. That commit added resources/js/vite/tasks/loaderTasks.js for the Vite tasks page.

setupMain() converts the profile's PHP format (m/d/Y H:i) to a Moment format (MM/DD/YYYY HH:mm) on window.ProcessMaker.user, but the new loader replaces that user with the Blade Eloquent user, which still has the PHP string. FilterTableBodyMixin passes that string to Moment, which treats i as a literal, so 17:07 on a Friday renders as 7/5/2026 17:i. Mix only wrote the raw user to window.Processmaker.user, so the list kept the Moment format.

Solution

  • Share the existing PHP-to-Moment lookup from resources/js/data/datetime_formats.json through momentFormatsFor and withMomentDateFormats in resources/js/next/config/user.js. Page setup uses that lookup the same way it did before.
  • In resources/js/vite/tasks/loaderTasks.js, convert window.temporal.user before assigning it to window.ProcessMaker.user and window.Processmaker.user, so the task list receives Moment tokens such as MM/DD/YYYY HH:mm.

How To Test

  1. Set the user datetime format to m/d/Y H:i.
  2. Open /tasks and /inbox.
  3. Confirm due dates render as 09/02/2025 11:47, with leading zeros and real minutes, not 7/5/2026 17:i.
  4. Repeat with d/m/Y H:i and confirm dates render as 02/09/2025 11:47.

ci:deploy

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

This change adds helpers to translate PHP datetime/calendar tokens into Moment-compatible formats and applies them when loading user config and the task page user object. It prevents legacy Blade-generated format strings from being used directly by Moment and keeps date rendering consistent across the app.
@cursor

cursor Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Scoped to client-side date display on the tasks/inbox entry path; no auth, API, or persistence changes.

Overview
Fixes due dates showing wrong on /tasks and /inbox (e.g. 7/5/2026 17:i) after the Vite tasks loader started assigning window.temporal.user over the user object that setupMain() had already normalized for Moment.

momentFormatsFor and withMomentDateFormats are extracted in user.js so PHP profile tokens from datetime_formats.json map to Moment datetime_format / calendar_format. The meta-tag bootstrap path now uses the same helper instead of an inline loop.

In loaderTasks.js, the Blade user is passed through withMomentDateFormats once as pageUser before it is written to window.ProcessMaker.user and window.Processmaker.user, so task list formatters receive strings like MM/DD/YYYY HH:mm instead of PHP m/d/Y H:i.

Reviewed by Cursor Bugbot for commit 4283679. Bugbot is set up for automated code reviews on this repo. Configure here.

@decisions-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

@eiresendez eiresendez left a comment

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.

The implementation aligns with FOUR-33514. I found no correctness or backward-compatibility defect in the changed code 👍 👍

@vladyrichter

Copy link
Copy Markdown

QA server K8S was successfully deployed https://tenant-1.ci-bcfc040339.engk8s.processmaker.net

@nolanpro
nolanpro merged commit 44eced9 into develop Sep 28, 2026
11 of 17 checks passed
@nolanpro
nolanpro deleted the bugfix/FOUR-33514 branch September 28, 2026 21:41
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.

4 participants