Skip to content

Workaround for failing entity tree children#15887

Merged
Zeegaan merged 4 commits intov14/devfrom
v14/fix/paginate-folder-tree-children
Mar 15, 2024
Merged

Workaround for failing entity tree children#15887
Zeegaan merged 4 commits intov14/devfrom
v14/fix/paginate-folder-tree-children

Conversation

@kjac
Copy link
Copy Markdown
Contributor

@kjac kjac commented Mar 14, 2024

Prerequisites

  • I have added steps to test this contribution in the description below

Description

The refactor in #15856 has had the side effect of breaking entity trees that can hold multiple entity types. More to the point, the trees currently affected are the ones that have containers (folders) - like the document type and data type trees.

This PR introduces what can best be described as a workaround. Fortunately we already have a follow-up task planned that will make it possible to paginate multiple entity types in entity trees (among other reasons to ensure correct pagination for these "folder trees").

Testing this PR

  1. It should be possible to see direct children of folders in entity trees:
    image

  2. Slightly more complex child structures should also work. Specifically for document types, these can be created beneath one another (inheritance), while the topmost ones still can reside in a folder:
    image

  3. It should be possible view documents that are moved to the recycle bin:
    image

Apparently, the backoffice UI currently does not support creating inherited document types, so this will have to be done using Swagger. The following payload should do the trick:

{
    "alias": "testInherited",
    "name": "Test inherited",
    "description": null,
    "icon": "icon-document",
    "allowedAsRoot": false,
    "variesByCulture": false,
    "variesBySegment": false,
    "collection": null,
    "isElement": false,
    "properties": [],
    "containers": [],
    "id": "0e791fda-5f94-4b4f-9245-7d3c80ea0c6d",
    "parent": null,
    "allowedTemplates": [],
    "defaultTemplate": null,
    "cleanup": {
        "preventCleanup": false,
        "keepAllVersionsNewerThanDays": null,
        "keepLatestVersionPerDayForDays": null
    },
    "allowedDocumentTypes": [],
    "compositions": [{
            "documentType": {
                "id": "[ID OF PARENT DOCUMENT TYPE]"
            },
            "compositionType": "Inheritance"
        }
    ]
}

Same goes for moving documents to the recycle bin - this is not yet a feature in the backoffice UI, so that has to be done using Swagger as well.

@Zeegaan
Copy link
Copy Markdown
Member

Zeegaan commented Mar 15, 2024

Looks good, tests good 🚀

@Zeegaan Zeegaan merged commit 469a54c into v14/dev Mar 15, 2024
@Zeegaan Zeegaan deleted the v14/fix/paginate-folder-tree-children branch March 15, 2024 10:21
@Zeegaan Zeegaan added the project/bellissima AKA "the new backoffice" label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants