<div dir="ltr">I think this would be a good candidate for a bug report since it's causing data retention issues. <div><br></div><div>Jesse</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 7, 2023 at 10:55 AM Joshua D. Shaw <<a href="mailto:Joshua.D.Shaw@dartmouth.edu">Joshua.D.Shaw@dartmouth.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg8368433930541107935">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Oh. Uggghh. I see the issue. Even though the DB defines the field as a varchar, the schema defines a maxlength of 13 characters.
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
You <b>might be able</b> to override that in a simple plugin. Something like</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
schema_overrides</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
 <span>     </span>/schemas</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span>      <span>      </span>user_defined_ext.rb</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span>with contents like</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span>{<br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span>      "real_1" => {"type" => "string", "maxlength" => 40, "required" => false},
<div>      "real_2" => {"type" => "string", "maxlength" => 40, "required" => false},</div>
      "real_3" => {"type" => "string", "maxlength" => 40, "required" => false}<br>
</span></div>
<div id="m_8368433930541107935appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
}</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Though I haven't tried overriding the base schema in that way.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Alternatively (and probably better), you could alter the db itself by updating the affected rows in the user_defined table - either directly or with a migration update in a plugin. You'd want to move the data from the real_1, real_2, real_3 columns to string_1,
 string_2, string_3 columns AND update the user_mtime column to trigger any index updates.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Joshua<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_8368433930541107935divRplyFwdMsg" dir="ltr"><font style="font-size:11pt;color:rgb(0,0,0)" face="Calibri, sans-serif"><b>From:</b> Mark Cyzyk <<a href="mailto:mcyzyk@gmail.com" target="_blank">mcyzyk@gmail.com</a>><br>
<b>Sent:</b> Monday, August 7, 2023 9:36 AM<br>
<b>To:</b> Joshua D. Shaw <<a href="mailto:Joshua.D.Shaw@dartmouth.edu" target="_blank">Joshua.D.Shaw@dartmouth.edu</a>>; <a href="mailto:mcyzyk@jhu.edu" target="_blank">mcyzyk@jhu.edu</a> <<a href="mailto:mcyzyk@jhu.edu" target="_blank">mcyzyk@jhu.edu</a>>; Archivesspace Users Group <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org" target="_blank">archivesspace_users_group@lyralists.lyrasis.org</a>><br>
<b>Subject:</b> Re: [Archivesspace_Users_Group] ASpace 3.4.0 and new ILMS Bib Number length</font>
<div> </div>
</div>
<div><br>
Thanks, Joshua,<br>
<br>
I think the issue here is that the DB is storing our Bib "Numbers" as numbers, not text strings.<br>
<br>
Our new Bib Number format:<br>
<br>
<blockquote><span style="font-family:Slack-Lato,Slack-Fractions,appleLogo,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:common-ligatures;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;text-decoration-style:initial;text-decoration-color:initial;float:none;color:rgb(29,28,29);background-color:rgb(255,255,255);display:inline">991036635839707861</span><br>
<span style="font-family:Slack-Lato,Slack-Fractions,appleLogo,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:common-ligatures;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;text-decoration-style:initial;text-decoration-color:initial;float:none;color:rgb(29,28,29);background-color:rgb(255,255,255);display:inline"></span></blockquote>
<span style="font-family:Slack-Lato,Slack-Fractions,appleLogo,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:common-ligatures;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;text-decoration-style:initial;text-decoration-color:initial;float:none;color:rgb(29,28,29);background-color:rgb(255,255,255);display:inline"><br>
Error when submitting:<br>
<br>
</span>
<blockquote><span style="font-family:Slack-Lato,Slack-Fractions,appleLogo,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:common-ligatures;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;text-decoration-style:initial;text-decoration-color:initial;float:none;color:rgb(29,28,29);background-color:rgb(255,255,255);display:inline">"Bib
 Number - Must be a number with no more than nine digits and five decimal places"</span><br>
<span style="font-family:Slack-Lato,Slack-Fractions,appleLogo,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:common-ligatures;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;text-decoration-style:initial;text-decoration-color:initial;float:none;color:rgb(29,28,29);background-color:rgb(255,255,255);display:inline"></span></blockquote>
<span style="font-family:Slack-Lato,Slack-Fractions,appleLogo,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:common-ligatures;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;text-decoration-style:initial;text-decoration-color:initial;float:none;color:rgb(29,28,29);background-color:rgb(255,255,255);display:inline"><br>
Any way to convert to varchar text string without data loss?<br>
<br>
Mark<br>
</span>
<pre cols="72"><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Mark Cyzyk, M.A., M.L.S.
Library Applications Group
The Sheridan Libraries
The Johns Hopkins University
<a href="mailto:mcyzyk@jhu.edu" id="m_8368433930541107935OWAedb00dfb-bb12-7e4a-276d-c087a982a393" target="_blank">mcyzyk@jhu.edu</a>

