<html xmlns:v="urn:schemas-microsoft-com:vml" 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)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 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;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.xmsonormal, li.xmsonormal, div.xmsonormal
        {mso-style-name:x_msonormal;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;}
p.xmsochpdefault, li.xmsochpdefault, div.xmsochpdefault
        {mso-style-name:x_msochpdefault;
        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.xemailstyle17
        {mso-style-name:x_emailstyle17;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.xmsoins
        {mso-style-name:x_msoins;
        color:teal;
        text-decoration:underline;}
span.EmailStyle23
        {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><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">This sounds like a bug to me. Is there some place other than this list where it should be reported?
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It seems to me that the solution is to place a database constraint on that field, so that NULL values can’t be used for foreign keys, but perhaps there is more to the issue?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Shaun Ellis<o:p></o:p></p>
<p class="MsoNormal">--<o:p></o:p></p>
<p class="MsoNormal">UX Web Developer / Frontend Engineer<o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt"><a href="https://library.princeton.edu/"><span style="color:#0563C1">Princeton University Library</span></a></span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt">Princeton, NJ 08544</span><o:p></o:p></p>
<p class="MsoNormal"><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 Jenn Colt <jrc88@cornell.edu><br>
<b>Reply-To: </b>Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Date: </b>Thursday, September 27, 2018 at 9:54 AM<br>
<b>To: </b>"archivesspace_users_group@lyralists.lyrasis.org" <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject: </b>Re: [Archivesspace_Users_Group] Event Outcome Problems<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div id="divtagdefaultwrapper">
<p><span style="font-size:12.0pt;color:black">I'm seeing this as well when I make a new event but leave the outcome blank.<o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of James R Griffin III <jrg5@princeton.edu><br>
<b>Sent:</b> Tuesday, September 25, 2018 2:36:25 PM<br>
<b>To:</b> archivesspace_users_group@lyralists.lyrasis.org<br>
<b>Subject:</b> [Archivesspace_Users_Group] Event Outcome Problems</span> <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt">Hello Everyone,</span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt">Please forgive any misunderstandings on my part, as I'm relatively new to this software and the project.</span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt">I'm currently working with an installation of ArchivesSpace which has been updated to 2.5.0, and I've encountered a problem in which Event "Outcome" values can be persisted into the
 database with NULL foreign keys:</span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt;font-family:Consolas">[archivesspace]> select count(<a href="http://e.id/" target="_blank">e.id</a>) from event as e where e.outcome_id IS NULL;</span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt;font-family:Consolas">+-------------+</span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt;font-family:Consolas">| count(<a href="http://e.id/" target="_blank">e.id</a>) |</span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt;font-family:Consolas">+-------------+</span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt;font-family:Consolas">|       14324 |</span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt;font-family:Consolas">+-------------+</span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt">Is this expected? When these are set as NULL, the corresponding enumeration_value cannot be retrieved for translation in the locale, leading to the following errors:</span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt;font-family:Consolas">translation missing: enumerations.event_outcome.<br>
</span><span style="font-size:11.0pt"><br>
...where the tag following enumerations.event_outcome (normally some value like pass or fail, as found in <a href="https://github.com/archivesspace/archivesspace/blob/v2.5.0/common/locales/enums/en.yml#L442" target="_blank">https://github.com/archivesspace/archivesspace/blob/v2.5.0/common/locales/enums/en.yml#L442</a>)
 is simply blank.<br>
<br>
Is this something which others have encountered before? Might this be an issue which must be addressed with database record cleaning for these NULL foreign keys? Thank you for your time and support.<br>
<br>
Sincerely,<br>
James Griffin</span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt">-- </span><o:p></o:p></p>
<div>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt">Digital Infrastructure Developer</span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt"><a href="https://library.princeton.edu/"><span style="color:#0563C1">Princeton University Library</span></a></span><o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:11.0pt">Princeton, NJ 08544</span><o:p></o:p></p>
</div>
<p class="xmsonormal" style="background:white"> <o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>