-
Bug
-
Resolution: Fixed
-
Neutral
-
6.2
-
None
-
-
Empty show more show less
-
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.