Skip to content

PATCH API calls to modify datasets ignores published state #4337

Open
@paul-m

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions