API - Reactivating a user that was deactivated a long time ago produces error 400 - UserEndDate cannot be set before 1 days in past.

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 10.120.0
    • Affects Version/s: 10.116.3
    • Component/s: REST API

      Issue Summary

      Reactivating a user that was deactivated a long time ago via a PATCH request produces error 400 - Cannot update user with id 42889. UserEndDate cannot be set before 1 days in past.

      Other PATCH requests to the user fail with the same error.

      Steps to Reproduce

      1. Have a user that's been deactivated for a while
      2. Try to use PATCH request to activate them:
        [
            {  
              "op": "replace",
              "path": "/isLocked",
              "value": 0
            }
        ] 
      1. Observe the error message:
        400 Bad Request
        Cannot update user with id 42889. UserEndDate cannot be set before 1 days in past. 

      Expected Results

      It is expected that userEndDate will be automatically cleared and the user is activated with the above request.

      The above request works fine when the user has been deactivated recently.

      In the UI there's no requirement to reset userEndDate manually.

      Actual Results

      The error 400 occurs.

      Workaround

      Reset the userEndDate manually at the same time by using the body:

      [
          {
              "op": "replace",
              "path": "/isLocked",
              "value": 0
          },
              {
              "op": "replace",
              "path": "/userEndDate",
              "value": null
          }
      ] 

            Assignee:
            Cap Smith (Inactive)
            Reporter:
            Kirill Duplyakin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: