Uploaded image for project: 'Jira Align'
  1. Jira Align
  2. JIRAALIGN-4742

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 10.120.0
    • 10.116.3
    • REST API
    • Severity 3 - Minor
    • No

      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
          }
      ] 

              csmith1@atlassian.com Cap Smith
              c7f2a2ebc58e Kirill Duplyakin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: