# # Patch for Bugzilla to enable the magic identifiers in bug comments. # --- bugzilla-3.0.2-orig/Bugzilla/Template.pm +++ bugzilla-3.0.2/Bugzilla/Template.pm @@ -311,6 +311,18 @@ sub quoteUrls { $text =~ s~^(>.+)$~$1~mg; $text =~ s~\n~\n~g; + # BugID: + $text =~ s~\b(BugID:)\s?(\d+)\b + ~$1 . " " . get_bug_link($2,$2)~egox; + + # VCS: + $text =~ s~\b(VCS:)\s?([0-9A-Za-z_/\-.]*)\b + ~$1 $2~igx; + + # Wiki: + $text =~ s~\b(Wiki:)\s?([A-Za-z_\-:]*)\b + ~$1 $2~igx; + # mailto: # Use | so that $1 is defined regardless $text =~ s~\b(mailto:|)?([\w\.\-\+\=]+\@[\w\-]+(?:\.[\w\-]+)+)\b