View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006368 | mantisbt | feature | public | 2005-10-27 11:54 | 2008-08-12 09:35 |
Reporter | Dirk Datzert | Assigned To | grangeway | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Product Version | 0.19.3 | ||||
Summary | 0006368: Render Links in bugnote for t_cvs_web posted by scmbug | ||||
Description | Scmbug post changes of files from Subversion commit into bugnotes r1 --> r2 repository path/filename This patch will make it possible to gather enough information in r1 --> r2 repository path/filename | ||||
Additional Information | Link to the Reference ticket of scmbug http://bugzilla.mkgnu.net/show_bug.cgi?id=266#c5 | ||||
Tags | No tags attached. | ||||
Attached Files | mantis-string-api-scmbug.patch (1,363 bytes)
--- mantis-0.19.2/core/string_api.php.orig 2005-05-07 14:19:57.000000000 +0200 +++ mantis-0.19.2/core/string_api.php 2005-05-07 17:46:51.895972489 +0200 @@ -96,6 +96,7 @@ $p_string = string_process_bug_link( $p_string ); $p_string = string_process_bugnote_link( $p_string ); $p_string = string_process_cvs_link( $p_string ); + $p_string = string_process_scmbug_link( $p_string ); return $p_string; } @@ -164,6 +165,25 @@ } # -------------------- + # process the $p_string and convert filenames in the format + # number --> number [repos] path/filename.ext to a html link + # if $p_include_anchor is true, include an <a href="..."> tag, + # otherwise, just insert the URL as text + function string_process_scmbug_link( $p_string, $p_include_anchor=true ) { + $t_cvs_web = config_get( 'cvs_web' ); + + if ( $p_include_anchor ) { + $t_replace_with = '[SCM] \\1 --> \\2 \\3 <a href="'.$t_cvs_web.'/\\3/\\4?r1=\\1&r2=\\2" target="_new">\\4</a><br'; + } else { + $t_replace_with = '[SCM] '.$t_cvs_web.'/\\3/\\4?r1=\\1&r2=\\2 \\1 --> \\2 \\3 \\4<br'; + } + + return preg_replace( '/(\d+) --> (\d+) ?(.+)? (.+)<br/i', + $t_replace_with, + $p_string ); + } + + # -------------------- # Process $p_string, looking for bug ID references and creating bug view # links for them. # | ||||
Bugzilla has addressed with the same issue: https://bugzilla.mozilla.org/show_bug.cgi?id=314097 |
|
Thank you for taking the time to report a problem with mantis. This issue hasn't been touched in ages, and in 1.2.0 we have been working on support for plugins. The SVN trunk currently has a mantiscoreformatting plugin - it strikes me that the scmbug functionality (if still required) should be implemented by making an additional formatting plugin that parses for the scmbug links. Seperately to this, I think jreese has been working on some scm plugin support for mantis - I haven't looked at what this does so am not aware of whether they would overlap or fit together etc. I believe he's plugin can be found at http://github.com/jreese/mantis-source-integration/tree/master Again, thank you for your bug report and your continued support. |
|