View Issue Details

IDProjectCategoryView StatusLast Update
0003111mantisbtbugtrackerpublic2003-12-13 04:38
Reporterhacker Assigned Tovboctor  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformAnyOSAny 
Product Version0.18.0a4 
Summary0003111: Bug links in bugnotes do not contain the FQDN as they do in the full reference
Description

When submitting a bugnote with a link to another bug, using the '#23' syntax, the bug report goes out in email with the full FQDN url at the top, but if anyone adds a bugnote to that, pointing to another bug, the url is "broken", and does not contain the domain protocol, schema, or domain in the reference.

Steps To Reproduce
  1. Create a bug.
  2. Add a bugnote with a link to another bug (ex: #200)
  3. Check the email that is sent out.
  4. Note how the bugnote link to the other bug report is broken
Additional Information

The email will look like:

A BUGNOTE has been added to this bug.

http://bugs.foo.org/bug_view_advanced_page.php?bug_id=578

... bug details here. Note the difference in the way the
original bug is linked above, and the way the bugnote
itself is linked below...


hacker - 04-08-2003 07:27 EDT

Is it only in bugnote fields? #bug_view_advanced_page.php?bug_id=23

TagsNo tags attached.

Activities

hacker

hacker

2003-04-08 13:34

reporter   ~0004141

Here's an example: 0003111

hacker

hacker

2003-04-09 16:44

reporter   ~0004149

Patch to fix this attached below (wrapping might mangle it, but you get the idea. Pass t_vhostpath down into string_get_bug_view_link and prepend it to the url passed in, so the vhost path is absolute):

--- /src/cvs/mantisbt/core/string_api.php 2003-03-22 09:01:04.000000000 -0500
+++ core/string_api.php 2003-04-09 10:40:29.000000000 -0400
@@ -282,8 +282,9 @@

return an href anchor that links to a bug VIEW page for the given bug

    #  account for the user preference and site override
    function string_get_bug_view_link( $p_bug_id, $p_user_id=null ) {
  • $t_vhostpath = config_get( 'path' );
    $t_summary = string_attribute( bug_get_field( $p_bug_id, 'summary' ) );
  • return '<a href="' . string_get_bug_view_url( $p_bug_id, $p_user_id ) . '" title="' . $t_summary . '">' . bug_format_id( $p_bug_id ) . '</a>';
  • return '<a href="' . $t_vhostpath . string_get_bug_view_url( $p_bug_id, $p_user_id ) . '" title="' . $t_summary . '">' . bug_format_id( $p_bug_id ) . '</a>';
    }

    # --------------------
vboctor

vboctor

2003-04-24 04:24

manager   ~0004248

Fixed in CVS. Will be available in 0.18.0a5.

Related Changesets

MantisBT: master 20937d36

2003-04-23 22:24

vboctor


Details Diff
Fix 0003111: Bug links in bugnotes do not contain the FQDN as they do in the full reference.

M core/string_api.php
- (string_get_bug_view_url_with_fqdn): Add this method that depends on the
implementation of string_get_bug_view_url() but prefixes it with $g_path.
- (string_process_bug_link): Changed to use string_get_bug_view_url_with_fqdn()
when no anchor is required.

M core/email_api.php
- (email_build_bug_message): Changed to use string_get_bug_view_url_with_fqdn().
- (email_bug_reminder): Changed to use string_get_bug_view_url_with_fqdn().

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2164 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0003111
mod - core/email_api.php Diff File
mod - doc/ChangeLog Diff File
mod - core/string_api.php Diff File