Commit 2b8db997 authored by Max Kanat-Alexander's avatar Max Kanat-Alexander

Bug 619466: Make searching by work_time search the total time on the bug

instead of searching the time on individual comments. r=mkanat, a=mkanat (module owner)
parent c93887f2
......@@ -2323,11 +2323,8 @@ sub _work_time_changedbefore_after {
sub _work_time {
my ($self, $args) = @_;
my ($chart_id, $joins) = @$args{qw(chart_id joins)};
my $table = "longdescs_$chart_id";
push(@$joins, { table => 'longdescs', as => $table });
$args->{full_field} = "$table.work_time";
$self->_add_extra_column('actual_time');
$args->{full_field} = COLUMNS->{actual_time}->{name};
}
sub _percentage_complete {
......
......@@ -617,7 +617,7 @@ sub _create_one_bug {
my $extra_values = $self->_extra_bug_create_values->{$number};
foreach my $field (qw(comments remaining_time percentage_complete
keyword_objects everconfirmed dependson blocked
groups_in classification))
groups_in classification actual_time))
{
$extra_values->{$field} = $bug->$field;
}
......
......@@ -335,6 +335,9 @@ sub _field_values_for_bug {
elsif ($field eq 'longdescs.count') {
@values = scalar(@{ $self->bug($number)->comments });
}
elsif ($field eq 'work_time') {
@values = $self->_values_for($number, 'actual_time');
}
elsif ($field eq 'bug_group') {
@values = $self->_values_for($number, 'groups_in', 'name');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment