View Issue Details

IDProjectCategoryView StatusLast Update
0026120mantisbttaggingpublic2019-09-09 05:32
Reporterdregad Assigned To 
Status newResolutionopen 
Product Version2.11.0 
Summary0026120: Confusing error message when adding non-existing tag without tag_create_threshold

When a user that does not have the access level defined in $g_tag_create_threshold tries to attach a non-existing tag to an issue, Mantis fails with

APPLICATION ERROR 29 - Invalid value for 'tags'

The error is thrown by TagAttachCommand at line 106

While not technically wrong, this error is confusing, and a more circumstanciated message would be nice. It's worth mentioning that the Exception's message is much more useful, but is not displayed to the end-user when the error is triggered by the GUI.

Maybe using a specific error code instead of the generic ERROR_INVALID_FIELD_VALUE would be best.

Steps To Reproduce
  • As admin, set _tag_createthreshold to DEVELOPER
  • Login as REPORTER
  • Go to view issue page for any open issue
  • In the Attach Tags text input, type the name of a tag that does exist in the system
  • Click Attach
Additional Information

Before the introduction of TagAttachCommand in Mantis 2.11.0, a specific error message was displayed by tag_attach.php, including the offending tag name(s) :

Tag attachment failed.
Create permission denied. a1

and the user could edit the tags and resubmit.

TagsNo tags attached.




2019-09-09 05:16

developer   ~0062754

@vboctor your thoughts on this would be appreciated.

Issue History

Date Modified Username Field Change
2019-09-09 05:16 dregad New Issue
2019-09-09 05:16 dregad Note Added: 0062754
2019-09-09 05:20 dregad Steps to Reproduce Updated View Revisions
2019-09-09 05:29 dregad Product Version => 2.11.0
2019-09-09 05:29 dregad Additional Information Updated View Revisions
2019-09-09 05:31 dregad Tag Attached: a1
2019-09-09 05:32 dregad Tag Detached: a1