View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0025996||mantisbt||api rest||public||2019-08-14 07:09||2019-08-25 12:36|
|Target Version||2.22.0||Fixed in Version||2.22.0|
|Summary||0025996: Missing tag name in error message when creating issue via REST API|
When creating a new issue via REST API with a non-existing tag name, the error message does not include the tag name, which makes it harder to troubleshoot the problem in the payload.
|Steps To Reproduce|
This problem was also identified by @vboctor in https://github.com/mantisbt/mantisbt/pull/1391#issuecomment-426497674
|Tags||No tags attached.|
The same problem occurs if the user attempting to create the issue does not have the required privileges to create tags, as the code references an undefined
MantisBT: master f2756da0
|Add missing tag name in error message
When creating a new issue via REST API with a non-existing tag name,
the error message generated by mci_tag_set_for_issue() did not include
the tag's name.
This was caused by reusing the $t_tag variable to store the return value
of tag_get_by_name(), so the original data is no longer available when
the exception is thrown.
Same problem in IssueAddCommand::validate() if the user attempting to
create the issue does not have the required privileges to create tags,
this time due to usage of an uninitialized variable.
|mod - api/soap/mc_tag_api.php||Diff File|
|mod - core/commands/IssueAddCommand.php||Diff File|