diff options
author | Byron Jones <glob@mozilla.com> | 2015-05-27 07:32:27 +0200 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2015-05-27 07:32:27 +0200 |
commit | 776ee55030257105efd7df2196d9aee01e8281ad (patch) | |
tree | 5a3c2c1ac820eafdeb175ec7b0d7ebef4da87471 /extensions/BugModal/Extension.pm | |
parent | 4bc64fd88d745ea6b98fac615df3d8fe96419923 (diff) | |
download | bugzilla-776ee55030257105efd7df2196d9aee01e8281ad.tar.gz bugzilla-776ee55030257105efd7df2196d9aee01e8281ad.tar.xz |
Bug 1162427: the "reset assignee to default" checkbox / functionality should be visible
Diffstat (limited to 'extensions/BugModal/Extension.pm')
-rw-r--r-- | extensions/BugModal/Extension.pm | 16 |
1 files changed, 16 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}; |