Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3262

In use metadata fields can be deleted from the metadata registry, resulting in data loss



    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.0
    • Component/s: DSpace API
    • Labels:
    • Attachments:
    • Comments:
    • Documentation Status:
      Not Required


      If you try to delete a metadata field that is currently used in your DSpace, you'll receive a confirmation / warning message that says:

      Are you absolutely sure you want to delete these fields? If any items contain metadata for these fields, the field(s) cannot be deleted. You must ensure that no items use these fields.

      WARNING: This will cause an error if any item contains metadata for these fields.

      However, if you continue the deletion, the field will be entirely removed (along with any values associated with that field) even if it is in use.

      On the latest master codebase, I was able to do the following:
      1. Login as an Admin
      2. Visit the 'dc' schema in the registry
      3. Select 'dc.title' and attempt to delete it
      4. Ignore the warning and click delete.

      After performing these steps, the 'dc.title' field is completely removed from my database, along with all metadata values associated with it (i.e. nothing has a title anymore). If I manually restore 'dc.title' (via a SQL INSERT), then everything in my DSpace ends up "Untitled"...as all the previous titles were removed during the deletion.

      This is a serious bug as it results in data loss. As implied by the warning message, we should NOT allow for deletion of any fields that are currently in-use by the system.


          Issue Links



              • Assignee:
                tdonohue Tim Donohue
                tdonohue Tim Donohue
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: