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

PATCH API calls to modify datasets ignores published state #4337

Open
paul-m opened this issue Nov 8, 2024 · 0 comments
Open

PATCH API calls to modify datasets ignores published state #4337

paul-m opened this issue Nov 8, 2024 · 0 comments
Labels

Comments

@paul-m
Copy link
Contributor

paul-m commented Nov 8, 2024

Ref: 21731

Current Behavior

Sending a PATCH to a dataset, even if it doesn't trigger a reimport, will cause the data node to ignore the workflow state, and become published.

In specific, patching a 'Published (hidden)' dataset causes it to become 'Published.'

This is bad because changing the publish state back to hidden triggers a datastore reimport.

Expected Behavior

PATCH API calls should not modify existing published status.

Steps To Reproduce

In a dev environment, create a dataset.
Set the dataset to be published (hidden).
PATCH the dataset through the API.
Note that the workflow status is Published, and not hidden.

Relevant log output (optional)

No response

Anything else?

This happens here: https://github.com/GetDKAN/dkan/blob/2.x/modules/metastore/src/Storage/Data.php#L360

@paul-m paul-m added the bug label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant