Skip to content

fix(executor): say when an unstated DateTime keeps its stored not localized (mendixlabs/mxcli#1521) - #1428

Merged
ako merged 1 commit into
mainfrom
fix/1521-datetime-localized-carry-notice
Oct 16, 2026
Merged

ako merged 1 commit into
mainfrom
fix/1521-datetime-localized-carry-notice

Conversation

@ako

@ako ako commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Addresses mendixlabs#1521 (#1403). The maintainer decided to keep the carry and add a notice.

Behaviour

On a rewrite (create or modify, alter … modify attribute), a DateTime that does not state localized keeps its stored not localized. This is deliberate (#743, #1373) and documented, but it was silent: exec reported "already in sync" when the author expected a change.

Fix

  • carryStoredLocalizeDate now reports whether it kept a stored false.
  • keptNotLocalized finds those attributes in the written result. A new attribute defaults to localized, so an unstated DateTime written as not localized can only have come from the carry.
  • noteKeptNotLocalized prints one line per attribute, on both paths, for example:
    Note: F1521.Item.Due keeps its stored \not localized` (the statement does not say); write `Due: DateTime localized` to change it.`
  • There is no note when localized is stated, or when the stored value is already localized.

Tests

TestLocalizeCarry_NotesKeptNotLocalized, 6 cases including both silent controls. With the note stubbed out, the positive cases fail.

Real run on an 11.15 fixture copy: mdl-examples/bug-tests/1521-datetime-localized-carry-notice.mdl prints the note twice, and a stated localized flips the attribute. The written BSON is unchanged by this PR.

Also updated: the mdl-entities skill, docs-site/src/language/constraints.md, and a finding file. make build, make test, make lint and make check-findings pass.

Not done

  • Wording: the note uses the repo's existing "Note:" style rather than an "INFO:" prefix.
  • Not covered: the OData create or modify external entity path shares the carry but gets no note.

🤖 Generated with Claude Code

https://claude.ai/code/session_01W3x8Fyvir8kLyPgJs1BDmF


Generated by Claude Code

…alized (mendixlabs#1521)

create or modify entity and alter entity ... modify attribute keep a
stored DateTime LocalizeDate when the statement does not state
localized / not localized (#743, #1373). That rule stays, but it was
invisible: a script that meant Studio Pro's default left a not
localized DateTime in UTC with no output saying so.

carryStoredLocalizeDate now reports whether it kept a stored false. The
create-or-modify path derives the kept attributes from the written
result (an unstated DateTime written not localized can only be the
carry), and both paths print one Note line per attribute naming it and
the `DateTime localized` spelling that changes it. Nothing is printed
when the clause is stated or the stored value is localized.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W3x8Fyvir8kLyPgJs1BDmF
@ako
ako merged commit 5c81f36 into main Oct 16, 2026
31 checks passed
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