}
# Display columns are selected because otherwise we could not display them.
-push (@selectcolumns, @displaycolumns);
+foreach my $col (@displaycolumns) {
+ push (@selectcolumns, $col) if !grep($_ eq $col, @selectcolumns);
+}
# If the user is editing multiple bugs, we also make sure to select the product
# and status because the values of those fields determine what options the user
$fragment = $columns->{$fragment}->{'name'};
}
- push @selectnames, $fragment;
+ push(@selectnames, $fragment) unless (grep { $fragment eq $_ } @selectnames);
}
}