<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Jason,<br>
<br>
I believe I have seen this couple of weeks ago when debugging the
iterator problem... seems that I've forgotten about this.<br>
<br>
But as far I can remember, it has worked when the mapping was in
global system template instead of the resource-referenced.<br>
<br>
If you can temporarily disable using of the template in resource and
set the same template in System Configuration for UserType objects,
can you please test the behaviour?<br>
<br>
Anyway it seems to be a bug, so after you could confirm the
behaviour, I'd create a new issue.<br>
<br>
Thanks,<br>
I.<br>
<br>
<div class="moz-cite-prefix">On 12/10/2014 04:32 PM, Jason Everling
wrote:<br>
</div>
<blockquote
cite="mid:CAFkZXY5Ph8Zarrf8EF98RQ-Drco6AY4ZdLA_y5+t6329zJB6oA@mail.gmail.com"
type="cite">
<div dir="ltr">Since I upgraded to 3.1 and I am not sure if this
is related to the other CSV Resource issue.
<div><br>
</div>
<div>Here is the mapping for the template, it worked fine in
3.0.1 so I do not know if anything changed, the email address
is built using name + '@<a moz-do-not-send="true"
href="http://domain.com">domain.com</a>' but when the user
is created I get <a moz-do-not-send="true"
href="mailto:null@domain.com">null@domain.com</a>, like it
is not picking up the username from the first mapping</div>
<div><br>
</div>
<div>
<div> <mapping></div>
<div> <name>Generate Username for
CSV</name></div>
<div> <source></div>
<div> <name>tmpGivenName</name></div>
<div> <path>givenName</path></div>
<div> </source></div>
<div> <source></div>
<div> <name>tmpFamilyName</name></div>
<div> <path>familyName</path></div>
<div> </source></div>
<div> <!-- Will generate username in the filastname
format with iterator,</div>
<div> filastname</div>
<div> filastname2</div>
<div> --></div>
<div> <expression></div>
<div> <script></div>
<div> <code></div>
<div> tmpGivenNameInitial =
basic.stringify(tmpGivenName)?.size() > 0 ?</div>
<div>
(basic.stringify(tmpGivenName)).substring(0,2) : ''</div>
<div> if (iteration == 0) {</div>
<div>
basic.norm(basic.stringify(tmpGivenNameInitial +
tmpFamilyName))</div>
<div> }</div>
<div> else {</div>
<div>
basic.norm(basic.stringify(tmpGivenNameInitial +
tmpFamilyName)) + iterationToken</div>
<div> }</div>
<div> </code></div>
<div> </script></div>
<div> </expression></div>
<div> <target></div>
<div> <path>name</path></div>
<div> </target></div>
<div> </mapping></div>
<div><br>
</div>
<div> <iteration></div>
<div> <maxIterations>25</maxIterations></div>
<div> <tokenExpression></div>
<div> <script></div>
<div> <code></div>
<div> if (iteration == 0) {</div>
<div> return "";</div>
<div> } else {</div>
<div> return "" + (iteration+1)</div>
<div> }</div>
<div> </code></div>
<div> </script></div>
<div> </tokenExpression></div>
<div> </iteration></div>
<div><br>
</div>
<div> <mapping></div>
<div> <source></div>
<div> <path>$user/name</path></div>
<div> </source></div>
<div> <expression></div>
<div> <script></div>
<div> <language><a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy">http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy</a></language></div>
<div> <code>name + '@<a
moz-do-not-send="true" href="http://domain.com">domain.com</a>'</code></div>
<div> </script></div>
<div> </expression></div>
<div> <target></div>
<div> <path>emailAddress</path></div>
<div> </target></div>
<div> </mapping></div>
</div>
<div><br>
</div>
</div>
<br>
<font size="2"><br>
<br>
CONFIDENTIALITY NOTICE:<br>
This e-mail together with any attachments is proprietary and
confidential; intended for only the recipient(s) named above and
may contain information that is privileged. You should not
retain, copy or use this e-mail or any attachments for any
purpose, or disclose all or any part of the contents to any
person. Any views or opinions expressed in this e-mail are those
of the author and do not represent those of the Baptist School
of Health Professions. If you have received this e-mail in
error, or are not the named recipient(s), you are hereby
notified that any review, dissemination, distribution or copying
of this communication is prohibited by the sender and to do so
might constitute a violation of the Electronic Communications
Privacy Act, 18 U.S.C. section 2510-2521. Please immediately
notify the sender and delete this e-mail and any attachments
from your computer. </font><br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Ing. Ivan Noris
Senior Identity Management Engineer
evolveum.com evolveum.com/blog/
_____________________________________________
"Semper Id(e)M Vix."
</pre>
</body>
</html>