Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-3701

Multivalued attributes are not updated correctly by Object Template

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5 (Einstein)
    • Fix Version/s: 3.6 (Comenius)
    • Component/s: Model
    • Labels:
    • Environment:

      CentOS / Tomcat 8 / Java 8 / midPoint 3.5 fresh install

      Description

      When you try to update a multivalued attribute (like employeeStatus) on the Object Template it doesn't replace all values keeping the old ones. The steps to reproduce it are very simple:

      1. Add this mapping to the Object Template which maps the givenName to the employeeType

      <mapping>
      	<source>
      		 <c:path>$user/givenName</c:path>
      	</source>
      	<expression>
      		 <script>
      				<language>http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy</language>
      				<code>
      					employeeType = []
      					employeeType.add(givenName);
      					return employeeType;
      			 </code>
      		 </script>
      	</expression>
      	<target>
      		 <c:path>employeeType</c:path>
      	</target>
      </mapping>
      

      2. Create a new user
      3. It should have his givenName as employeeType
      4. Add manually a new employeeType (i.e.: MANUAL_VALUE)
      5. Change user's givenName

      He should have one employeeType but he has the givenName and the MANUAL_VALUE. I also tried adding strength strong and relativityMode as absolute but nothing worked.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              semancik Radovan Semancik
              Reporter:
              nrossi Nicolás Rossi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: