Hi Rachel, Basically, what you are seeing is that whenever a record is posted, all of its subrecords are deleted and recreated, even if no changes are made to the subrecords themselves. When this happens a new database identifier, create time, lock version etc. are assigned to each subrecord. I don’t think it’s a bug, per se, but it is an odd behavior that has come up numerous times in my work as well.
I am not sure why the decision to design subrecords that way was made by the original developers of the application (if anyone has thoughts please let me know!), nor do I have a sense of the amount of work/consequences involved in updating the application so that subrecords are persistent. There isn’t a way to only post the changing fields via the API, since only top-level records (resources, archival objects, etc.) have their own URIs. An alternative solution would be to do a (very careful!) database update to the relevant field(s) in the relevant name table(s). Hope this helps, Alicia Alicia Detelich Archivist Manuscripts and Archives Yale University Libraries From: <archivesspace_users_group-boun...@lyralists.lyrasis.org> on behalf of Rachel Donahue <rachel.dona...@lac-group.com> Reply-To: Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org> Date: Friday, October 11, 2019 at 11:52 AM To: "archivesspace_users_group@lyralists.lyrasis.org" <archivesspace_users_group@lyralists.lyrasis.org> Subject: [Archivesspace_Users_Group] Oddities when updating Agents via the API Hi all, I'm running some bulk updates to Agents (in this case people) via the API and noticed some rather odd changes to sub-records when I check the JSON after successfully running the update. 1. Every sub-record (e.g. names, telephones) has replaced "created_by" with the user authenticated by the API and create_time with the time of the API call. The Agent itself retains its created_by and time, thankfully, but all the bits and pieces lose it. 2. Possibly related to this, a new telephone number is created even though nothing about the phone number has changed. (e.g. what was /telephone/99 is now /telephone/204) 3. The lock_version for the sub-records isn't changing from 0. The only thing changing in these updates is the name source and we're using ArchivesSpace 2.6.0. I have been reposting the entire object in the update--is it possible to post *only* the changing fields and perhaps avoid the problem? While this isn't a make-or-break problem, I'd really like to retain the created_by information for names, as it is often *not* the same as the person who created the initial record. I'm also not sure if this is a bug or something I'm doing wrong. Any insights would be much appreciated! Best, Rachel -- Please note that I currently do not have access to ARS email. If you need to contact me, use my LAC address: rachel.dona...@lac-group.com<mailto:rachel.dona...@lac-group.com> The information contained in this e-mail message is confidential. If you are not the intended recipient, any dissemination or copying is strictly prohibited. If you think that you have received this e-mail message in error, please contact the sender.
_______________________________________________ Archivesspace_Users_Group mailing list Archivesspace_Users_Group@lyralists.lyrasis.org http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group