Bug #11052

MODS import missing actor/info object relationship

Added by Tim Hutchinson about 5 years ago. Updated almost 5 years ago.

Status:FeedbackStart date:04/11/2017
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:XML import / export
Target version:-
Google Code Legacy ID: Tested version:2.3
Sponsored:No Requires documentation:

Description

Testing in 2.3 since MODS import doesn't seem to be working in 2.4.

Authority records and dates are imported, but not linked to the archival description. It looks like a record is created in the Event and Event_i18n tables, but object_id and actor_id are not populated.

This appears to be a regression; I'm sure it was working following our sponsored work on MODS import/export.

isad-mods-crosswalk;mods.xml Magnifier (3.67 KB) Dan Gillean, 04/17/2017 11:17 AM

mods-creator.png (293 KB) Dan Gillean, 04/17/2017 11:23 AM

mods-creator-creation.png (14.8 KB) Dan Gillean, 08/24/2017 12:46 PM


Related issues

Related to Access to Memory (AtoM) - Bug #11051: MODS import not working in 2.4 Verified 04/11/2017

History

#1 Updated by Dan Gillean about 5 years ago

  • Related to Bug #11051: MODS import not working in 2.4 added

#2 Updated by Dan Gillean about 5 years ago

  • Category set to XML import / export

Tested and reproduced in my local 2.3 Vagrant environment. See also #11051

#3 Updated by Mike Cantelon about 5 years ago

Should be fixed in PR specified in #11051. I'll update when it's reviewed and merged.

#4 Updated by Tim Hutchinson about 5 years ago

Thanks for the speedy fix :)

#5 Updated by Mike Cantelon about 5 years ago

  • Status changed from New to QA/Review
  • Assignee set to Dan Gillean

My pleasure, Tim! :D

Merged into qa/2.4.x .

#6 Updated by Tim Hutchinson about 5 years ago

Working for me.

#7 Updated by Dan Gillean about 5 years ago

Hmmm,

This kind of worked for me.

The creator name appears in the name access point as the Creator, and on the related authority record, the link to the description is present in the left hand sidebar, indicating that the relationship is in place.

However, on the actual imported description, the creator field itself is still empty, prompting the view page to give me a "this description requires at least one creator" message.

Tim, you didn't see this?

Tried reindexing, but it didn't fix anything. Attaching a screenshot - the scrolling screenshot got a bit warped, but you can still see what I mean.

Will try from the beginning, with a different record, just to be sure.

#8 Updated by Tim Hutchinson about 5 years ago

I'll test a bit more. I got that warning at least once, but I thought it was because I was testing with item-level records that had different roles than creator attached to the name records.

#9 Updated by Dan Gillean about 5 years ago

Repeated with a different fonds - export in MODS XML, reimport as new record. Same whether via CLI or UI.

#10 Updated by Tim Hutchinson about 5 years ago

Hi Dan,

It looks like the import routine is looking for <roleTerm>Creation</roleTerm> to set the creator access point. It is exported as <roleTerm>Creator</roleTerm>. The export is correct, since MODS uses the MARC relator term authority list for roles:
https://www.loc.gov/standards/mods/userguide/name.html#roleterm
https://www.loc.gov/marc/relators/relaterm.html

#11 Updated by Dan Gillean about 5 years ago

Mike, is it possible to update the import code to match what is exported (see above), without messing up any of the other import code? e.g. just for MODS? Or so that "Creation" and/or "Creator" are looked for, covering both expectations?

#12 Updated by Mike Cantelon about 5 years ago

Thanks, I'll take a look. Sounds like I should be able to.

#13 Updated by Mike Cantelon almost 5 years ago

  • Status changed from Feedback to Code Review
  • Assignee changed from Mike Cantelon to Nick Wilkinson

#14 Updated by Nick Wilkinson almost 5 years ago

  • Assignee changed from Nick Wilkinson to Steve Breker

HI Steve, assigning to you for CR.

#15 Updated by Steve Breker almost 5 years ago

  • Status changed from Code Review to Feedback
  • Assignee changed from Steve Breker to Mike Cantelon

Code review complete - looks good.

#16 Updated by Mike Cantelon almost 5 years ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from Mike Cantelon to Nick Wilkinson

Merged into qa/2.4.x.

#17 Updated by Nick Wilkinson almost 5 years ago

  • Assignee deleted (Nick Wilkinson)

#18 Updated by Dan Gillean almost 5 years ago

Hmmm....

Better than it was, but still MODS roundtripping will need further work in the future, I think. CLI output when trying to import a MODS XML file that was created in AtoM:

