<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none"><!--* {}P{margin-top:0;margin-bottom:0;} .ms-cui-menu {background-color:#ffffff;border:1px rgb(171, 171, 171) solid;font-family:'Segoe UI WPC', 'Segoe UI', Tahoma, 'Microsoft Sans Serif', Verdana, sans-serif;font-size:11pt;color:rgb(51, 51, 51);} .ms-cui-menusection-title {display:none;} .ms-cui-ctl {vertical-align:text-top;text-decoration:none;color:rgb(51, 51, 51);} .ms-cui-ctl-on {background-color:rgb(239, 239, 239);opacity: 0.8;} .ms-cui-img-cont-float {display:inline-block;margin-top:2px} .ms-cui-smenu-inner {padding-top:0px;} .ms-owa-paste-option-icon {margin: 2px 4px 0px 4px;vertical-align:sub;padding-bottom: 2px;display:inline-block;} .ms-rtePasteFlyout-option:hover {background-color:rgb(239, 239, 239) !important;opacity:1 !important;} .ms-rtePasteFlyout-option {padding:8px 4px 8px 4px;outline:none;} .ms-cui-menusection {float:left; width:85px;height:24px;overflow:hidden}--></style>
</head>
<body>
<div style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hello, everyone.</p>
<p><br>
</p>
<p>I've been struggling with REST RT to achieve support for multi-valued CF. It handles them well while editing an existing ticket, but fails to handle them when creating a new ticket (treating them as a whole).<br>
</p>
<p>So I've patched the file <span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 16px; background-color: #ffffff;">"</span><font face="courier new,monospace" style="font-size: 16px; background-color: #ffffff;"><strong>html/REST/1.0/Forms/ticket/default</strong></font><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 16px; background-color: #ffffff;">"</span>
 in my own extension to get it working:​<br>
</p>
<p><br style="font-family: calibri, arial, helvetica, sans-serif; font-size: 16px;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">@@ -169,7 +169,19 @@</span></span><br style="font-size: 16px; font-family: 'courier new', monospace;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">                     delete $data{$k};</span></span><br style="font-size: 16px; font-family: 'courier new', monospace;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">                     next;</span></span><br style="font-size: 16px; font-family: 'courier new', monospace;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">                 }</span></span><br style="font-size: 16px; font-family: 'courier new', monospace;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">-                $v{"CustomField-".$cf->Id()} = delete $data{$k};  </span></span><br style="font-size: 16px; font-family: 'courier new', monospace;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">+                if ( $cf->SingleValue ) {</span></span><br style="font-size: 16px; font-family: 'courier new', monospace;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">+                  $v{"CustomField-".$cf->Id()} = delete $data{$k};</span></span><br style="font-size: 16px; font-family: 'courier new', monospace;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">+                }</span></span><br style="font-size: 16px; font-family: 'courier new', monospace;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">+                else {  </span></span><br style="font-size: 16px; font-family: 'courier new', monospace;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">+                  my @cfvalues = split '</span></span><strong style="font-family: 'courier new', monospace;"><span style="font-family: 'courier new', monospace;">,</span></strong><span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">',$data{$k};</span></span><br style="font-size: 16px; font-family: 'courier new', monospace;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">+                  $v{"CustomField-".$cf->Id()} = \@cfvalues;</span></span><br style="font-size: 16px; font-family: 'courier new', monospace;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">+                  delete $data{$k};</span></span><br style="font-size: 16px; font-family: 'courier new', monospace;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">+                }</span></span><br style="font-size: 16px; font-family: 'courier new', monospace;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">             }</span></span><br style="font-size: 16px; font-family: 'courier new', monospace;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">             elsif (lc $k eq 'text') {</span></span><br style="font-size: 16px; font-family: 'courier new', monospace;">
<span style="font-size: 16px; font-family: 'courier new', monospace; background-color: #ffffff;"><span style="font-family: 'courier new', monospace;">                 $text = delete $data{$k};</span></span><br>
<br>
</p>
<p><br>
</p>
<div>
<p>I'm <span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 16px; background-color: #ffffff;">assuming that the differente values will come separated by simple comma '</span><strong style="font-family: calibri, arial, helvetica, sans-serif; font-size: 16px; background-color: #ffffff;">,</strong><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 16px; background-color: #ffffff;">',
 as this is the way it works on edition. I know this could lead to bad behaviours if any of the values has any comma, so in my own implementation I'm using
<em>whitespace&comma&whitespace</em>.</span><br>
</p>
<p><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 16px; background-color: #ffffff;"><br>
</span></p>
<p><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 16px; background-color: #ffffff;">I don't know whether this could be included in future versions of RT, but I want to share it just in case someone finds it useful.</span></p>
<p><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 16px; background-color: #ffffff;"><br>
</span></p>
<p><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 16px; background-color: #ffffff;">Cheers!</span></p>
<div name="divtagdefaultwrapper" style="font-family: calibri, arial, helvetica, sans-serif; margin: 0px;">
<div style="font-family: tahoma; font-size: 13px;">
<div style="font-family: tahoma; font-size: 13px;">
<div style="font-family: tahoma; font-size: 13px;"><span style="background-color: white;"></span>
<table cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td align="left" style="text-align: justify;"><font color="#ff8200" size="2"><br>
<b>Iñaki de Eguía Díez</b></font><br>
<font size="1">Desarrollador - Entornos Abiertos</font><font size="1"><br>
<a href="mailto:inaki.deeguia@csa.es">inaki.deeguia@csa.es</a></font></td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
<p style="font-size:7pt; font-family: 'Verdana',serif;"><br>
<br>
En cumplimiento de la Ley Orgánica 15/1999, de 13 de diciembre, de Protección de Datos de Carácter Personal, los datos personales reflejados en este documento se incluirán en una base de datos informatizada de titularidad de Centro Regional de Servicios Avanzados,
 S.A. Dicha base de datos se encuentra inscrita en el Registro General de Protección de Datos conforme a lo dispuesto en la legislación vigente y cumpliendo todas las medidas de seguridad del Real Decreto 994/1999, de 11 de junio, de medidas de seguridad de
 los ficheros automatizados que contengan datos de carácter personal. Asimismo, el cliente dispone en todo momento de los derechos de información, acceso, rectificación, cancelación y oposición, que podrá ejercitar por escrito mediante carta dirigida al Responsable
 de Seguridad, en la siguiente dirección: C/ López Bravo, 1. 09001 Burgos (España).
</p>
</body>
</html>