<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">There are a lot of sub-records in ASpace that are essentially treated as ephemeral but which have full concrete tables backing them; they’re not addressable in the system, their representations in the JSONModel are as primitive values (strings,
array of strings, etc) rather than objects, etc. Instances are kind of this way – you can’t grab an instance, only the things attached to it, but it has a database ID, etc.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">You _<i>might</i>_ be able to insert refs to the subrecords that aren’t changing, rather than the values/records themselves? That _<i>might</i>_ keep the values the same, but I’m not sure it’ll be legal everywhere. You could also try
explicitly setting created_by and created_at; I am at a conf but could poke at this later (maybe tonight or tomorrow) if you’ll remind me.<o:p></o:p></p>
<p class="MsoNormal"><br>
--<o:p></o:p></p>
<p class="MsoNormal">Dave Mayo (he/him)<o:p></o:p></p>
<p class="MsoNormal">Senior Digital Library Software Engineer<br>
Harvard University > HUIT > LTS<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of Rachel Donahue <rachel.donahue@lac-group.com><br>
<b>Reply-To: </b>Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Date: </b>Friday, October 11, 2019 at 11:52 AM<br>
<b>To: </b>"archivesspace_users_group@lyralists.lyrasis.org" <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject: </b>[Archivesspace_Users_Group] Oddities when updating Agents via the API<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Hi all, <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">3. The lock_version for the sub-records isn't changing from 0.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Best,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Rachel<br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Please note that I currently <b>do not have access to ARS email</b>. If you need to contact me, use my LAC address:
<a href="mailto:rachel.donahue@lac-group.com" target="_blank">rachel.donahue@lac-group.com</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">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.</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>