View Issue Details

IDProjectCategoryView StatusLast Update
0023301mantisbtapi restpublic2017-10-08 23:53
Reporterelmarculino Assigned Tocommunity  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.5.1 
Target Version2.7.0Fixed in Version2.7.0 
Summary0023301: Request an issue in the REST API fail without warning if an enumeration is missing.
Description

When requesting an issue in the REST API if an enumeration is missing the request will simple fail.

Steps To Reproduce

Change the value of an enumeration ('status' or status custom color, 'reproducibility' etc. ) to a value that is not properly configured. Try to get that issue with the REST API. The issue request will fail with a Slim default error.

TagsNo tags attached.

Activities

atrol

atrol

2017-09-01 18:07

developer   ~0057595

PR https://github.com/mantisbt/mantisbt/pull/1175

dregad

dregad

2017-09-04 08:14

developer   ~0057607

Last edited: 2017-09-04 08:14

Problem can be reproduced in latest master (MantisBT master 5fd83b65)

Related Changesets

MantisBT: master b380aee1

2017-09-08 00:13

elmarculino

Committer: dregad


Details Diff
Fix REST API failing silently in case of missing enum value

The API call fails silently if the issue being retrieved references an
enum value or status color that does not exist in the config.

- Use MantisEnum::getLabel() method to handle unknown enum values.
- Set color to 'currentcolor' for unknown status

Fixes 0023301
Affected Issues
0023301
mod - api/soap/mc_enum_api.php Diff File