From 1e87283250635a69e5d855d1bd5d075253796e88 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 8 Aug 2007 19:14:23 +0000 Subject: Hum... 2nd attempt to fix bug 332149. I committed the wrong patch *and* I lost connection in the middle of the commit. Bad! --- Bugzilla/BugMail.pm | 13 +++---------- Bugzilla/Install/DB.pm | 2 +- template/en/default/admin/groups/create.html.tmpl | 11 +++++++++++ template/en/default/admin/groups/edit.html.tmpl | 13 +++++++++++++ template/en/default/bug/comments.html.tmpl | 11 +++++++++-- template/en/default/bug/show.xml.tmpl | 2 +- template/en/default/global/messages.html.tmpl | 4 +++- 7 files changed, 41 insertions(+), 15 deletions(-) diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 0d5d3fd78..c9f09c551 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -227,8 +227,7 @@ sub Send { my $diffpart = {}; if ($who ne $lastwho) { $lastwho = $who; - $fullwho = $whoname ? "$whoname <$who" . Bugzilla->params->{'emailsuffix'} . ">" : - "$who" . Bugzilla->params->{'emailsuffix'}; + $fullwho = $whoname ? "$whoname <$who>" : $who; $diffheader = "\n$fullwho changed:\n\n"; $diffheader .= FormatTriple("What ", "Removed", "Added"); $diffheader .= ('-' x 76) . "\n"; @@ -703,14 +702,8 @@ sub prepare_comments { my $result = ""; foreach my $comment (@$raw_comments) { if ($count) { - my $author = $comment->{'author'}; - $result .= "\n\n--- Comment #$count from "; - if ($author->name) { - $result .= $author->name . " <" . $author->email . ">"; - } else { - $result .= $author->email; - } - $result .= " " . format_time($comment->{'time'}) . " ---\n"; + $result .= "\n\n--- Comment #$count from " . $comment->{'author'}->identity . + " " . format_time($comment->{'time'}) . " ---\n"; } # Format language specific comments. We don't update $comment->{'body'} # directly, otherwise it would grow everytime you call format_comment() diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index 5106fd525..aa3c89d23 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -510,7 +510,7 @@ sub update_table_definitions { # 2007-05-17 LpSolit@gmail.com - Bug 344965 _initialize_workflow($old_params); - # 2007-07-11 LpSolit@gmail.com - Bug 332149 + # 2007-08-08 LpSolit@gmail.com - Bug 332149 $dbh->bz_add_column('groups', 'icon_url', {TYPE => 'TINYTEXT'}); ################################################################ diff --git a/template/en/default/admin/groups/create.html.tmpl b/template/en/default/admin/groups/create.html.tmpl index fb255304c..543e8ed6e 100644 --- a/template/en/default/admin/groups/create.html.tmpl +++ b/template/en/default/admin/groups/create.html.tmpl @@ -42,6 +42,10 @@ + + + Icon URL: +

automatically grant membership to this group to anyone with an email address that matches this regular expression.

+

+ Icon URL is optional, and is the URL pointing to the icon + used to identify the group. It may be either a relative URL to the base URL + of this installation or an absolute URL. This icon will be displayed + in comments in [% terms.bugs %] besides the name of the author of comments. +

+

By default, the new group will be associated with existing products. Unchecking the "Insert new group into all existing products" option will prevent this and make the group become diff --git a/template/en/default/admin/groups/edit.html.tmpl b/template/en/default/admin/groups/edit.html.tmpl index e16826398..c94126106 100644 --- a/template/en/default/admin/groups/edit.html.tmpl +++ b/template/en/default/admin/groups/edit.html.tmpl @@ -83,6 +83,19 @@ + + + Icon URL: + [% IF group.icon_url %] + [% group.name FILTER html %] + [% END %] + + + + + + [% IF group.is_bug_group %] Use For [% terms.Bugs %]: diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index 428b8771c..5df295423 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -172,10 +172,17 @@ #[% count %] From - + [% FOREACH group = comment.author.direct_group_membership %] + [% NEXT UNLESS group.icon_url %] + [% group.name FILTER html %] + [% END %] + [%+ comment.time FILTER time %] [% IF mode == "edit" %] diff --git a/template/en/default/bug/show.xml.tmpl b/template/en/default/bug/show.xml.tmpl index 6db4aab27..4fbb6dc61 100644 --- a/template/en/default/bug/show.xml.tmpl +++ b/template/en/default/bug/show.xml.tmpl @@ -69,7 +69,7 @@ [% FOREACH c = bug.longdescs %] [% NEXT IF c.isprivate && !user.in_group(Param("insidergroup")) %] - [% c.email FILTER xml %] + [% c.author.email FILTER xml %] [% c.time FILTER time FILTER xml %] [% IF user.in_group(Param('timetrackinggroup')) && (c.work_time - 0 != 0) %] [% PROCESS formattimeunit time_unit = c.work_time FILTER xml %] diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl index acee5b180..e02b379ce 100644 --- a/template/en/default/global/messages.html.tmpl +++ b/template/en/default/global/messages.html.tmpl @@ -209,7 +209,7 @@ [% ELSIF message_tag == "group_updated" %] [% IF changes.keys.size %] - The following changes have been made to the '[% group.name FILTER html %] + The following changes have been made to the '[% group.name FILTER html %]' group: