Defect #31028

Get 200 response even when specifying an id value that does not exist.

Added by ume san almost 2 years ago. Updated almost 2 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:REST API
Target version:-
Resolution: Affected version:

Description

At Redmine 4.0.1,
I get 422 response when specifying an id value that does not exist in 'assigned_to_id'
However I get 200 response even when specifying an id value that does not exist in 'project_id, tracker_id, status_id, priority_id, category_id, fixed_version_id'.

At Redmine 3.4.6,
I got 422 response when specifying an id value that does not exist in 'priority_id'

---
issue.xml

<?xml version="1.0"?>
<issue>
        <project_id>99999</project_id>
        <tracker_id>99999</tracker_id>
        <status_id>99999</status_id>
        <priority_id>99999</priority_id>
        <category_id>99999</category_id>
        <fixed_version_id>99999</fixed_version_id>
</issue>
curl -v -H "Content-Type: application/xml" -X PUT --data-binary "@issue.xml" -H "X-Redmine-API-Key: xxx" [URL]/issues/[id].xml

HTTP/1.1 200 OK

I expect to get 422 response when specifying an id value that does not exist in 'project_id, tracker_id, status_id, priority_id, category_id, fixed_version_id'.

History

#1 Updated by ume san almost 2 years ago

#19276 may also be related

#2 Updated by ume san almost 2 years ago

I checked again with Redmine 4.0.2.
I got 422 response when specifying an id value that does not exist in 'priority_id'
I got 200 response even when specifying an id value that does not exist in 'project_id, tracker_id, status_id, category_id, fixed_version_id'.

Also available in: Atom PDF