Empty bioghist element added to EAD output when creator without with dates of existence (but no bioghist) is linked to description
|Assignee:||Dan Gillean||% Done:|
|Target version:||Release 2.3.0|
|Google Code Legacy ID:||Tested version:||2.2, 2.3|
- Create a new description
- Add a new creator (do not add any details to the actor record)
- Export - no empty bioghist
- Edit the actor - add an entity type - export description - no empty bioghist
- Edit the actor - add dates of existence - export description
- An empty bioghist element is included in the EAD export. This causes validation errors.
<origination encodinganalog="3.2.1"> <persname>New Guy</persname> </origination> </did> <bioghist id="md5-237bc69910db28db793a3ecdefb64018" encodinganalog="3.2.2"> </bioghist>
<origination encodinganalog="3.2.1"> <corpname>Other New Guy</corpname> </origination> </did> <bioghist id="md5-5fdf54e2045625506a3fc2ce324a8f21" encodinganalog="3.2.2"> </bioghist>
When no history is included on a linked actor, no bioghist element is included in the EAD export, regardless of the presence of dates of existence or other elements. Bioghist should only appear in the EAD output when it is populated with data.
#1 Updated by Mike Gale about 6 years ago
- Status changed from New to Code Review
- Assignee changed from Mike Gale to José Raddaoui Marín
There was some code in the if statement from a previous version of AtoM where we grouped dates with bioghist. We no longer do that, so it's safe to just remove I think.
#4 Updated by Dan Gillean about 6 years ago
- Status changed from QA/Review to Verified
- Target version set to Release 2.3.0
Going to consider this verified. However, notes to remember:
If you add 1 creator with no bioghist, and then a second creator WITH a bioghist, and then export them and re-import, it's possible that the bioghist will be added to the wrong creator on roundtrip. This is because any matching is done based on order. So, if there is 1 bioghist but 2 creators, and the creator with no bioghist is the first one exported, then when roundtripped, AtoM will assume that the 1 bioghist goes with creator number 1.
We have struggled with finding an ideal solution for this for a long time. There is an ID attribute in both bioghist and origination, but because IDs must be unique, we cannot use the same id on each. We could do something like add the same uuid to each as and id, but append "-creator" and "-history" to the various ideas to differentiate them, and ignore this part of the id when matching.... or we could try using the @label attribute or something... but in any case: if we want to continue pursuing this, it should be done on a different ticket.
Thanks for this, Mike!