View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026077 | mantisbt | api rest | public | 2019-08-24 21:52 | 2019-08-25 12:36 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Target Version | 2.22.0 | Fixed in Version | 2.22.0 | ||
Summary | 0026077: IssueAddCommand should create tag specified by name if they do not exist | ||||
Description | IssueAddCommand should processes each provided tag as follows:
If all tags pass the above checks, create the issue and attach the tags to it. | ||||
Additional Information | This follows a discussion with @vboctor on Gitter https://gitter.im/mantisbt?at=5d5bad020eff7d2dfee2ce73 | ||||
Tags | No tags attached. | ||||
MantisBT: master ef00dc18 2019-08-20 02:31 Details Diff |
Remove special handling of '-1' As discussed with @vboctor on Gitter [1], the Command should create the tag if specified by name and it does not exist (and user is allowed to do so). IssueAddCommand now processes each provided tag as follows: - if *ID* (or ID + name) is provided, check for existing tag and attach it to the issue, return 404 (ERROR_TAG_NOT_FOUND) if not found. - if *name* is provided, check its validity (tag_name_is_valid()) and return 400 bad request (ERROR_TAG_NAME_INVALID) if not. - if neither *ID* nor *name* are given, return 400 bad request (ERROR_TAG_NAME_INVALID). - if the provided name does not exist, create the tag; return 404 (ERROR_TAG_NOT_FOUND) if user is not allowed to. If all tags pass the above checks, create the issue and attach the tags to it. Fixes 0026077 This commits includes an adjustment to bug_report.php: the payload for the issue's tags no longer includes the id, as negative values would now cause the Command to throw an exception. [1]: https://gitter.im/mantisbt?at=5d5bad020eff7d2dfee2ce73 |
Affected Issues 0026077 |
|
mod - bug_report.php | Diff File | ||
mod - core/commands/IssueAddCommand.php | Diff File |