<html><head>

<meta name="Generator" content="Novell Groupwise Client (Version 14.0.1  Build: 117118)">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body style="font: 10pt/normal Segoe UI; margin: 16px 16px 4px; font-size-adjust: none; font-stretch: normal;"><div class="GroupWiseMessageBody" id="GroupWiseSection_1442840917000_Andy.Reid@lshtm.ac.uk_E7E91160180E0000BAA6000000100002_"><div>Hi,</div><div>I'm trying to work out how to thread two&nbsp;eprints so that I can merge the Accepted Manuscript&nbsp;record with Final published version, given that I have two separate systems feeding&nbsp;into the repository -&nbsp; one feeding&nbsp;Manuscripts, one harvesting published metadata from PubMed etc.&nbsp; I've looked at what happens when you create a linked new version of a record, with the &lt;succeeds&gt;&nbsp;set on the&nbsp;new record, and &lt;<span style='font: 12px/16.8px Consolas, "Liberation Mono", Menlo, Courier, monospace; color: rgb(24, 54, 145); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: pre; widows: 1; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;'>metadata_visibility&gt; set&nbsp;to no-search</span>&nbsp; on the old one. I'm in the slightly different position of wanting to merge two records once they are in the repository, but it seems like those are the fields I need to tweak. &nbsp;I've looked at the code in <!--StartFragment--><a href="https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/DataObj/EPrint.pm">https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/DataObj/EPrint.pm</a>&nbsp;</div><div>to see the various in_thread manipulation functions, and can just about follow them.&nbsp; </div><div><br></div><div>What I can't find is an admin utility that says 'Merge these two records, making this one the version of record, and retaining that one as an earlier version.'&nbsp; Am I not looking hard enough?</div><div><br></div><div>What I might also want to do is to&nbsp;trigger this from the external systems, via SWORD, sending a couple of minimal XML packages to modify each of the records:</div><div><br></div><div><div style="color: blue; font-weight: normal; margin-left: -4em;" xmlns="http://www.w3.org/1999/xhtml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;<style xmlns="http://www.w3.org/1999/xhtml">@namespace html url(http://www.w3.org/1999/xhtml); :root {                       font:small Verdana;        font-weight: bold;         padding: 2em;              padding-left:4em;       }                          * {                           display: block;            padding-left: 2em;      }                          html|style {                  display: none;          }                          html|span, html|a {           display: inline;           padding: 0;                font-weight: normal;       text-decoration: none;  }                          html|span.block {             display: block;         }                          *[html|hidden],            span.block[html|hidden] {     display: none;          }                          .expand {                     display: block;         }                          .expand:before {              content: '+';              color: red;                position: absolute;        left: -1em;             }  .collapse {                   display: block;         }                          .collapse:before {            content: '-';              color: red;                position: absolute;        left:-1em;              }                         </style></div><a class="collapse" style="color: blue; margin-left: -2em; position: relative;" href="file:///C:/Users/EADMAREI/Downloads/lshtmtest-eprint-991329.xml#" xmlns="http://www.w3.org/1999/xhtml">&lt;<span style="color: rgb(153, 0, 0);">eprints</span> <span style="color: red;">xmlns</span>="<span style="color: red; font-weight: bold;">http://eprints.org/ep2/data/2.0</span>"&gt;</a>&lt;<span style="color: rgb(153, 0, 0);">eprint</span> <span style="color: rgb(153, 0, 0);">id</span>="<span style="color: black; font-weight: bold;">http://blah.ac.uk/id/eprint/991329</span>"&gt;<eprint id="http://lshtmtest.da.ulcc.ac.uk/id/eprint/991329"><a style="color: blue; margin-left: -2em;" xmlns="http://www.w3.org/1999/xhtml">&lt;<span style="color: rgb(153, 0, 0);">eprintid</span>&gt;</a>991329<span style="color: blue;" xmlns="http://www.w3.org/1999/xhtml">&lt;/<span style="color: rgb(153, 0, 0);">eprintid</span>&gt;</span><span style="color: blue;" xmlns="http://www.w3.org/1999/xhtml">&lt;<span style="color: rgb(153, 0, 0);">succeeds</span>&gt;</span><span style="color: blue;" xmlns="http://www.w3.org/1999/xhtml">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 991328</span><span style="color: blue;" xmlns="http://www.w3.org/1999/xhtml"><span style="color: blue;" xmlns="http://www.w3.org/1999/xhtml">&lt;/<span style="color: rgb(153, 0, 0);">succeeds</span>&gt;</span></span><span style="color: blue;" xmlns="http://www.w3.org/1999/xhtml"><span style="color: blue;" xmlns="http://www.w3.org/1999/xhtml"></span></span><span style="color: blue;" xmlns="http://www.w3.org/1999/xhtml"><span style="color: blue;" xmlns="http://www.w3.org/1999/xhtml">&lt;/<span style="color: rgb(153, 0, 0);">eprint&gt;</span></span></span><span style="color: blue;" xmlns="http://www.w3.org/1999/xhtml"><span style="color: blue;" xmlns="http://www.w3.org/1999/xhtml"><span style="color: rgb(153, 0, 0);"><span class="block" style="color: blue; margin-left: -2em;" xmlns="http://www.w3.org/1999/xhtml">&lt;/<span style="color: rgb(153, 0, 0);">eprints</span>&gt;</span></span></span></span><span style="color: blue;" xmlns="http://www.w3.org/1999/xhtml"><span style="color: blue;" xmlns="http://www.w3.org/1999/xhtml"><span style="color: rgb(153, 0, 0);"></span></span></span></eprint><eprint><br></eprint><eprint>and likewise for the &lt;metadata-visiblility&gt; on the old record**</eprint><eprint><br></eprint><eprint>Does that seem like it ought to work?&nbsp; It seems too easy.&nbsp; Am I missing deeper layers of subtlety that are going to get corrupted by my naive approach.</eprint><eprint><br></eprint><eprint>Also, the eprint id is given twice in a standard eprint XML export, as per the edited code above.&nbsp; Is it necessary to have both to trigger an update correctly?</eprint><eprint><br></eprint><eprint>Andy Reid</eprint><eprint><br></eprint><eprint>** (I say 'old record' but in reality the published versions may arrive before the manuscript versions, which depend on the authors sending them and us having the resources to process them ;-/ )</eprint><eprint><br></eprint></div><span id="GWSignatureSent" style="padding-right: 0px; padding-left: 0px; margin-bottom: 5px; display: block;"><span style="display: block;"><br><span style="font-size: 10pt; display: inline-block; -ms-word-wrap: normal;"><div>Andy Reid</div>
<div>Research Information Manager</div>
<div>Room G43, Executive Office</div>
<div>London School of Hygiene &amp; Tropical Medicine</div>
<div>Keppel St</div>
<div>LONDON WC1E 7HT</div>
<div>+44 020-7927-2618</div>
<div><a href="http://orcid.org/0000-0002-2500-2980">http://orcid.org/0000-0002-2500-2980</a></div></span></span></span><span style="margin-bottom: 5px; display: block;"><br></span></div></body></html>