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

retain does not work, if you only want to keep certain subfields #145

Closed
TobiasNx opened this issue Feb 11, 2022 · 4 comments · Fixed by #329
Closed

retain does not work, if you only want to keep certain subfields #145

TobiasNx opened this issue Feb 11, 2022 · 4 comments · Fixed by #329
Assignees
Labels
Bug Something isn't working Conform To Catmandu

Comments

@TobiasNx
Copy link
Collaborator

Retain works with root level parent fields but not with an subfield:
https://github.com/TobiasNx/fix-FunctionalReview-Testing/blob/c9d9447983fc435d01b35ac57046dc1dd3ddbb11/data/testing/retainOnlySubfield

copy_field("node.properties.ccm:educationallearningresourcetype[]", "lrt[]")
retain("node.properties.ccm:educationallearningresourcetype[]", "lrt[]")

is:

{
  "lrt" : [ "https://w3id.org/kim/hcrt/image" ]
}

expected:


{
  "lrt" : [ "https://w3id.org/kim/hcrt/image" ],
  "node": {
    "properties": {
        "ccm:educationallearningresourcetype": [
            "https://w3id.org/kim/hcrt/image"
        ]
    }
}
}
@TobiasNx
Copy link
Collaborator Author

TobiasNx commented Sep 5, 2023

retain would be a clever element to learn fix-path since you would only keep certain elements.

would be a nice feature though.

@dr0i dr0i moved this from Backlog to Ready in Metafacture Oct 30, 2023
@blackwinter
Copy link
Member

Integration test:

@blackwinter
Copy link
Member

@TobiasNx: Implemented in #329. Please test.

@TobiasNx
Copy link
Collaborator Author

TobiasNx commented Nov 8, 2023

#329 (comment)

@TobiasNx TobiasNx assigned blackwinter and unassigned TobiasNx Nov 8, 2023
@github-project-automation github-project-automation bot moved this from Review to Done in Metafacture Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Conform To Catmandu
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants