Bug #10505

Deleting a creator from an imported record also removes the date

Added by Dan Gillean almost 3 years ago. Updated 12 months ago.

Status:VerifiedStart date:11/01/2016
Priority:MediumDue date:
Assignee:Nick Wilkinson% Done:

0%

Category:Information object
Target version:Release 2.5.0
Google Code Legacy ID: Tested version:2.3
Sponsored:No Requires documentation:

Description

First reported in the User Forum: https://groups.google.com/d/msg/ica-atom-users/XWyADd9kXsE/SKQW3H3hAQAJ

This was tested and reproduced in the ISAD template. Its impact on other templates should be considered as well.

  • Import a CSV. It should only a single row for the creator and date - not piped w NULL as happens on export. I've attached a sample.
  • Navigate to the imported record
  • Enter edit mode
  • Delete the link to the creator. Note that the dates are in a different Information area, and technically should not be affected by this.
  • Save and view the record

Resulting error
When records are imported this way, removing the creator deletes the entire database row, thereby also deleting the date.

Expected result
Dates should not be deleted if just the creator is removed in the ISAD template.

Comments from the reporter

Scenario 1: An archival description has a Creator and Creation Date assigned during a CSV import (both elements being set in the same record)

When I edit an archival description, delete the Creator from the Context area, and then save the record, AtoM also deletes the Creation Date from the Identity area of the record.

Scenario 2: An archival description has a Creator and Creation Date assigned via the web interface

When I edit the description, delete the Creator, and then save the record, AtoM leaves the Creation Date on the record.

I would think that in both cases AtoM should leave the Creation Date on the record. Looking at the database, it seems that Scenario 2 creates two separate rows in the event table, while Scenario 1 creates a single row. Deleting a Creator seems to delete the row in which the Creator Actor appears, but perhaps it should just set the actor_id to NULL and keep the row?

Just to clarify here, I mean to say that since deleting a Creator seems to delete the row in which the Creator Actor appears, in Scenario 1 the actor_id should be set to NULL without deleting the row, while in Scenario 2 it makes sense to delete the row, since the Creation Date is stored in a separate row.

Notes

I'm filing this ticket so we can consider the request, because the current behavior is counter-intuitive. Given how we've had to make things work for both ISAD and RAD via a compromise, I wonder how the UI will know the difference of situation? It's worth considering however - this is buggy behavior.

Note that the workaround would be to import using | pipe separators and NULL values to separate the creator from the date in the database.

creator-to-delete.csv Magnifier (2.82 KB) Dan Gillean, 11/01/2016 02:48 PM

History

#1 Updated by Mike Cantelon about 1 year ago

  • Status changed from New to Code Review
  • Assignee set to Nick Wilkinson

I fixed a related issue as well (deleting the dates would, similarly, remove the creator).

PR for CR: https://github.com/artefactual/atom/pull/760

#2 Updated by Nick Wilkinson about 1 year ago

  • Assignee changed from Nick Wilkinson to José Raddaoui Marín

Hi Radda, passing along to you for CR.

#3 Updated by José Raddaoui Marín about 1 year ago

  • Status changed from Code Review to Feedback
  • Assignee changed from José Raddaoui Marín to Mike Cantelon

#4 Updated by Mike Cantelon about 1 year ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from Mike Cantelon to Dan Gillean

#5 Updated by Mike Cantelon about 1 year ago

  • Target version set to Release 2.5.0

#6 Updated by Mike Cantelon about 1 year ago

  • Status changed from QA/Review to Feedback
  • Assignee changed from Dan Gillean to Mike Cantelon

#7 Updated by Mike Cantelon about 1 year ago

  • Status changed from Feedback to Code Review
  • Assignee changed from Mike Cantelon to José Raddaoui Marín

Hi Radda. I made the changes you recommended. Let me know if it seems right to you!

#8 Updated by José Raddaoui Marín about 1 year ago

  • Status changed from Code Review to Feedback
  • Assignee changed from José Raddaoui Marín to Mike Cantelon

#9 Updated by Mike Cantelon about 1 year ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from Mike Cantelon to Dan Gillean

Merged into qa/2.5.x for QA.

#10 Updated by Michelle Curran 12 months ago

  • Status changed from QA/Review to Verified
  • Assignee changed from Dan Gillean to Nick Wilkinson

Verified in local qa/2.5.x environment.

Also available in: Atom PDF