Repository navigation
fix: ALTER SET writes a pluggable Boolean as "true"/"false", not "yes"/"no" - #1460
Merged
Merged
Conversation
…"/"no" `alter page … set (showFooter: true, clearable: false) on cbColor` stored PrimitiveValue "yes" / "no" (mendixlabs#1454). Studio Pro and the widget template store a Boolean as "true" / "false", and the client reads anything but "true" as false, so a bare `true` passed mx check and turned the property off. setPluggableWidgetPropertyMut now spells a bool from the property's declared kind: Boolean -> "true"/"false"; an Enumeration that declares yes/no keys keeps taking a boolean as those keys; any other enumeration refuses a boolean and names its keys. Control: with the fix stashed, TestSetPluggableBooleanWritesTrueFalse_1454 fails with `PrimitiveValue = "yes", want "true"`. On a blank 11.13.0 app the unfixed and fixed builds differ in exactly the two reported values, and both report 0 errors from mx check, which is why only the stored bytes show the defect. Refs #1327 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019httGxDh8UXt1Zoyh3Gh52
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.
Fixes #1327 (mirror of mendixlabs#1454).
Symptom (as reported)
Cause
setPluggableWidgetPropertyMutspelled every Goboolasyes/no, whatever the property's declaredValueType.Type. CREATE's own pluggable path (widget_engine.go) writes%t, so the two write paths disagreed.Fix
The spelling now comes from the property's declared kind, the same way
columnValueFieldalready picks the value field:Boolean→"true"/"false"Enumerationthat declaresyes/nokeys keeps taking a boolean as those keys (the reporter's scan found 2.1k such values)TestSetWidgetProperty_PluggableWidgethad pinned"no"on a fixture with no kind. It now asserts"false", with a comment.Evidence
TestSetPluggableBooleanWritesTrueFalse_1454fails withPrimitiveValue = "yes", want "true".set (showFooter: true, clearable: false) on cbColor): the unfixed and fixed builds differ in exactly the two reported values ("no"→"false","yes"→"true"). Both reportThe app contains: 0 errors., which is why only the stored bytes show the defect.mdl-examples/bug-tests/1454-alter-set-pluggable-boolean-true-false.mdl. Finding recorded.make build && make test && make lint,make check-mdlandmake check-findingsall pass.Side note, not fixed here:
describeprints neithershowFooternorclearablefor a combobox on either build, so the bug-test checks the result withbson dump.Generated by Claude Code