[info] [2017-08-24 09:28:15] Job 2004151 "arFileImportJob": Job started.
[info] [2017-08-24 09:28:15] Job 2004151 "arFileImportJob": Importing XML file: mods-crosswalk.xml.
[info] [2017-08-24 09:28:15] Job 2004151 "arFileImportJob": Indexing imported records.
[info] [2017-08-24 09:28:15] Job 2004151 "arFileImportJob": Update type: import-as-new
[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 522 on line 0 in input file: no DTD found!

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1840 on line 13 in input file: Element '{http://www.loc.gov/mods/v3}name', attribute 'type': [facet 'enumeration'] The value 'Corporate body' is not an element of the set {'personal', 'corporate', 'conference', 'family'}.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1824 on line 13 in input file: Element '{http://www.loc.gov/mods/v3}name', attribute 'type': 'Corporate body' is not a valid value of the local atomic type.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1840 on line 17 in input file: Element '{http://www.loc.gov/mods/v3}name', attribute 'type': [facet 'enumeration'] The value 'Person' is not an element of the set {'personal', 'corporate', 'conference', 'family'}.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1824 on line 17 in input file: Element '{http://www.loc.gov/mods/v3}name', attribute 'type': 'Person' is not a valid value of the local atomic type.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1843 on line 43 in input file: Element '{http://www.loc.gov/mods/v3}language': Character content other than whitespace is not allowed because the content type is 'element-only'.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1871 on line 43 in input file: Element '{http://www.loc.gov/mods/v3}language': Missing child element(s). Expected is ( {http://www.loc.gov/mods/v3}languageTerm ).

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1843 on line 44 in input file: Element '{http://www.loc.gov/mods/v3}language': Character content other than whitespace is not allowed because the content type is 'element-only'.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1871 on line 44 in input file: Element '{http://www.loc.gov/mods/v3}language': Missing child element(s). Expected is ( {http://www.loc.gov/mods/v3}languageTerm ).

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1843 on line 86 in input file: Element '{http://www.loc.gov/mods/v3}name': Character content other than whitespace is not allowed because the content type is 'element-only'.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1843 on line 89 in input file: Element '{http://www.loc.gov/mods/v3}name': Character content other than whitespace is not allowed because the content type is 'element-only'.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": XSD validation failed
[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 522 on line 0 in input file: no DTD found!

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1840 on line 13 in input file: Element '{http://www.loc.gov/mods/v3}name', attribute 'type': [facet 'enumeration'] The value 'Corporate body' is not an element of the set {'personal', 'corporate', 'conference', 'family'}.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1824 on line 13 in input file: Element '{http://www.loc.gov/mods/v3}name', attribute 'type': 'Corporate body' is not a valid value of the local atomic type.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1840 on line 17 in input file: Element '{http://www.loc.gov/mods/v3}name', attribute 'type': [facet 'enumeration'] The value 'Person' is not an element of the set {'personal', 'corporate', 'conference', 'family'}.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1824 on line 17 in input file: Element '{http://www.loc.gov/mods/v3}name', attribute 'type': 'Person' is not a valid value of the local atomic type.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1843 on line 43 in input file: Element '{http://www.loc.gov/mods/v3}language': Character content other than whitespace is not allowed because the content type is 'element-only'.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1871 on line 43 in input file: Element '{http://www.loc.gov/mods/v3}language': Missing child element(s). Expected is ( {http://www.loc.gov/mods/v3}languageTerm ).

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1843 on line 44 in input file: Element '{http://www.loc.gov/mods/v3}language': Character content other than whitespace is not allowed because the content type is 'element-only'.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1871 on line 44 in input file: Element '{http://www.loc.gov/mods/v3}language': Missing child element(s). Expected is ( {http://www.loc.gov/mods/v3}languageTerm ).

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1843 on line 86 in input file: Element '{http://www.loc.gov/mods/v3}name': Character content other than whitespace is not allowed because the content type is 'element-only'.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1843 on line 89 in input file: Element '{http://www.loc.gov/mods/v3}name': Character content other than whitespace is not allowed because the content type is 'element-only'.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1840 on line 13 in input file: Element '{http://www.loc.gov/mods/v3}name', attribute 'type': [facet 'enumeration'] The value 'Corporate body' is not an element of the set {'personal', 'corporate', 'conference', 'family'}.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1824 on line 13 in input file: Element '{http://www.loc.gov/mods/v3}name', attribute 'type': 'Corporate body' is not a valid value of the local atomic type.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1843 on line 44 in input file: Element '{http://www.loc.gov/mods/v3}language': Character content other than whitespace is not allowed because the content type is 'element-only'.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1871 on line 44 in input file: Element '{http://www.loc.gov/mods/v3}language': Missing child element(s). Expected is ( {http://www.loc.gov/mods/v3}languageTerm ).

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1843 on line 45 in input file: Element '{http://www.loc.gov/mods/v3}language': Character content other than whitespace is not allowed because the content type is 'element-only'.

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": libxml error 1871 on line 45 in input file: Element '{http://www.loc.gov/mods/v3}language': Missing child element(s). Expected is ( {http://www.loc.gov/mods/v3}languageTerm ).

[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": Import complete.
[info] [2017-08-24 09:28:16] Job 2004151 "arFileImportJob": Job finished.

Return to jobs management page

So... there appear to be a number of issues beyond the scope of this ticket requiring review. In terms of this ticket, on import I still end up with the creator and accumulator being separated from the event - which means flipping to the ISAD template still gives me a "missing creator" warning. This is likely due to 2 event rows being created - one for the actor name (without any dates), and one for the dates (without the actor) - see: mods-creator-creation.png

It appears that on roundtrip, "Creator" (as MODS seems to require) is not being equated with "Creation" - so a new event term is being created, which AtoM doesn't understand as a creation event.

What we need instead is for AtoM to be able to equate the MODS "creator" with a creation event, and use the correct term - save for the other event types. There are a lot of other relevant mapping errors in the console output, where the terminology that MODS requires vs how it is used in ISAAR-CPF and AtoM vary, and we have no internal crosswalking established.

I'm not sure what we should do about this for the 2.4 release, but I don't think we're going to be able to fix this at present - it's beginning to look like a lot more work would be needed. Let's discuss internally. In the meantime, at least this is importing - no need to roll back recent fixes.

#19 Updated by Dan Gillean almost 5 years ago

  • Target version deleted (Release 2.4.0)

Also available in: Atom PDF