Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-3715

Only values for selected options should be saved when using SwitchableFieldDefinition

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.4.3
    • Fix Version/s: 5.4.6
    • Component/s: forms
    • Labels:
    • Release notes required:
      Yes
    • Documentation update required:
      Yes
    • Sprint:
      Saigon 35
    • Story Points:
      8
    • Magnolia Release:
      5.4.6

      Description

      When we change this, care should be taken that values in all options remain available while the user mainly switches between them. The values for all other options but the selected one should only be cleared once you save the form. Not all systems behave this way, but most do - it's commonly seen as good and expected behavior.

      So, I fill in a value for option 1, switch to option 2, fill in another value there, then switch back to option 1. My initial value I've set in option 1 should still be there. Once I save the form, only the value for option 1 is stored. The value for option 2 is discarded.

      Update: This ticket just support for basic Switchable field using SwitchableTransformer, not providing any delegating transformer for the switchable field for now.
      I did provide approach to handle more complex sub-fields than SwitchableTransformer, just find the attached ComplexFieldFriendlySwitchableTransformer or get it from here. It help to alters JCR adapters directly

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                oanh.thai Oanh Thai Hoang
                Reporter:
                rgange Richard Gange
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                  Time Tracking

                  Estimated:
                  Original Estimate - 5d Original Estimate - 5d
                  5d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 7d 2.75h
                  7d 2.75h