[Codestriker-commits] CVS update: codestriker/lib/Codestriker/TopicListeners Email.pm
Brought to you by:
sits
|
From: <si...@us...> - 2008-08-07 06:48:13
|
User: sits
Date: 08/08/06 23:48:12
Modified: . CHANGELOG
lib/Codestriker/TopicListeners Email.pm
Log:
* In the create topic email, show the URL to the associated bug records
if $bugtracker is defined in codestriker.conf rather than just the bug
IDs.
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
retrieving revision 1.254
retrieving revision 1.255
diff -u -r1.254 -r1.255
--- CHANGELOG 6 Aug 2008 05:24:42 -0000 1.254
+++ CHANGELOG 7 Aug 2008 06:48:12 -0000 1.255
@@ -48,7 +48,11 @@
* Use pegged revisions instead of operative revisions when retrieving
files from Subversion to handle situations where files have been moved
within the repository since the review was created. Fixed by
- cle...@us....
+ cle...@us....
+
+* In the create topic email, show the URL to the associated bug records
+ if $bugtracker is defined in codestriker.conf rather than just the bug
+ IDs.
Version 1.9.5
Index: Email.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/TopicListeners/Email.pm,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- Email.pm 6 Aug 2008 01:51:42 -0000 1.29
+++ Email.pm 7 Aug 2008 06:48:12 -0000 1.30
@@ -432,13 +432,33 @@
my $query = new CGI;
my $url_builder = Codestriker::Http::UrlBuilder->new($query);
- my $topic_url = $url_builder->view_url(topicid => $topic);
+ my $topic_url = $url_builder->view_url(topicid => $topic->{topicid});
my $subject = "[REVIEW] Topic $event_name \"" . $topic->{title} . "\"";
+
+ # Set the bug ID line to report the actual URL links if possible.
+ my $bug_id_line = "";
+ if (defined $topic->{bug_ids} && $topic->{bug_ids} ne "") {
+ $bug_id_line = "Bug IDs: ";
+ if (defined $Codestriker::bugtracker) {
+ my @bug_id_array = split /[\s,]+/, $topic->{bug_ids};
+ for (my $i = 0; $i <= $#bug_id_array; $i++) {
+ $bug_id_line .= $Codestriker::bugtracker . $bug_id_array[$i];
+ if ($i < $#bug_id_array) {
+ $bug_id_line .= "\n ";
+ }
+ }
+ $bug_id_line .= "\n";
+ }
+ else {
+ $bug_id_line .= $topic->{bug_ids} . "\n";
+ }
+ }
+
my $body =
"Topic \"$topic->{title}\"\n" .
"Author: $topic->{author}\n" .
- (($topic->{bug_ids} ne "") ? "Bug IDs: $topic->{bug_ids}\n" : "") .
+ $bug_id_line .
"Reviewers: $topic->{reviewers}\n" .
(($include_url) ? "URL: $topic_url\n\n" : "") .
"$EMAIL_HR\n" .
|