<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Hey Andrew (and anyone else who might be interested)</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
I took a deeper dive into this and I think its doable with a few simple mods to core. Here's a sample proof of concept plugin that contains the overrides (one of which needs to go int the config since its an initializer override) and a sample setup:
<a href="https://github.com/dartmouth-dltg/multiple_subrecords" id="LPlnk356595">
https://github.com/dartmouth-dltg/multiple_subrecords</a><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
Be great to hear your thoughts and to have at least another set of eyes before I even think about pushing this into core. I have not even looked at tests for this (not sure if its even possible at the moment)</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
jds<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of Andrew Morrison
 <andrew.morrison@bodleian.ox.ac.uk><br>
<b>Sent:</b> Friday, February 17, 2023 5:43 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] Plugins add Multiple SubRecord types?</font>
<div> </div>
</div>
<div>
<p>That has been my experience. If there is another way, it'd be really useful if someone could write a reference implementation, because picking apart other people's plug-ins (or multiple interdependent plugins) for generic techniques like this isn't easy.<br>
</p>
<p><br>
</p>
<p>Andrew.</p>
<p><br>
</p>
<p><br>
</p>
<div class="x_moz-cite-prefix">On 01/02/2023 22:56, Joshua D. Shaw wrote:<br>
</div>
<blockquote type="cite"><style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div class="x_elementToProof x_ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
Can someone double check me? Just reading the code and it looks like a plugin <b>
cannot</b>​ add multiple subrecord types. Specifically, the initializer (<a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Farchivesspace%2Farchivesspace%2Fblob%2Fmaster%2Ffrontend%2Fconfig%2Finitializers%2Fplugin.rb&data=05%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7Ca995594672e34f7ad11a08db10d3c560%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C638122273973428527%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=G7%2BfRKNcXQUyG5U4HifkfrHSuuZAo2Xl76brKWb%2BfQc%3D&reserved=0" originalsrc="https://github.com/archivesspace/archivesspace/blob/master/frontend/config/initializers/plugin.rb" shash="ZgEiyo2TH4pNB0WQUurhc7DEBaWvwHUGt0pMLpzOcQX1M7lO6rPFdyJiRANhj1Y11l9GDipLVzG1S2d9P6Y4DLJL0bEUhf6aL5Powb+UnPXsOMhQveosc9Rzxa08H3PNHA45dd0tnREW9AuiV6pNPChcPVuv8Jcjt1WZsGFu3KY=" id="LPNoLPOWALinkPreview" class="x_moz-txt-link-freetext">https://github.com/archivesspace/archivesspace/blob/master/frontend/config/initializers/plugin.rb</a>)
 reads one config.yml file which (since its yaml) precludes duplicate key names and hence multiple subrecord types. While I could patch this, there are other places where the config.yml keys are used that would also need to be patched and I'm not sure how far
 that patching would extend.<br>
</div>
<div class="x_elementToProof x_ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div class="x_elementToProof x_ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
If I'm right about no multiple subrecords in one plugin, guess it'll be a separate plugin with a depends_on_plugins entry in the config.yml since I'll be referencing a controlled value list created by another plugin and I don't want to maintain two cv lists
 that are duplicates.<br>
</div>
<div class="x_elementToProof x_ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div class="x_elementToProof x_ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
Its a bummer since the subrecords are intellectually (though not structurally) related.<br>
</div>
<div class="x__Entity x__EType_OWALinkPreview x__EId_OWALinkPreview x__EReadonly_1 x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
Thanks!</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
Joshua<br>
</div>
<div class="x_elementToProof">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_Signature">
<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)">
Joshua Shaw (he, him)</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Library Web & Application Developer<br>
</div>
<span style="font-family:Calibri,Helvetica,sans-serif">Digital Library Technologies Group</span><br>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Dartmouth College<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
603.646.0405<br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="x_moz-mime-attachment-header"></fieldset>
<pre class="x_moz-quote-pre">_______________________________________________
Archivesspace_Users_Group mailing list
<a class="x_moz-txt-link-abbreviated" href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org">Archivesspace_Users_Group@lyralists.lyrasis.org</a>
<a class="x_moz-txt-link-freetext" href="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%7Ca995594672e34f7ad11a08db10d3c560%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C638122273973428527%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=56g3qLLAX8LfcirpRTwxH2G%2BzzGhtnnGwKqJA4TTxOk%3D&reserved=0" originalsrc="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" shash="wHSXomXcD3S/h7OGM1941lCviE73PF4qjUvfmMRYxD+d09yKAeHK8mTVpfd1cR4WnjVxgztADVImiGWyzhqP65kiqfjmfYaeBQ2PJcq1+5NCWF+NLJ78KIF7O7qyd2V+51YQEWNKRMPCS3XmObKQJ0SL0KN7xXDh9hZ8U7lc8Jw=">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a>
</pre>
</blockquote>
</div>
</body>
</html>