Bug #7322

Information object properties are not always saved when save() is called

Added by Misty De Meo about 6 years ago. Updated almost 6 years ago.

Status:VerifiedStart date:09/29/2014
Priority:CriticalDue date:
Assignee:Dan Gillean% Done:

0%

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

Description

It's possible for an information object's properties to not all be saved when calling the object's save() function. This happens if the information object was previously saved, for instance from setActorByNAme().

This occurs when importing EAD records which contain authority records. The top level of description will be saved twice - first when the authority is added, then when the item is complete. Logging shows that the second time the information object is saved, all of its properties are present (title, etc.). However, those properties are not saved into the database.

The workflow in EAD import looks something like this:

1) Information object is created
2) Authority records are added. setActorByName() causes the information object to be saved immediately.
3) Further properties are added.
4) The record's save() method is called to save the information object to the database.

This has been observed to cause the following properties not to save:

  • Title
  • Custodial history
  • Scope and content
  • Notes
  • Extent

This issue was introduced by commit bdbd63f7c2b22dd7666b9ca53e719fdee34b573e, which causes the information object to save itself when setActorByName() is called: https://github.com/artefactual/atom/commit/bdbd63f7c2b22dd7666b9ca53e719fdee34b573e#diff-2454f613f1d7fbd4aa61c376d2438550R1314

History

#1 Updated by Misty De Meo about 6 years ago

  • Priority changed from Medium to Critical
  • Target version set to Release 2.1.1

#2 Updated by Jesús García Crespo about 6 years ago

Radda is not available atm.
I'm looking at it right now.

#3 Updated by Mike Gale about 6 years ago

Here's a sample file where the issue is confirmed to be present (a client's data so I put it in google drive): https://drive.google.com/a/artefactual.com/file/d/0B2qFrFnz76qrWGlPTkUzSkpqWjA/edit?usp=sharing

It's a pretty large XML file so if you don't want to wait for import, you can put a break here, and it'll stop the import after the first info object is imported (which will be the 'problem' one): https://github.com/artefactual/atom/blob/qa/2.2.x/lib/QubitXmlImport.class.php#L280

#4 Updated by Mike Gale about 6 years ago

  • Assignee changed from Jesús García Crespo to Mike Gale

#5 Updated by Misty De Meo about 6 years ago

  • Status changed from New to QA/Review

#6 Updated by Jesús García Crespo about 6 years ago

  • Assignee changed from Mike Gale to Dan Gillean

Dan, I'll show you how to verify this when you are back!

#8 Updated by Jesús García Crespo almost 6 years ago

  • Status changed from QA/Review to Verified

Also available in: Atom PDF