Skip to content

Feature request: enable users to "discard" drafts when editing #4920

@andrewjbtw

Description

@andrewjbtw

The switch to the versioned model for Cocina means that we can enable users to "discard" drafts, as is possible in the self-deposit application.

What's a draft?

In a conventional editing model, a draft corresponds to a state where a user has begun to edit an object but has not preserved those changes in the preservation system. A draft state implies the following:

  • if this is the first version of an item and it has not been accessioned yet, it can be discarded
  • if this is a new version of an item and it has not been saved to preservation yet, the changes made since the previous version can be discarded, leaving the item in the state it was in before editing began

Argo supports the first case via the "Registered" status: a registered item can be deleted at any time.

For the second case, when a user wants to edit an item, they first have to open the item. This puts it into an editable state. But nothing in the user interface allows the user to change their mind and "cancel" their editing. Even if no changes are made, the only way to take the item out of the editing state is to "close" it, which creates a new version.

This has led to issues where either items are left "Opened" indefinitely or closed with a spurious version that contains no actual changes.

It should be possible for an Argo user to open an item, decide not to save the changes they considered making, and return the item to its previous "closed" (Accessioned) state.

One possible way to implement this is to give the user to discard changes when using the "close" modal. I'm not sure how to apply a discard on a batch. The option could be added to the "close" bulk action.

Additional background

During the Fedora era and the first few years of the Cocina era, changes made while an item was "Opened" were inserted directly into Fedora/Cocina, without waiting for the user to close the item. This meant that these changes were not easily reversible: there was only one version of the Fedora/Cocina data and it changed immediately after every edit. People would have to rely on memory or check the preservation system if they wanted to return a value to its previous state after changing it.

In the current metadata model, the Argo UI still updates immediately to reflect changes made while editing, but the changes are only committed to a new version when the item is closed. This means that we should be able to discard them. What we're still missing is a UI feature for a user to actually carry out the discard.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions