<html><body>
<p><font size="2" face="sans-serif">Dear Adam,</font><br>
<br>
<font size="2" face="sans-serif">after your note, I was curious and did a little digging in our database, too, and found documents that have placement values up to 790. How did that come? I assume that if you have 10 documents, placement values should be 1-10.</font><br>
<br>
<font size="2" face="sans-serif">Is there possibly a mistake in sub _reorder() in </font><font size="2" face="sans-serif">perl_lib/EPrints/Plugin/InputForm/Component/Documents.pm</font><font size="2" face="sans-serif">?</font><br>
<br>
<font size="2" face="sans-serif">Best regards,</font><br>
<br>
<font size="2" face="sans-serif">Martin</font><br>
<br>
<font size="2" face="sans-serif">--</font><br>
<font size="2" face="sans-serif">Dr. Martin Brändle</font><br>
<font size="2" face="sans-serif">Zentrale Informatik</font><br>
<font size="2" face="sans-serif">Universität Zürich</font><br>
<font size="2" face="sans-serif">Winterthurerstr. 190</font><br>
<font size="2" face="sans-serif">CH-8057 Zürich</font><br>
<br>
<br>
<img width="16" height="16" src="cid:1__=4EBBF4A3DFD8D1498f9e8a93df9@lotus.uzh.ch" border="0" alt="Inactive hide details for &quot;Field A.N.&quot; ---23/04/2015 14:53:03---I did a little digging.  Have a look at the get_all_documents f"><font size="2" color="#424282" face="sans-serif">&quot;Field A.N.&quot; ---23/04/2015 14:53:03---I did a little digging. &nbsp;Have a look at the get_all_documents function: <a href="https://github.com/eprints/e">https://github.com/eprints/e</a></font><br>
<br>
<font size="1" color="#5F5F5F" face="sans-serif">Von:        </font><font size="1" face="sans-serif">&quot;Field A.N.&quot; &lt;af05v@ecs.soton.ac.uk&gt;</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">An:        </font><font size="1" face="sans-serif">eprints-tech@ecs.soton.ac.uk</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Datum:        </font><font size="1" face="sans-serif">23/04/2015 14:53</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Betreff:        </font><font size="1" face="sans-serif">[EP-tech] Re: reordering documents</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Gesendet von:        </font><font size="1" face="sans-serif">eprints-tech-bounces@ecs.soton.ac.uk</font><br>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<tt><font size="2"><br>
I did a little digging. &nbsp;Have a look at the get_all_documents function:<br>
<br>
</font></tt><tt><font size="2"><a href="https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/DataObj/EPrint.pm#L1197">https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/DataObj/EPrint.pm#L1197</a></font></tt><tt><font size="2"><br>
<br>
It orders documents based on a 'placement' metadata field. &nbsp;Your code should set this on all the documents, commit them all, then regenerate the abstract page of the eprint.<br>
<br>
--<br>
Adam Field<br>
Business Relationship Manager and Community Lead<br>
EPrints Services<br>
+44 (0)23 8059 8814<br>
<br>
<br>
<br>
<br>
<br>
On 23 Apr 2015, at 13:15, Timothy Miles-Board wrote:<br>
<br>
&gt; <br>
&gt; Ordering/reordering of documents is possible in the later 3.3 versions.<br>
&gt; <br>
&gt; Tim<br>
&gt; <br>
&gt; Timothy Miles-Board<br>
&gt; Web &amp; Repositories Development Specialist, University of London Computer Centre<br>
&gt; 020 7863 1342 &nbsp;| &nbsp;07742 970 351 &nbsp;| timothy.miles-board@london.ac.uk | @drtjmb<br>
&gt; The University of London is an exempt charity in England and Wales<br>
&gt; <br>
&gt; ________________________________________<br>
&gt; From: eprints-tech-bounces@ecs.soton.ac.uk &lt;eprints-tech-bounces@ecs.soton.ac.uk&gt; on behalf of Lizz Jennings &lt;E.Jennings@bath.ac.uk&gt;<br>
&gt; Sent: 23 April 2015 12:17 PM<br>
&gt; To: eprints-tech@ecs.soton.ac.uk<br>
&gt; Subject: [EP-tech] Re: reordering documents<br>
&gt; <br>
&gt; Just to add a voice to this that document ordering is quite important with datasets too, which will often have multiple files, which may have a logical order.<br>
&gt; <br>
&gt; Lizz<br>
&gt; <br>
&gt; --<br>
&gt; Lizz Jennings BA MSc ACLIP MCLIP (Revalidated 2014)<br>
&gt; Technical Data Officer<br>
&gt; The Library 4.10, University of Bath, Bath, BA2 7AY UK<br>
&gt; Ext. 3570 (External 01225 383570)<br>
&gt; E.Jennings@bath.ac.uk<br>
&gt; Research Data Management: </font></tt><tt><font size="2"><a href="http://www.bath.ac.uk/research/data">http://www.bath.ac.uk/research/data</a></font></tt><tt><font size="2"><br>
&gt; <br>
&gt; <br>
&gt; -----Original Message-----<br>
&gt; From: eprints-tech-bounces@ecs.soton.ac.uk [</font></tt><tt><font size="2"><a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">mailto:eprints-tech-bounces@ecs.soton.ac.uk</a></font></tt><tt><font size="2">] On Behalf Of CARRICK Ray<br>
&gt; Sent: 23 April 2015 12:03<br>
&gt; To: eprints-tech@ecs.soton.ac.uk<br>
&gt; Subject: [EP-tech] Re: reordering documents<br>
&gt; <br>
&gt; Hi Adam,<br>
&gt; <br>
&gt; We do use the document order unfortunately.<br>
&gt; <br>
&gt; If we are importing an article that has, say, an XML files with the metadata in it, a PDF with the published article and a bunch of images then we &nbsp;put the main PDF as the first document, the metadata as the last and the all the rest anywhere else.<br>
&gt; <br>
&gt; We used to only ever have one PDF with an article so we just put that first. Recently, we have started getting data where we have more than one PDF: a main one and a number of secondary ones - we can identify which is which easily enough and our importer now handles things correctly. But we have data already in Eprints which has the documents in the &quot;wrong&quot; order and so we want to reorder them.<br>
&gt; <br>
&gt; All else failing we can probably delete and re-import them but I was trying to find a way to do the re-ordering in place.<br>
&gt; <br>
&gt; Hope that all makes sense.<br>
&gt; <br>
&gt; Cheers,<br>
&gt; <br>
&gt; Ray.<br>
&gt; <br>
&gt; <br>
&gt; ________________________________________<br>
&gt; From: eprints-tech-bounces@ecs.soton.ac.uk &lt;eprints-tech-bounces@ecs.soton.ac.uk&gt; on behalf of Field A.N. &lt;af05v@ecs.soton.ac.uk&gt;<br>
&gt; Sent: 23 April 2015 10:06<br>
&gt; To: eprints-tech@ecs.soton.ac.uk<br>
&gt; Subject: [EP-tech] Re: reordering documents<br>
&gt; <br>
&gt; Hi Ray<br>
&gt; <br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;I don't believe there's any implied semantics with document ordering (though I may be wrong). &nbsp;What are you aiming to accomplish by reordering them?<br>
&gt; <br>
&gt; --<br>
&gt; Adam Field<br>
&gt; Business Relationship Manager and Community Lead EPrints Services<br>
&gt; +44 (0)23 8059 8814<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; On 20 Apr 2015, at 17:03, CARRICK Ray wrote:<br>
&gt; <br>
&gt;&gt; Hi Folks,<br>
&gt;&gt; <br>
&gt;&gt; I'm trying to reorder documents associated with an eprint but not having any success. This is using Eprints 3.2.<br>
&gt;&gt; <br>
&gt;&gt; So far I have tried:<br>
&gt;&gt; <br>
&gt;&gt; doing a search to identify the eprints I want (that bit works fine)<br>
&gt;&gt; then for each of them I want to swap the order of the first two documents.<br>
&gt;&gt; <br>
&gt;&gt; I tried<br>
&gt;&gt; <br>
&gt;&gt; my @documents = $eprint-&gt;get_all_documents; my $tmp = $documents[0];<br>
&gt;&gt; $documents[0] = $documents[1]; $documents[1] = $tmp;<br>
&gt;&gt; <br>
&gt;&gt; $eprint-&gt;set_value('documents', \@documents); $eprint-&gt;commit;<br>
&gt;&gt; <br>
&gt;&gt; that doesn't seem to do anything. I also tried the above but also changing the 'pos'<br>
&gt;&gt; values associated with the documents.<br>
&gt;&gt; <br>
&gt;&gt; Any ideas how to do this? I could delete the relevant eprints and re-import them but I'd quite like to do the chnage implace if possible.<br>
&gt;&gt; <br>
&gt;&gt; Thanks,<br>
&gt;&gt; <br>
&gt;&gt; Ray.<br>
&gt;&gt; <br>
&gt;&gt; The University of Edinburgh is a charitable body, registered in<br>
&gt;&gt; Scotland, with registration number SC005336.<br>
&gt;&gt; *** Options:<br>
&gt;&gt; </font></tt><tt><font size="2"><a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a></font></tt><tt><font size="2"><br>
&gt;&gt; *** Archive: </font></tt><tt><font size="2"><a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a></font></tt><tt><font size="2"><br>
&gt;&gt; *** EPrints community wiki: </font></tt><tt><font size="2"><a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a></font></tt><tt><font size="2"><br>
&gt;&gt; *** EPrints developers Forum: </font></tt><tt><font size="2"><a href="http://forum.eprints.org/">http://forum.eprints.org/</a></font></tt><tt><font size="2"><br>
&gt; <br>
&gt; <br>
&gt; *** Options: </font></tt><tt><font size="2"><a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a></font></tt><tt><font size="2"><br>
&gt; *** Archive: </font></tt><tt><font size="2"><a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a></font></tt><tt><font size="2"><br>
&gt; *** EPrints community wiki: </font></tt><tt><font size="2"><a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a></font></tt><tt><font size="2"><br>
&gt; *** EPrints developers Forum: </font></tt><tt><font size="2"><a href="http://forum.eprints.org/">http://forum.eprints.org/</a></font></tt><tt><font size="2"><br>
&gt; <br>
&gt; --<br>
&gt; The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.<br>
&gt; <br>
&gt; <br>
&gt; *** Options: </font></tt><tt><font size="2"><a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a></font></tt><tt><font size="2"><br>
&gt; *** Archive: </font></tt><tt><font size="2"><a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a></font></tt><tt><font size="2"><br>
&gt; *** EPrints community wiki: </font></tt><tt><font size="2"><a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a></font></tt><tt><font size="2"><br>
&gt; *** EPrints developers Forum: </font></tt><tt><font size="2"><a href="http://forum.eprints.org/">http://forum.eprints.org/</a></font></tt><tt><font size="2"><br>
&gt; <br>
&gt; *** Options: </font></tt><tt><font size="2"><a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a></font></tt><tt><font size="2"><br>
&gt; *** Archive: </font></tt><tt><font size="2"><a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a></font></tt><tt><font size="2"><br>
&gt; *** EPrints community wiki: </font></tt><tt><font size="2"><a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a></font></tt><tt><font size="2"><br>
&gt; *** EPrints developers Forum: </font></tt><tt><font size="2"><a href="http://forum.eprints.org/">http://forum.eprints.org/</a></font></tt><tt><font size="2"><br>
&gt; <br>
&gt; *** Options: </font></tt><tt><font size="2"><a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a></font></tt><tt><font size="2"><br>
&gt; *** Archive: </font></tt><tt><font size="2"><a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a></font></tt><tt><font size="2"><br>
&gt; *** EPrints community wiki: </font></tt><tt><font size="2"><a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a></font></tt><tt><font size="2"><br>
&gt; *** EPrints developers Forum: </font></tt><tt><font size="2"><a href="http://forum.eprints.org/">http://forum.eprints.org/</a></font></tt><tt><font size="2"><br>
<br>
<br>
*** Options: </font></tt><tt><font size="2"><a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a></font></tt><tt><font size="2"><br>
*** Archive: </font></tt><tt><font size="2"><a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a></font></tt><tt><font size="2"><br>
*** EPrints community wiki: </font></tt><tt><font size="2"><a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a></font></tt><tt><font size="2"><br>
*** EPrints developers Forum: </font></tt><tt><font size="2"><a href="http://forum.eprints.org/">http://forum.eprints.org/</a></font></tt><tt><font size="2"><br>
</font></tt><br>
</body></html>