Closed gjost closed 11 months ago
Saving nr_id
to the creators
field seems to work. This
nr_id:88922/nr014m435|namepart:Domoto, Sally|role:photographer;
nr_id:88922/nr014m435|namepart:Fujii, Kenji|role:writer
gets written to entity.json
as this
{
"creators": [
{
"namepart": "Domoto, Sally",
"nr_id": "88922/nr014m435",
"role": "photographer"
},
{
"namepart": "Fujii, Kenji",
"nr_id": "88922/nr014m435",
"role": "writer"
}
]
},
But loading breaks it: the nr_id
values are screened out the next time the Entity is edited, looking like this in the field:
namepart:Domoto, Sally|role:photographer; namepart:Fujii, Kenji|role:writer
nr_id
is present after Entity
is loaded in the edit
view:
creators | [{'namepart': 'Domoto, Sally', 'nr_id': '88922/nr014m435', 'role': 'photographer'}, {'namepart': 'Fujii, Kenji', 'nr_id': '88922/nr014m435', 'role': 'writer'}]
But it gets screened out in ddr-defs:repo_models/entity.py:formprep_creators()
which calls DDR.converters.rolepeople_to_text()
Improvements to rolepeople
parsing:
namepart:Domoto, Sally|nr_id:88922/nr014m435|role:photographer;
Desired: namepart:Domoto, Sally | nr_id:88922/nr014m435 | role:photographer;
nr_id
first for alignment, readability.
nr_id:88922/nr014m435 | namepart:Domoto, Sally | role:photographer;
nr_id:88922/nr014m435 | namepart:Fujii, Kenji | role:writer~~Feedback:
Geoff:
Sara:
Merged 314-person-nrids
into develop
for ddr-cmdln
, ddr-local
. Edits for ddr-defs
remain on 314-person-nrids
branch.
Reopening this issue. It's time to make persons
a structured field like creators
.
Pretty much done as of branch 314-person-nrids-II
commit 802f748
Testing procedure https://gist.github.com/gjost/b63f0e94487285aec775bea275f69a73.js
Merged in to master
branch and released as v5.8.1
.
Enable ddr-cmdln/ddr-local to handle NRIDs in persons/creators/narrators fields
Look at e.g. http://ddrlocal.local/ui/entity/ddr-densho-16-2/
This
should get automatically converted to this
You should then be able to add NRIDs like this
sara.beckman: (Archival Team) In the names field, regardless of which style of cataloging you choose to complete, names must be written as Last name, First name “Nickname” (Maiden Name). A semi-colon must separate people. At a minimum, a last name and either a first name or nickname (without quotes) must be included in the field. If a first name or nickname is unknown, do not include in the names field, include in the description field only. (i.e. Yoda, Tats or Yoda, Tatsu are both acceptable, but just Mr. Yoda is not. If you find out that “Tats” is Tatsu’s nickname, change his name in every entry of the name field to Yoda, Tatsu “Tats”- goal is to have one name for every unique person in the database)