View Issue Details

IDProjectCategoryView StatusLast Update
0026076mantisbtapi restpublic2019-08-25 12:36
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version2.22.0Fixed in Version2.22.0 
Summary0026076: Adding issue via REST API should fail if requested tags can't be attached

Currently, the IssueAddCommand first creates the issue, then processes the tags.

If one or more of these tags are invalid or can't be attached for any reason, the request fails (404) as it should, but the issue has been created anyway (so the return code should be 201). Since the request is in error, it is not possible to retrieve the created issue's details.

The API call should fail without creating the issue.

TagsNo tags attached.


There are no notes attached to this issue.

Related Changesets

MantisBT: master b3a10d8b

2019-08-19 12:00:54


Details Diff
New method IssueAddCommand::get_tag_id()

The new method throws ClientException if the given Tag element is
invalid, thus preventing issue creation via REST API in this case.

Previously the issue would be created even though the API call was
failing with a 404 error caused by the invalid tag.

Fixes 0026076
Affected Issues
mod - core/commands/IssueAddCommand.php Diff File

Issue History

Date Modified Username Field Change
2019-08-24 21:45 dregad New Issue
2019-08-24 21:45 dregad Status new => assigned
2019-08-24 21:45 dregad Assigned To => dregad
2019-08-24 22:09 dregad Changeset attached => MantisBT master b3a10d8b
2019-08-24 22:09 dregad Status assigned => resolved
2019-08-24 22:09 dregad Resolution open => fixed
2019-08-24 22:09 dregad Fixed in Version => 2.22.0
2019-08-25 12:36 vboctor Status resolved => closed