[Archivesspace_Users_Group] ASpace 3.4.0 and new ILMS Bib Number length
Joshua D. Shaw
Joshua.D.Shaw at dartmouth.edu
Mon Aug 7 10:55:25 EDT 2023
Oh. Uggghh. I see the issue. Even though the DB defines the field as a varchar, the schema defines a maxlength of 13 characters.
You might be able to override that in a simple plugin. Something like
schema_overrides
/schemas
user_defined_ext.rb
with contents like
{
"real_1" => {"type" => "string", "maxlength" => 40, "required" => false},
"real_2" => {"type" => "string", "maxlength" => 40, "required" => false},
"real_3" => {"type" => "string", "maxlength" => 40, "required" => false}
}
Though I haven't tried overriding the base schema in that way.
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.
Joshua
________________________________
From: Mark Cyzyk <mcyzyk at gmail.com>
Sent: Monday, August 7, 2023 9:36 AM
To: Joshua D. Shaw <Joshua.D.Shaw at dartmouth.edu>; mcyzyk at jhu.edu <mcyzyk at jhu.edu>; Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] ASpace 3.4.0 and new ILMS Bib Number length
Thanks, Joshua,
I think the issue here is that the DB is storing our Bib "Numbers" as numbers, not text strings.
Our new Bib Number format:
991036635839707861
Error when submitting:
"Bib Number - Must be a number with no more than nine digits and five decimal places"
Any way to convert to varchar text string without data loss?
Mark
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Mark Cyzyk, M.A., M.L.S.
Library Applications Group
The Sheridan Libraries
The Johns Hopkins University
mcyzyk at jhu.edu<mailto:mcyzyk at jhu.edu>
Verba volant, scripta manent.
On 8/7/23 07:48, Joshua D. Shaw wrote:
Hi Mark
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.
What issue are you seeing?
Joshua
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> <archivesspace_users_group-bounces at lyralists.lyrasis.org><mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Mark Cyzyk <mcyzyk at gmail.com><mailto:mcyzyk at gmail.com>
Sent: Sunday, August 6, 2023 12:56 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org><mailto:archivesspace_users_group at lyralists.lyrasis.org>
Subject: [Archivesspace_Users_Group] ASpace 3.4.0 and new ILMS Bib Number length
All,
We recently upgraded to ASpace 3.4.0. Everything is fine except for one
thing:
Insofar as we also recently migrated our ILMS here, our Bib Numbers are
now larger strings than before. They are now 18 characters.
How/where can I Up this field length? I've looked in the various
Locales files.
As far as I can tell, Bib Number is in the
resource_user_defined__real_1_ field, but I'm not finding where the
length of that field is limited.
FYI, we are using the User Defined in Basic plugin.
Advice appreciated,
Mark
--
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Mark Cyzyk, M.A., M.L.S.
Library Applications Group
The Sheridan Libraries
The Johns Hopkins University
mcyzyk at jhu.edu<mailto:mcyzyk at jhu.edu>
Verba volant, scripta manent.
_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org<mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
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<http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20230807/b9c6f6c9/attachment.html>
More information about the Archivesspace_Users_Group
mailing list