Project

General

Profile

Actions

Defect #23921

closed

REST API Issue PUT responds 200 OK even when it can't set assigned_to_id

Defect #23921: REST API Issue PUT responds 200 OK even when it can't set assigned_to_id

Added by Fran Fabrizio about 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Category:
REST API
Target version:
Resolution:
Fixed
Affected version:

Description

Hi,

I ran across an issue with the REST API that responded with a 200 OK when I think it should respond with an error.

If I try to PUT this to an existing issue:

{ "issue": {
 "assigned_to_id": "19" 
 }
}

it will respond 200 OK even if it can't change the assigned_to_id to 19, for instance if user ID 19 does not have an assignable role on the project. Because the API reported a 200 OK, this led to a lot of confused debugging. A 422 return with appropriate error message in the body might be more useful.


Related issues 1 (0 open — 1 closed)

Related to Redmine - Defect #26063: Users can assign a user/group which is not a member of current project, or even a user that doesn't existClosedActions

Updated by Toshi MARUYAMA about 10 years ago Actions #1

  • Description updated (diff)

Updated by Toshi MARUYAMA about 10 years ago Actions #2

  • Target version set to 3.4.0

Updated by Jean-Philippe Lang almost 10 years ago Actions #3

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Fixed by r16055.

Updated by Go MAEDA over 9 years ago Actions #4

  • Related to Defect #26063: Users can assign a user/group which is not a member of current project, or even a user that doesn't exist added
Actions

Also available in: PDF Atom