Repository navigation
fix(executor): say when an unstated DateTime keeps its stored not localized (mendixlabs/mxcli#1521) - #1428
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 statelocalizedkeeps its storednot localized. This is deliberate (#743, #1373) and documented, but it was silent: exec reported "already in sync" when the author expected a change.Fix
carryStoredLocalizeDatenow reports whether it kept a storedfalse.keptNotLocalizedfinds 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.noteKeptNotLocalizedprints 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.`localizedis 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.mdlprints the note twice, and a statedlocalizedflips 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 lintandmake check-findingspass.Not done
create or modify external entitypath shares the carry but gets no note.🤖 Generated with Claude Code
https://claude.ai/code/session_01W3x8Fyvir8kLyPgJs1BDmF
Generated by Claude Code