<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hello Roman,<br>
      <br>
      yes, this seems like a bug. Please, could you create a jira issue
      for that? If possible, include a snippet of your configuration so
      that we could easily replicate it.<br>
      <br>
      Thank you,<br>
      Pavol<br>
      <br>
    </div>
    <blockquote cite="mid:5593FAC5.6090406@ami.cz" type="cite">
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
      Hi Pavol,<br>
      I am using last stable release 3.1.1.<br>
      <br>
      Problem is maybe found:<br>
      When I use mapping in "central" template (configured in System
      Configuration), adding and removing works well. When I use the
      same mapping in template in resource, adding works well, but
      removing not. It is probably bug?<br>
      <br>
      Regards<br>
      Roman.<br>
      <br>
      <div class="moz-signature">
        <title></title>
        <meta http-equiv="Content-Type" content="text/html;
          charset=utf-8">
        <p> </p>
        <table style="border-collapse:collapse;">
          <tbody>
            <tr>
              <td colspan="2" style="font-family:Arial, sans-serif;
                font-size:11px; color:#000000; vertical-align:bottom;">
                <p> <span style="font-size:14px; font-weight:bold;">Roman

                    Pudil</span><br>
                  solution architect<br>
                  <br>
                  gsm: [+420] 775 663 666<br>
                  e-mail: <a moz-do-not-send="true"
                    href="mailto:roman.pudil@ami.cz">roman.pudil@ami.cz</a>
                </p>
              </td>
              <td style="border-right:1px solid #cccccc;">   </td>
              <td>   </td>
              <td style="font-family:Arial, sans-serif; font-size:11px;
                color:#000000; vertical-align:bottom;">
                <p> AMI Praha a.s.<br>
                  Pláničkova 11<br>
                  162 00 Praha 6<br>
                  tel./fax: [+420] 274 783 239<br>
                  web: <a moz-do-not-send="true"
                    href="http://www.ami.cz">www.ami.cz</a> </p>
              </td>
              <td style="border-right:1px solid #cccccc;">   </td>
              <td>   </td>
              <td style="font-family:Arial, sans-serif; font-size:11px;
                color:#000000;">
                <p> <img src="cid:part3.04080807.02060505@evolveum.com"
                    alt="AMI Praha a.s." title="AMI Praha a.s."> </p>
              </td>
            </tr>
            <tr>
              <td colspan="8"><br>
                <a moz-do-not-send="true"
href="http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management"><img
                    src="cid:part4.07070708.03060403@evolveum.com"
                    alt=""></a></td>
            </tr>
            <tr>
              <td colspan="8" style="font-family:Arial, sans-serif;
                font-size:11px; color:#808080;"> <br>
                Textem tohoto e-mailu podepisující neslibuje uzavřít ani
                neuzavírá za společnost AMI Praha a.s.<br>
                jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena,
                musí mít výhradně písemnou formu.</td>
            </tr>
          </tbody>
        </table>
      </div>
      <div class="moz-cite-prefix">Dne 1.7.2015 v 16:23 Pavol Mederly
        napsal(a):<br>
      </div>
      <blockquote cite="mid:5593F7FE.5010202@evolveum.com" type="cite">
        <meta content="text/html; charset=utf-8"
          http-equiv="Content-Type">
        <div class="moz-cite-prefix">Hmmm. That's interesting. Which
          version of midPoint do you use? I'm using
          v3.2devel-829-g24f4945.<br>
          <br>
          Best regards,<br>
          Pavol<br>
          <br>
          On 1. 7. 2015 16:21, Roman Pudil - AMI Praha a.s. wrote:<br>
        </div>
        <blockquote cite="mid:5593F76C.8010100@ami.cz" type="cite">
          <meta content="text/html; charset=utf-8"
            http-equiv="Content-Type">
          Hi Pavol,<br>
          unfortunately, this code does not remove user assignment from
          org (adding user to org works well).<br>
          <br>
          Regards<br>
          Roman<br>
          <div class="moz-signature">
            <title></title>
            <meta http-equiv="Content-Type" content="text/html;
              charset=utf-8">
            <p> </p>
            <table style="border-collapse:collapse;">
              <tbody>
                <tr>
                  <td colspan="2" style="font-family:Arial, sans-serif;
                    font-size:11px; color:#000000;
                    vertical-align:bottom;">
                    <p> <span style="font-size:14px; font-weight:bold;">Roman



                        Pudil</span><br>
                      solution architect<br>
                      <br>
                      gsm: [+420] 775 663 666<br>
                      e-mail: <a moz-do-not-send="true"
                        href="mailto:roman.pudil@ami.cz">roman.pudil@ami.cz</a>
                    </p>
                  </td>
                  <td style="border-right:1px solid #cccccc;">   </td>
                  <td>   </td>
                  <td style="font-family:Arial, sans-serif;
                    font-size:11px; color:#000000;
                    vertical-align:bottom;">
                    <p> AMI Praha a.s.<br>
                      Pláničkova 11<br>
                      162 00 Praha 6<br>
                      tel./fax: [+420] 274 783 239<br>
                      web: <a moz-do-not-send="true"
                        href="http://www.ami.cz">www.ami.cz</a> </p>
                  </td>
                  <td style="border-right:1px solid #cccccc;">   </td>
                  <td>   </td>
                  <td style="font-family:Arial, sans-serif;
                    font-size:11px; color:#000000;">
                    <p> <img
                        src="cid:part8.07000905.00080202@evolveum.com"
                        alt="AMI Praha a.s." title="AMI Praha a.s."> </p>
                  </td>
                </tr>
                <tr>
                  <td colspan="8"><br>
                    <a moz-do-not-send="true"
