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

CanMove rule allows an item to move onto itself

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.2
    • 6.2
    • framework
    • None
    • Declarative REST 15, 6.2 Ramp-up 16
    • 3

      The CanMoveRule under some circumstances allows moving an item onto itself. Also it might not allow a move operation that should be allowed.

      Steps to reproduce

      • Open Personas NEW app
      • Click on Sara Byrne
      • Click Move persona
      • Observe how in the chooser Sara Byrne is available, while she should not be. I.e. the buttons at the bottom of the dialog should be grayed.
      • Cancel the chooser dialog
      • Reload the page (or directly point the browser to http://localhost:8080/magnolia_dx_core_demo_webapp_war_exploded/.magnolia/admincentral#app:personas-app:browser;/Sara-Byrne: )
      • Click on Jayden Harris
      • Observe how in the chooser Sara Byrne is not available, while all other personas are available. Expected behaviour is all but Jayden Harris available. (Note: the fact that personas can be moved into personas is a different issue. See MGNLPN-173)

      Additional observation

      After opening any persona for editing and switching back to the browser tab the CanMove rule behaves correctly.

      Analysis so far

      The LocationController injected into the CanMove rule initially tracks a DefaultLocation instance. This instance does not reflect the selected item in the browser. Switching to a different tab injects the ContentBrowserSubApp.BrowserLocation from the SubAppContext, which from there on correctly reflects the selected item.

      Things tried

      I tried using LocationContext to track the current location including the selected item in the CanMove rule, however the injected instance differs from that in Browser. At this point I'm not sure whether this is the intended behaviour.

      Workaround

      Open a detail tab for any item and switch back to the browser tab. At this point the CanMove rule behaves correctly.

       

        Acceptance criteria

              rkovarik Roman Kovařík
              mduerig Michael Duerig
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 5.15h
                    5.15h