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

JcrHasChildrenRule includes not persisted items


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.2.42
    • 6.2.41
    • None
    • None
    • Yes
    • Yes

      Steps to reproduce

      1.  Go to a content app definition file (it happens for all, but I will reproduce the steps for Categories app)
      2.  Edit the categories-app.yaml file
      3. At the AddCategory" action, include under the _notDeleted rule the following:
          $type: jcrHasChildrenRule
            - mgnl:category
          negate: true
      1. Now set the displayName as required field (this is for allowing the Cancel action)
      2. Go to Categories App, select a Category which has no Childs and check the _Add category" action is enabled
      3. Click on it and try to save the dialog (check the required field is highlighted)
      4. Close the detail subApp and check that the Add category action is disabled
      5. If you click on another category and back to the one you tried to create the nested category, you will se the action is enabled again

      For pages app:

      1. Go to Resources app and edit the pages-app definition file
      2. At the "Add" action, include under the NotDeleted rule the following snippet:
          $type: jcrHasChildrenRule
          negate: true
      1. Now go to pages app, select a page with no Childs (as /travel/destinations) and click on the Add page action.
      2. Full fill the first Dialog screen (Page name and template) and click on "Next"
      3. Click on "Cancel"
      4. Check the "Add page" action is disabled

      Expected results

      You do not need to refresh the browser or switch between items to get the action enabled again

      Actual results

      The action is disabled till you perform a browser refresh or switch between items


      The mentioned above

      Development notes


        Acceptance criteria

              rkovarik Roman Kovařík
              ccantalapiedra Carlos Cantalapiedra
              0 Vote for this issue
              1 Start watching this issue

                Work Started: