Project

General

Profile

Actions

Defect #31028

open

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

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

Status:
New
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
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'.

Actions

Also available in: Atom PDF