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 conformToCatmandu

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 TobiasNx added the bug Something isn't working label Feb 11, 2022
@TobiasNx TobiasNx added the needsIntegrationTest Integration test(s) should be provided. label Feb 28, 2022
@TobiasNx TobiasNx removed the needsIntegrationTest Integration test(s) should be provided. label Feb 28, 2022
@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.

@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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working conformToCatmandu
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants