[OPENIDM-14374] When using explicit tables, PATCH requests are failing due to interpreting integers incorrectly Created: 13/Feb/20  Updated: 24/Feb/20  Resolved: 24/Feb/20

Status: Closed
Project: OpenIDM
Component/s: None
Affects Version/s: 7.0.0
Fix Version/s: 7.0.0

Type: Bug Priority: Major
Reporter: Scott McCollough Assignee: jason vincent
Resolution: Fixed Votes: 0
Labels: DIXON
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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


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)

Comment by Scott McCollough [ 24/Feb/20 ]

Cover by tests:

  • PyBot/OpenIDM/testcases/functional/managed_objects/crud_on_user
    • update_with_patch_increment.robot
Generated at Mon Nov 30 14:57:37 UTC 2020 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.