<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:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        color:black;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US">Hi Clinton,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US">Have you seen this:
<a href="https://github.com/eprints/orcid_support">https://github.com/eprints/orcid_support</a> - and specifically
<a href="https://github.com/eprints/orcid_support/blob/master/lib/plugins/EPrints/MetaField/Orcid.pm">
https://github.com/eprints/orcid_support/blob/master/lib/plugins/EPrints/MetaField/Orcid.pm</a> ?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US">If you are re-purposing a field, I'd be careful e.g. if the new fieldtype has a lower character limit, you could lose data.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US">I normally have a preliminary check of the data - in the database - trying to find data that wouldn't fit into the new field type.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US">Are you aware of validation triggers?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US">E.g. <a href="https://github.com/eprintsug/datesdatesdates/blob/master/lib/cfg.d/zz_datesdatesdates_triggers.pl#L49">
https://github.com/eprintsug/datesdatesdates/blob/master/lib/cfg.d/zz_datesdatesdates_triggers.pl#L49</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US">John<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
<b>On Behalf Of </b>Graham, Clinton T<br>
<b>Sent:</b> 18 November 2016 14:36<br>
<b>To:</b> Eprints Tech Mailing List <eprints-tech@ecs.soton.ac.uk><br>
<b>Subject:</b> [EP-tech] Custom validation and new MetaFields (institutional id, orcid id)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Tahoma",sans-serif;color:black">We are soliciting an Institutional ID and ORCID ID for our users and for our deposits. Each of these require custom validation. It seems
the best place for this validation is in field_validate.pl, presumably by creating new MetaFields for each of these entries and keying on the new MetaField types.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Tahoma",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Tahoma",sans-serif;color:black">Is this standard practice? A brief search doesn't pull documentation or examples of subclassing new MetaFields.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Tahoma",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Tahoma",sans-serif;color:black">Are there any concerns with adjusting the field types for these fields, for which data already exists in deposited records?<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Tahoma",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Tahoma",sans-serif;color:black">Enjoy,</span><span lang="EN-US" style="font-family:"Tahoma",sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif;color:black">- Clinton Graham<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif;color:black">Systems Developer<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif;color:black">University of Pittsburgh | University Library System<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif;color:black">412-383-1057<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US" style="color:black"><o:p> </o:p></span></p>
</div>
</body>
</html>