Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for failing entity tree children #15887

Merged
merged 4 commits into from
Mar 15, 2024

Conversation

kjac
Copy link
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
Member

Zeegaan commented Mar 15, 2024

Looks good, tests good 🚀

@Zeegaan Zeegaan merged commit 469a54c into v14/dev Mar 15, 2024
12 of 15 checks passed
@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