From 8f3bf725dabd630750c52a0c15b19ec22c8bf7a3 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Wed, 27 Feb 2013 17:28:37 -0500 Subject: Bug 845567 - Allow needsinfo for resolved bugs - Added in some layout refactoring of the needinfo UI --- extensions/Needinfo/Extension.pm | 10 +- .../template/en/default/bug/needinfo.html.tmpl | 117 ++++++++++----------- 2 files changed, 59 insertions(+), 68 deletions(-) (limited to 'extensions/Needinfo') diff --git a/extensions/Needinfo/Extension.pm b/extensions/Needinfo/Extension.pm index 15c258839..eb4b92c85 100644 --- a/extensions/Needinfo/Extension.pm +++ b/extensions/Needinfo/Extension.pm @@ -125,8 +125,7 @@ sub bug_start_of_update { } } - # Clear the flag if bug is being closed or if additional - # information was given as requested + # Clear the flag if additional information was given as requested my @flags; foreach my $flag (@{ $bug->flags }) { next if $flag->type->name ne 'needinfo'; @@ -138,13 +137,6 @@ sub bug_start_of_update { # Clear if current user has selected override $clear_needinfo = 1 if grep($_ == $flag->id, @needinfo_overrides); - # Clear if bug is being closed - if (($bug->bug_status ne $old_bug->bug_status) - && !$old_bug->status->is_open) - { - $clear_needinfo = 1; - } - # Clear if comment provided by the proper requestee if ($bug->{added_comments} && (!$flag->requestee || $flag->requestee->login eq Bugzilla->user->login) diff --git a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl index db02df79b..6031d6e0c 100644 --- a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl +++ b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl @@ -8,7 +8,6 @@ [% needinfo_flagtype = "" %] [% needinfo_flags = [] %] -[% can_create_needinfo = 0 %] [% FOREACH type = bug.flag_types %] [% IF type.name == 'needinfo' %] @@ -22,19 +21,6 @@ [% END %] [% END %] -[% IF user.in_group('canconfirm') %] - [% IF bug.status.is_open %] - [% can_create_needinfo = 1 %] - [% ELSE %] - [% FOREACH field = Bugzilla.active_custom_fields(product=>bug.product_obj, component=>bug.component_obj, type=>2) %] - [% IF field.description.match('^status-firefox') && bug.${field.name} == 'affected' %] - [% can_create_needinfo = 1 %] - [% LAST %] - [% END %] - [% END %] - [% END %] -[% END %] - [% IF needinfo_flagtype %]
[% IF needinfo_flags.size > 0 %] @@ -43,56 +29,69 @@ var summary_container = document.getElementById('static_bug_status'); summary_container.appendChild(document.createTextNode('[NEEDINFO]')); - - [% FOREACH flag = needinfo_flags %] + [% END %] + + [% FOREACH flag = needinfo_flags %] + [% IF !flag.requestee || flag.requestee.id == user.id %] - Adding a comment will automatically clear needinfo the request for - [% IF !flag.requestee %]anyone[% ELSE %][% flag.requestee.login FILTER html %][% END %]. + + [% ELSE %] - - + + [% END %] -
- [% END %] + [% END %] - - [% IF can_create_needinfo && (needinfo_flags.size == 0 || needinfo_flagtype.is_multiplicable) %] - - - - - - [%+ INCLUDE global/userselect.html.tmpl - id => "needinfo_from" - name => "needinfo_from" - size => 30 - value => "" - %] - -
+ + + + + [% END %] +
* + Adding a comment will automatically clear needinfo the request for + [% IF !flag.requestee %]anyone[% ELSE %][% flag.requestee.login FILTER html %][% END %]. + + + + +
+ + + + [%+ INCLUDE global/userselect.html.tmpl + id => "needinfo_from" + name => "needinfo_from" + size => 30 + value => "" + %] + +
[% END %] -- cgit v1.2.3-24-g4f1b