Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 #26077 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
- Loading branch information