View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0019606 | mantisbt | public | 2015-04-09 12:05 | 2016-08-15 09:02 | |
Reporter | kburkum | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Mantis Hub (Hosted) | OS | Windows | OS Version | 7 |
Target Version | 1.2.20 | Fixed in Version | 1.2.20 | ||
Summary | 0019606: Numeric References Should Not Transpose Into URL Unless Number = Valid Issue Number | ||||
Description | See attached screen shot from an email notification. Numeric references in Mantis fields should not be transcribed into URL unless the number reference is an actual / valid Issue Number in Mantis. In the attached example, there was verbiage referencing the numbered list: Anywhere those numbers were, the system transcribed those into Mantis issue URLs. Side Note - PivotalTracker had a similar issue (we manage our user stories there). The added validation to ensure the number reference was an actual story ID (#) prior to transcribing it into a link that could be clicked. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Looks like it happened above in my Description when I typed the following with the # in front of the numbers... 1 |
|
In the above case the issues 1, 2, and 3 are valid issues and if you hover on them you will see the bubbles with the issue status/title. Are you saying that in your case the referenced issue numbers didn't exist? Or was there some other criteria that makes them valid/invalid? |
|
I attached an example of the message I receive when I click one of the hyperlinks (issue 0000001 to be specific). I validated that the issue number does not exist if I do a search for "1" in the search for the issue in the search box (upper right). Hope this helps. |
|
This is reproducible in latest master. In the GUI, Mantis does not generate links for invalid bug references, and leaves the text as-is (e.g. #999999). So the problem is limited to notification e-mails; the formatting plugin calls string_process_bug_link(), and with the 2nd param ($p_include_anchor) set to false, the function unconditionally replaces the number by a link [1]. This code exists as is since 2004, and I'm not sure of the rationale for not doing the check in the first place (see the comment above [1]). [1] https://github.com/mantisbt/mantisbt/blob/master/core/string_api.php#L365 |
|
Pull request https://github.com/mantisbt/mantisbt/pull/596 |
|
For the record, the master branch commit SHA referenced in (1.2.x) commit baaebb0d is incorrect, as I had to rebase master after pushing 1.2.x. |
|
MantisBT: master-1.2.x baaebb0d 2015-04-10 05:57 Details Diff |
Don't create FQDN link when the bug doesn't exist Backport from master a929e983cd2b8781f7c37613f6c7e6fa5c6ed0dc. Fixes 0019606 |
Affected Issues 0019606 |
|
mod - core/string_api.php | Diff File | ||
MantisBT: master f66d8981 2015-04-10 05:57 Details Diff |
Don't create FQDN link when the bug doesn't exist Fixes 0019606 |
Affected Issues 0019606 |
|
mod - core/string_api.php | Diff File |