},
queue => {type => HASHREF,
optional => 1},
+ packages => {type => HASHREF,
+ default => sub {return {}},
+ optional => 1,
+ },
});
my $s = $param{db};
if (not exists $param{data} and not exists $param{bug}) {
$queue = {};
}
my %tags;
- my $s_data = split_status_fields($data);
- for my $tag (make_list($s_data->{keywords})) {
+ $data = split_status_fields($data);
+ for my $tag (make_list($data->{keywords})) {
next unless defined $tag and length $tag;
# this allows for invalid tags. But we'll use this to try to
# find those bugs and clean them up
submitter => 'originator',
);
for my $addr_type (keys %addr_map) {
+ $bug->{$addr_type} = undef;
+ next unless defined $data->{$addr_map{$addr_type}} and
+ length($data->{$addr_map{$addr_type}});
$bug->{$addr_type} =
$s->resultset('Correspondent')->
get_correspondent_id($data->{$addr_map{$addr_type}})
}
my $b = $s->resultset('Bug')->update_or_create($bug) or
die "Unable to update or create bug $bug->{id}";
- $s->txn_do(sub {
- for my $ff (qw(found fixed)) {
+ $s->txn_do(sub {
+ $b->set_related_packages('binpackages',
+ [grep {defined $_ and
+ length $_ and $_ !~ /^src:/}
+ make_list($data->{package})],
+ $param{packages},
+ );
+ $b->set_related_packages('srcpackages',
+ [grep {defined $_ and
+ $_ =~ /^src:/}
+ make_list($data->{package})],
+ $param{packages},
+ );
+ $b->set_related_packages('affects_binpackages',
+ [grep {defined $_ and
+ length $_ and $_ !~ /^src:/}
+ make_list($data->{affects})
+ ],
+ $param{packages},
+ );
+ $b->set_related_packages('affects_srcpackages',
+ [grep {defined $_ and
+ $_ =~ /^src:/}
+ make_list($data->{affects})],
+ $param{packages},
+ );
+ for my $ff (qw(found fixed)) {
my @elements = $s->resultset('BugVer')->search({bug => $data->{bug_num},
found => $ff eq 'found'?1:0,
});
=back
-=head Packages
+=head2 Packages
=over
=cut
-=head Suites
+=head2 Suites
=over