summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunil Joshi <joshi_sunil@in.com>2013-08-06 03:43:27 +0200
committerSimon Green <sgreen@redhat.com>2013-08-06 03:43:27 +0200
commitae0fc821b3375b21f365a9857f477a49d1bbc91f (patch)
tree2eb64c83530aadc11fcb216d8d01a98101c27e08
parent052096c990abfff963bfb8dda623157c48b0fe6a (diff)
downloadbugzilla-ae0fc821b3375b21f365a9857f477a49d1bbc91f.tar.gz
bugzilla-ae0fc821b3375b21f365a9857f477a49d1bbc91f.tar.xz
Bug 491316 - Allow the reporter to enter keywords at bug creation
r=sgreen, a=sgreen
-rw-r--r--Bugzilla/Bug.pm8
-rw-r--r--template/en/default/bug/create/create.html.tmpl20
2 files changed, 11 insertions, 17 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index f27baa532..842dacff4 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -1713,13 +1713,7 @@ sub _check_keywords {
$keywords_in = trim($keywords_in);
$keyword_array = [split(/[\s,]+/, $keywords_in)];
}
-
- # On creation, only editbugs users can set keywords.
- if (!ref $invocant) {
- my $product = $params->{product};
- return [] if !Bugzilla->user->in_group('editbugs', $product->id);
- }
-
+
my %keywords;
foreach my $keyword (@$keyword_array) {
next unless $keyword;
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index a2109c956..9c7775f07 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -595,17 +595,17 @@ TUI_hide_default('attachment_text_field');
</tbody>
<tbody class="expert_fields">
+ [% IF use_keywords %]
+ <tr>
+ [% INCLUDE bug/field.html.tmpl
+ bug = default, field = bug_fields.keywords, editable = 1,
+ value = keywords, possible_values = all_keywords,
+ desc_url = "describekeywords.cgi", value_span = 2
+ %]
+ </tr>
+ [% END %]
+
[% IF user.in_group('editbugs', product.id) %]
- [% IF use_keywords %]
- <tr>
- [% INCLUDE bug/field.html.tmpl
- bug = default, field = bug_fields.keywords, editable = 1,
- value = keywords, possible_values = all_keywords,
- desc_url = "describekeywords.cgi", value_span = 2
- %]
- </tr>
- [% END %]
-
<tr>
[% INCLUDE "bug/field-label.html.tmpl"
field = bug_fields.dependson editable = 1