Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-14374

When using explicit tables, PATCH requests are failing due to interpreting integers incorrectly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.0.0
    • Fix Version/s: 7.0.0
    • Component/s: None
    • Labels:
    • Target Version/s:
    • Story Points:
      3
    • Sprint:
      2020.03 - IDM
    • Reference:
      PyBot/OpenIDM/testcases/functional/managed_objects/crud_on_user/update_with_patch_increment.robot

      Description

      Tested using the "increment" operator, but it likely effect other operations.

      When trying to PATCH a value in an explicit table, and there is a current value, the user is given a 400 response:

      {
        "code": 400,
        "reason": "Bad Request",
        "message": "The field '/testnum' is not a number"
      } 

      If there is no current value, the operation succeeds.

      Sending the curl:

      curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --header "Content-Type: application/json" --data '[{"operation":"increment","field":"testnum","value":9}]' --request PATCH "http://localhost:8080/openidm/managed/user/ricksutter" | jq 

      The code is setting the value to "BigDecimal" which the increment methods are not set to handle (Just Long, Integer, Float, and Double)

        Attachments

          Activity

            People

            • Assignee:
              jason.vincent jason vincent
              Reporter:
              scott.mccollough Scott McCollough
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: