Scott Aslan created NIFI-16206:
----------------------------------
Summary: Connector Configuration wizard: BOOLEAN toggles
misdisplay and fail to update dependents
Key: NIFI-16206
URL: https://issues.apache.org/jira/browse/NIFI-16206
Project: Apache NiFi
Issue Type: Improvement
Reporter: Scott Aslan
Assignee: Scott Aslan
h3. Problem
BOOLEAN-typed properties in the Connector Configuration wizard do not behave
correctly when rendered as slide toggles.
Observed symptoms:
# Dependent properties do not update live when a BOOLEAN toggle is changed
(visibility / enabled state driven by {{dependsOn}} metadata stays stale or
wrong).
# Toggle display is incorrect after load, step navigation, or re-open —
notably a stored / default value of {{"false"}} can render as checked.
# Behavior is general to the wizard’s BOOLEAN handling, not specific to any
one connector.
h3. Root cause
BOOLEAN values cross the wire as strings ({{{}"true"{}}} / {{{}"false"{}}}) via
{{ConnectorValueReference}} / property defaults. The form and
{{MatSlideToggle}} expect real booleans ({{{}!!"false"{}}} is truthy).
Dependency checks use {{Array.prototype.includes}} against {{dependentValues:
string[]}} (e.g. {{{}["true"]{}}}) with strict equality, so a live form value
of boolean {{true}} does not match {{{}"true"{}}}.
h3. Proposed fix
* Coerce BOOLEAN wire values to real booleans at form init, CVA
{{{}writeValue{}}}, and {{{}fromValueReference{}}}.
* Compare dependency values with string coercion so boolean form state matches
API {{{}dependentValues{}}}.
* Keep save-delta comparison symmetric with the normalized form shape.
h3. Acceptance criteria
* Toggling a BOOLEAN property immediately shows/hides or enables/disables
dependent fields per property dependency metadata.
* Toggle on/off display matches the current form value after change, step
navigation, and re-open (including default / saved {{{}"false"{}}}).
* Verified with at least two connectors that use BOOLEAN properties with
dependencies.
h3. Components
* nifi-frontend (shared connector wizard / property input)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)