Verba volant, scripta manent. 
</pre>
<div>On 8/7/23 07:48, Joshua D. Shaw wrote:<br>
</div>
<blockquote type="cite">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi Mark</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
The fields are defined in the db (via the migrations). The real_x fields (and integer_x and string_x fields) in user_defined are varchars, so any limits you're hitting aren't in the db. There's also nothing in the plugin that would limit the field lengths -
 unless you've customized the plugin.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
What issue are you seeing?<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Joshua<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_8368433930541107935x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt;color:rgb(0,0,0)" face="Calibri, sans-serif"><b>From:</b>
<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org" id="m_8368433930541107935OWAc554f626-f2d8-01fe-fde7-1e79ad922d0b" target="_blank">
archivesspace_users_group-bounces@lyralists.lyrasis.org</a> <a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org" id="m_8368433930541107935OWAf8eb3d39-7a43-f4f7-7612-112342330779" target="_blank">
<archivesspace_users_group-bounces@lyralists.lyrasis.org></a> on behalf of Mark Cyzyk
<a href="mailto:mcyzyk@gmail.com" id="m_8368433930541107935OWA685298c3-2a2b-0049-5dca-5c08311dd3e6" target="_blank">
<mcyzyk@gmail.com></a><br>
<b>Sent:</b> Sunday, August 6, 2023 12:56 PM<br>
<b>To:</b> Archivesspace Users Group <a href="mailto:archivesspace_users_group@lyralists.lyrasis.org" id="m_8368433930541107935OWAe4a38bcc-0def-d69f-c8b4-d63b53ff3cea" target="_blank">
<archivesspace_users_group@lyralists.lyrasis.org></a><br>
<b>Subject:</b> [Archivesspace_Users_Group] ASpace 3.4.0 and new ILMS Bib Number length</font>
<div> </div>
</div>
<div><font size="2"><span style="font-size:11pt">
<div><br>
All,<br>
<br>
We recently upgraded to ASpace 3.4.0.  Everything is fine except for one <br>
thing:<br>
<br>
Insofar as we also recently migrated our ILMS here, our Bib Numbers are <br>
now larger strings than before.  They are now 18 characters.<br>
<br>
How/where can I Up this field length?  I've looked in the various <br>
Locales files.<br>
<br>
As far as I can tell, Bib Number is in the <br>
resource_user_defined__real_1_ field, but I'm not finding where the <br>
length of that field is limited.<br>
<br>
FYI, we are using the User Defined in Basic plugin.<br>
<br>
Advice appreciated,<br>
<br>
Mark<br>
<br>
-- <br>
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><br>
Mark Cyzyk, M.A., M.L.S.<br>
Library Applications Group<br>
The Sheridan Libraries<br>
The Johns Hopkins University<br>
<a href="mailto:mcyzyk@jhu.edu" id="m_8368433930541107935OWA202114af-18de-a2d7-4fa4-58899686a546" target="_blank">mcyzyk@jhu.edu</a><br>
<br>
Verba volant, scripta manent.<br>
<br>
_______________________________________________<br>
Archivesspace_Users_Group mailing list<br>
<a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" id="m_8368433930541107935OWAa812ee17-b026-7114-2023-6aa255dad02c" target="_blank">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br>
<a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" id="m_8368433930541107935OWA9c22fcc5-16b3-a61b-bbd8-85c46d2d7a7f" target="_blank">https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flyralists.lyrasis.org%2Fmailman%2Flistinfo%2Farchivesspace_users_group&data=05%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7Cba1914ced54d4d68822308db969e1237%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C638269377900220240%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=eTkrkrzpzmF%2BqHUamRGO0KT2uyhBVl1CYI2eRY0OxGg%3D&reserved=0</a><br>
</div>
</span></font></div>
</blockquote>
<br>
</div>
</div>

_______________________________________________<br>
Archivesspace_Users_Group mailing list<br>
<a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" target="_blank">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br>
<a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" rel="noreferrer" target="_blank">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><br>
</div></blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>Jesse Martinez<br></div><div>Senior Library Applications Developer</div><div>O'Neill Library, Boston College</div><div><a href="mailto:jesse.martinez@bc.edu" target="_blank">jesse.martinez@bc.edu</a></div><div>617-552-2509</div><div>he/him/his</div></div></div></div></div></div></div></div>