diff options
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/BugModal/Extension.pm | 16 | ||||
-rw-r--r-- | extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl | 2 | ||||
-rw-r--r-- | extensions/BugModal/template/en/default/bug_modal/field.html.tmpl | 3 |
3 files changed, 21 insertions, 0 deletions
diff --git a/extensions/BugModal/Extension.pm b/extensions/BugModal/Extension.pm index f09a53425..0c007c2d9 100644 --- a/extensions/BugModal/Extension.pm +++ b/extensions/BugModal/Extension.pm @@ -256,6 +256,22 @@ sub template_before_process { $vars->{tracking_flags_table} = \@tracking_table; } +sub bug_start_of_set_all { + my ($self, $args) = @_; + my $bug = $args->{bug}; + my $params = $args->{params}; + + # reset to the component defaults if not supplied + if (exists $params->{assigned_to} && (!defined $params->{assigned_to} || $params->{assigned_to} eq '')) { + $params->{assigned_to} = $bug->component_obj->default_assignee->login; + } + if (exists $params->{qa_contact} && (!defined $params->{qa_contact} || $params->{qa_contact} eq '') + && $bug->component_obj->default_qa_contact->id) + { + $params->{qa_contact} = $bug->component_obj->default_qa_contact->login; + } +} + sub webservice { my ($self, $args) = @_; my $dispatch = $args->{dispatch}; diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl index ba3973bcf..fa87066fd 100644 --- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl @@ -466,6 +466,7 @@ field_type = constants.FIELD_TYPE_USER hide_on_view = 1 append_content = 1 + default = bug.component_obj.default_assignee.login %] <div class="set-default-container" style="display:none"> <input type="checkbox" id="set-default-assignee" name="set_default_assignee" class="set-default" @@ -508,6 +509,7 @@ field_type = constants.FIELD_TYPE_USER hide_on_view = 1 append_content = 1 + default = (bug.component_obj.default_qa_contact.id ? bug.component_obj.default_qa_contact.login : '') %] <div class="set-default-container" style="display:none"> <input type="checkbox" id="set-default-qa-contact" name="set_default_qa_contact" class="set-default" diff --git a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl index 12f412870..ec2b57593 100644 --- a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl @@ -24,6 +24,7 @@ # hide_on_edit: (boolean) hide content when in edit mode (default: false) # append_content: (boolean) when called as a WRAPPER, the content will be appended to the # edit html instead of replacing it. forces edit_only (default: false); + # default: (string) default value (eg. used as a placeholder in user fields) #%] [% @@ -197,6 +198,7 @@ END; name = name value = value.login classes = [ "bz_userfield" ] + placeholder = default %] [% CASE constants.FIELD_TYPE_USERS %] @@ -207,6 +209,7 @@ END; name = name value = value.join(", ") classes = [ "bz_userfield" ] + placeholder = default multiple = 5 %] |