<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:mv="http://macVmlSchemaUri" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<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:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@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;}
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
        {mso-style-priority:99;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Calibri;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Calibri;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.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 bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hey Suzanne, <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We have automated this process for the most part.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If you want to have a method to just delete all orphaned top containers, you chan check out this Python script I wrote up really quickly:
<a href="https://github.com/RockefellerArchiveCenter/scripts/blob/master/archivesspace/asDeleteOrphanContainers.py">
https://github.com/RockefellerArchiveCenter/scripts/blob/master/archivesspace/asDeleteOrphanContainers.py</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Let me know if you have any questions.<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="color:black">From: </span></b><span style="color:black"><archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of "Custer, Mark" <mark.custer@yale.edu><br>
<b>Reply-To: </b>Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Date: </b>Sunday, September 17, 2017 at 2:09 PM<br>
<b>To: </b>"archivesspace_users_group@lyralists.lyrasis.org" <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject: </b>Re: [Archivesspace_Users_Group] Deleting Empty Top Containers</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Times New Roman""><o:p> </o:p></span></p>
</div>
<div id="divtagdefaultwrapper">
<p><span style="font-family:Calibri;color:black">Hi, Suzanne.<o:p></o:p></span></p>
<p><span style="font-family:Calibri;color:black"><o:p> </o:p></span></p>
<p><span style="font-family:Calibri;color:black">Yep, that's exactly the way to do it, and exactly why the "unassociated" option was added.  <o:p></o:p></span></p>
<p><span style="font-family:Calibri;color:black"><o:p> </o:p></span></p>
<p><span style="font-family:Calibri;color:black">Since top containers are scoped to repositories, though, if you have multiple repositories in your installation, then you'll need to perform this action within each repository.  We've assigned this cleanup task
 as something that our repository managers should do on a periodic basis.  <o:p></o:p></span></p>
<p><span style="font-family:Calibri;color:black"><o:p> </o:p></span></p>
<p><span style="font-family:Calibri;color:black">We haven't decided to automate this task yet, however, which I guess gives us the opportunity to make sure that everything looks okay before activating the bulk delete option.  That said, I think that automating
 this on a periodic basis outside of normal business hours could be the way to go.  We had originally hoped that orphaned top containers could never be created in the staff application, but given that they can be associated with different resource, accession,
 and archival object records, it would be a bit tricky to do that, so orphaned, or unassociated, top containers will be created if an entire resource record is deleted, for instance.  Same thing happens right now for digital object records; the only difference
 there is that digital objects can also be created as stand-alone records in the staff interface, whereas you can't do that with top containers (without using the API). <o:p></o:p></span></p>
<p><span style="font-family:Calibri;color:black"><o:p> </o:p></span></p>
<p><span style="font-family:Calibri;color:black">Mark<o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:12.0pt;font-family:"Times New Roman"">
<hr size="2" width="98%" align="center">
</span></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 Stasiulatis, Suzanne <sustasiula@pa.gov><br>
<b>Sent:</b> Saturday, September 16, 2017 1:55:14 PM<br>
<b>To:</b> archivesspace_users_group@lyralists.lyrasis.org<br>
<b>Subject:</b> [Archivesspace_Users_Group] Deleting Empty Top Containers</span><span style="font-size:12.0pt;font-family:"Times New Roman"">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman""> <o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I am working in ArchivesSpace version 1.5.4. I’d like to delete all of our empty top containers through the staff interface. By empty, I mean top containers that aren’t linked to any archival objects. I believe we created containers in
 the archival object page and then unlinked them at some point. <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">In <u>Manage Top Containers</u>, you can choose <u>Yes</u> for
<u>Unassociated containers</u> and leave all other fields blank. This gives us a very long list. Can anyone confirm that this list includes all of our empty top containers and only our empty top containers?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><img border="0" width="874" height="479" id="Picture_x005f_x0020_1" src="cid:image001.png@01D3305D.44B4D5B0"><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thanks!<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Suzanne<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Verdana;color:navy">Suzanne Stasiulatis
</span></b><span style="font-size:10.0pt;font-family:Verdana;color:navy">| Archivist II<br>
Pennsylvania Historical and Museum Commission<b> </b>| Pennsylvania State Archives<br>
350 North Street | Harrisburg, PA 17120-0090</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.phmc.pa.gov_Archives&d=DwMFAg&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=p6DgPzipKtHj5MNdBWmiUC7F9PxIagbI68ckkTxVYSQ&s=L5_6KoOslchLuYAG4MlU2hUAyE1KmI2Y-fkbpZn5N5o&e=">www.phmc.pa.gov/Archives</a></span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#17365D"><a href="mailto:sustasiula@pa.gov">sustasiula@pa.gov</a></span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</body>
</html>