diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-05-12 23:28:30 -0700 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-05-12 23:28:30 -0700 |
commit | 20ed8a92744b90c7b6b5eab19d0ed7e846100a5e (patch) | |
tree | 9ec9e682988da71c45b1232b49ad4acfd1d7bd27 /process_bug.cgi | |
parent | 72d9f52a212e557110622b37e81027458ceb3ecb (diff) | |
download | bugs-20ed8a92744b90c7b6b5eab19d0ed7e846100a5e.tar bugs-20ed8a92744b90c7b6b5eab19d0ed7e846100a5e.tar.gz bugs-20ed8a92744b90c7b6b5eab19d0ed7e846100a5e.tar.bz2 bugs-20ed8a92744b90c7b6b5eab19d0ed7e846100a5e.tar.xz bugs-20ed8a92744b90c7b6b5eab19d0ed7e846100a5e.zip |
Bug 556123: process_bug.cgi: move the setting of comments and work_time
into Bugzilla::Bug::set_all
r=dkl, a=mkanat
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-x | process_bug.cgi | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/process_bug.cgi b/process_bug.cgi index f41dc761d..956068370 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -322,7 +322,8 @@ if (defined $cgi->param('keywords')) { my @set_fields = qw(op_sys rep_platform priority bug_severity component target_milestone version bug_file_loc status_whiteboard short_desc - deadline remaining_time estimated_time); + deadline remaining_time estimated_time + work_time); push(@set_fields, 'assigned_to') if !$cgi->param('set_default_assignee'); push(@set_fields, 'qa_contact') if !$cgi->param('set_default_qa_contact'); my %field_translation = ( @@ -340,16 +341,16 @@ foreach my $field_name (@set_fields) { } } +if (should_set('comment')) { + $set_all_fields{comment} = { + body => scalar $cgi->param('comment'), + is_private => scalar $cgi->param('commentprivacy'), + }; +} + my @custom_fields = Bugzilla->active_custom_fields; foreach my $b (@bug_objects) { - if (should_set('comment') || $cgi->param('work_time')) { - # Add a comment as needed to each bug. This is done early because - # there are lots of things that want to check if we added a comment. - $b->add_comment(scalar($cgi->param('comment')), - { isprivate => scalar $cgi->param('commentprivacy'), - work_time => scalar $cgi->param('work_time') }); - } $b->set_all(\%set_all_fields); $b->reset_assigned_to if $cgi->param('set_default_assignee'); $b->reset_qa_contact if $cgi->param('set_default_qa_contact'); |