href="http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management"><img
                        src="cid:part9.01060103.02020406@evolveum.com"
                        alt=""></a></td>
                </tr>
                <tr>
                  <td colspan="8" style="font-family:Arial, sans-serif;
                    font-size:11px; color:#808080;"> <br>
                    Textem tohoto e-mailu podepisující neslibuje uzavřít
                    ani neuzavírá za společnost AMI Praha a.s.<br>
                    jakoukoliv smlouvu. Každá smlouva, pokud bude
                    uzavřena, musí mít výhradně písemnou formu.</td>
                </tr>
              </tbody>
            </table>
          </div>
          <div class="moz-cite-prefix">Dne 1.7.2015 v 15:09 Pavol
            Mederly napsal(a):<br>
          </div>
          <blockquote cite="mid:5593E694.8050401@evolveum.com"
            type="cite">
            <meta content="text/html; charset=utf-8"
              http-equiv="Content-Type">
            <div class="moz-cite-prefix">Hello Roman,<br>
              <br>
              maybe I don't understand your question completely, but for
              me it works. This is a sample template that is able to add
              as well as remove Org assignment to/from a user based on
              his organizationalUnit attribute value:<br>
              <tt><br>
              </tt><tt> </tt>
              <div class="moz-text-html" lang="x-unicode">
                <div dir="ltr"><tt>   <mapping></tt><tt><br>
                  </tt><tt>      <source></tt><tt><br>
                  </tt><tt>        
                    <c:path>$user/organizationalUnit</c:path></tt><tt><br>
                  </tt><tt>      </source></tt><tt><br>
                  </tt><tt>      <expression></tt><tt><br>
                  </tt><tt>         <assignmentTargetSearch></tt><tt><br>
                  </tt><tt>           
                    <targetType>OrgType</targetType></tt><tt><br>
                  </tt><tt>            <filter></tt><tt><br>
                  </tt><tt>               <q:equal></tt><tt><br>
                  </tt><tt>                 
                    <q:path>c:name</q:path></tt><tt><br>
                  </tt><tt>                  <expression></tt><tt><br>
                  </tt><tt>                     <script></tt><tt><br>
                  </tt><tt>                        <code></tt><tt><br>
                  </tt><tt>                           log.info</tt><tt>('looking




                    for {}', organizationalUnit)</tt><tt><br>
                  </tt><tt>                           return
                    organizationalUnit</tt><tt><br>
                  </tt><tt>                        </code></tt><tt><br>
                  </tt><tt>                     </script></tt><tt><br>
                  </tt><tt>                  </expression></tt><tt><br>
                  </tt><tt>               </q:equal></tt><tt><br>
                  </tt><tt>            </filter></tt><tt><br>
                  </tt><tt>         </assignmentTargetSearch></tt><tt><br>
                  </tt><tt>      </expression></tt><tt><br>
                  </tt><tt>      <target></tt><tt><br>
                  </tt><tt>        
                    <c:path>assignment</c:path></tt><tt><br>
                  </tt><tt>      </target></tt><tt><br>
                  </tt><tt>   </mapping></tt><br>
                </div>
              </div>
              <br>
              Best regards,<br>
              Pavol<br>
              <br>
            </div>
            <blockquote cite="mid:5591432F.30104@ami.cz" type="cite">
              <meta http-equiv="content-type" content="text/html;
                charset=utf-8">
              Hi all,<br>
              how to remove user from organization based on attribute
              value?<br>
              User add to org in mapping template object works great (I
              am using assignmentTargetSearch). How to remove user?<br>
              <br>
              Thanks!<br>
              R. Pudil<br>
              <div class="moz-signature">-- <br>
                <title></title>
                <meta http-equiv="Content-Type" content="text/html;
                  charset=utf-8">
                <p> </p>
                <table style="border-collapse:collapse;">
                  <tbody>
                    <tr>
                      <td colspan="2" style="font-family:Arial,
                        sans-serif; font-size:11px; color:#000000;
                        vertical-align:bottom;">
                        <p> <span style="font-size:14px;
                            font-weight:bold;">Roman Pudil</span><br>
                          solution architect<br>
                          <br>
                          gsm: [+420] 775 663 666<br>
                          e-mail: <a moz-do-not-send="true"
                            href="mailto:roman.pudil@ami.cz">roman.pudil@ami.cz</a>
                        </p>
                      </td>
                      <td style="border-right:1px solid #cccccc;">   </td>
                      <td>   </td>
                      <td style="font-family:Arial, sans-serif;
                        font-size:11px; color:#000000;
                        vertical-align:bottom;">
                        <p> AMI Praha a.s.<br>
                          Pláničkova 11<br>
                          162 00 Praha 6<br>
                          tel./fax: [+420] 274 783 239<br>
                          web: <a moz-do-not-send="true"
                            href="http://www.ami.cz">www.ami.cz</a> </p>
                      </td>
                      <td style="border-right:1px solid #cccccc;">   </td>
                      <td>   </td>
                      <td style="font-family:Arial, sans-serif;
                        font-size:11px; color:#000000;">
                        <p> <img
                            src="cid:part13.00050606.08020901@evolveum.com"
                            alt="AMI Praha a.s." title="AMI Praha a.s.">
                        </p>
                      </td>
                    </tr>
                    <tr>
                      <td colspan="8"><br>
                        <a moz-do-not-send="true"
href="http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management"><img
src="cid:part14.02070205.00080403@evolveum.com" alt=""></a></td>
                    </tr>
                    <tr>
                      <td colspan="8" style="font-family:Arial,
                        sans-serif; font-size:11px; color:#808080;"> <br>
                        Textem tohoto e-mailu podepisující neslibuje
                        uzavřít ani neuzavírá za společnost AMI Praha
                        a.s.<br>
                        jakoukoliv smlouvu. Každá smlouva, pokud bude
                        uzavřena, musí mít výhradně písemnou formu.</td>
                    </tr>
                  </tbody>
                </table>
              </div>
              <br>
              <fieldset class="mimeAttachmentHeader"></fieldset>
              <br>
              <pre wrap="">_______________________________________________
midPoint mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
            </blockquote>
            <br>
            <br>
            <fieldset class="mimeAttachmentHeader"></fieldset>
            <br>
            <pre wrap="">_______________________________________________
midPoint mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
          </blockquote>
          <br>
          <br>
          <fieldset class="mimeAttachmentHeader"></fieldset>
          <br>
          <pre wrap="">_______________________________________________
midPoint mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
        </blockquote>
        <br>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
midPoint mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
      </blockquote>
      <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>
  </body>
</html>