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

EffectiveStatus is not computed after changing validTo value

    XMLWordPrintable

    Details

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

      CentOS + Tomcat 8 + Java 8

    • Git Revision:
      3.5

      Description

      We extended the schema with a dateTime attribute and then we set the validTo date on the User Template with this value (our business logic is more complex but it also happens with this example). When I set a date on the custom attribute before today the user is disabled and that's ok. If the user is disabled and I set a new date in the future on the same field it is mapped to the validTo but it is not enabled. I added more log to the ActivationComputer class and I can see that the getEffectiveStatus() method returns "ENABLED".

      Here is the activation node at the beginning:

      <activation>
      <effectiveStatus>disabled</effectiveStatus>
      <validTo>2016-04-30T00:00:00.000-03:00</validTo>
      <validityStatus>after</validityStatus>

      <disableTimestamp>2017-01-23T16:49:49.776-03:00</disableTimestamp>
      <enableTimestamp>2017-01-23T16:49:09.338-03:00</enableTimestamp>
      <validityChangeTimestamp>2017-01-23T16:49:49.776-03:00</validityChangeTimestamp>
      </activation>

      And this is after the modification:

      <activation>
      <effectiveStatus>disabled</effectiveStatus>
      <validTo>2017-02-01T00:00:00.000-03:00</validTo>
      <validityStatus>after</validityStatus>

      <disableTimestamp>2017-01-23T16:49:49.776-03:00</disableTimestamp>
      <enableTimestamp>2017-01-23T16:49:09.338-03:00</enableTimestamp>
      <validityChangeTimestamp>2017-01-23T16:49:49.776-03:00</validityChangeTimestamp>
      </activation>

      Attached is the schema extension and the user template. These are the steps to reproduce it:

      1. Extend the Schema (user.xsd)
      2. Import the User Template (user_template.xml)
      3. Create new User
      4. Modify the user and set the flag "Activo en Gestion Humana" and set "Fecha Baja GH" with a date before today
      5. User should be disabled
      6. Edit the user again and set "Fecha Baja GH" with a date in the future
      7. User should be enabled but it is disabled

        Attachments

          Activity

            People

            Assignee:
            nrossi Nicolás Rossi
            Reporter:
            nrossi Nicolás Rossi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: