<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">It looks like the positioning would be very simple to do in mysql as you only have to modify the position value in the table — no complicated joins required. You could do it interactively with a GUI frontend like Sequel Pro or MySQLWorkbench. Just make sure you don’t leave any duplicate positions. </div><div class=""><br class=""></div><div class="">If you already have a table of enum values and new positions, and you want to do it programmatically, then you can load those pairs as a temporary table, and create a function return position given value string, and use that function in your update statement rather than try to explicitly iterate over the tables. </div><div class=""><br class=""></div><div class="">Merging enumeration values, on the other hand, is more complicated, and I would leave it to the frontend/backend, and not try MySQL surgery. </div><div class=""><br class=""></div><div class="">We are doing a similar controlled value cleanup. </div><div class="">The issue we’re having is that we have several repositories, and the frontend view and list of number of related items and links are repository based, so cleanup requires tediously switching between repositories trying to find the resources that are still linked to those values. </div><div class=""><br class=""></div><div class="">Does the merge operation also only merge enumeration_values for the current repository ? </div><div class="">( I *think* that is the case, but I’m not sure. ) </div><div class=""><br class=""></div><div class="">Perhaps, if you’re logged in on an admin account, it should have an option for searching across repositories. </div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">— Steve Majewski</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 18, 2017, at 2:06 PM, Fox, Bobbi <<a href="mailto:bobbi_fox@harvard.edu" class="">bobbi_fox@harvard.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Menlo-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">In the course of adapting ArchivesSpace to Harvard’s needs, we’ve ended up with some very weedy controlled values lists (extent type > 200 values! -- of course, some of them need to be removed) with arbitrary positioning. Our support team is tasked with the job of wrangling the lists with a defined order, and the interactive “move up/down one position at a time, wait for the server to refresh, etc.” is really tedious.<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Has anyone written a script/created a plugin that would do this with less effort? I’m inclined to do it at the mysql level, rather than write an extension to the backend/controller/enumeration.rb, but maybe someone has done this already?<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks,<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Bobbi<o:p class=""></o:p></div></div><span style="font-family: Menlo-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Menlo-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Menlo-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Archivesspace_Users_Group mailing list</span><br style="font-family: Menlo-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Menlo-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br style="font-family: Menlo-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Menlo-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a></div></blockquote></div><br class=""></body></html>