Skip to content

Feature/bulk create#1507

Merged
kwahlin merged 3 commits intodevelopfrom
feature/bulk-create
Nov 4, 2024
Merged

Feature/bulk create#1507
kwahlin merged 3 commits intodevelopfrom
feature/bulk-create

Conversation

@kwahlin
Copy link
Copy Markdown
Contributor

@kwahlin kwahlin commented Oct 30, 2024

I think this is all that's needed (in backend) to create records from a target form. The target form itself should suffice as preview for now.

The script expects exactly one id list attached in the target form and it must not be attached to the thing or record. This could maybe be restricted already in the interface. One record per unique and valid id in the list will be created.

For example

{
    "bulk:formBlankNodeId": "#1"
    "@type": "Item",
    "heldBy": {"@id": "https://libris.kb.se/library/SEK"},
    "hasComponent": [
        {
            "bulk:formBlankNodeId": "#2"
            "@type": "Item",
            "heldBy": {"@id": "https://libris.kb.se/library/SEK"}
        }
    ],
    "itemOf": { 
        "bulk:formBlankNodeId": "#3",
        "bulk:hasId": [
            {
                "bulk:formBlankNodeId": "#4"
                "@type": "bulk:AnyOf",
                "value": [
                    "gzrmdkks2zw7zs6",
                    "j1thr9kv2jbjk34",
                    "r93gg3c32rgcg2f"
                ]
            }
        ]
    }
}

would create three holding records with different links in itemOf.

@kwahlin kwahlin requested review from lrosenstrom and olovy October 30, 2024 17:00
Copy link
Copy Markdown
Contributor

@lrosenstrom lrosenstrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kwahlin kwahlin merged commit 56ebad2 into develop Nov 4, 2024
@kwahlin kwahlin deleted the feature/bulk-create branch November 4, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants