[ igorkr @ 17.04.2013. 15:52 ] @

Probavam osposobiti bz_webservice_demo.pl skripte da bi dobio bugove od Bugzille. Dobijam description, product, status ..., ali bugove nisu sortirani po product. Kako da popravim ovaj deo (ali skriptu)

if ($bug_id) {
$soapresult = $proxy->call('Bug.get', { ids => [$bug_id] });
_die_on_fault($soapresult);
$result = $soapresult->result;
my $bug = $result->{bugs}->[0];
foreach my $field (keys(%$bug)) {
my $value = $bug->{$field};
if (ref($value) eq 'HASH') {
foreach (keys %$value) {
print "$_: " . $value->{$_} . "\n";
}
}
else {
print "$field: $value\n";
}
}
}

da su bugovi sortirani po product?

Hvala,
Igor
[ igorkr @ 17.04.2013. 22:01 ] @
Ili da objasnim sa primer:

Dobio sam:

Bug: 138
Description: correction in httpd.conf
Product: A
Status: Fixed


Bug: 206
Description: ssl doesn’t work
Product: F
Status: Solved


Bug: 200
Description: port closed
Product: B
Status: Fixed


Bug: 211
Description: apache problem
Product: F
Status: Solved



Hoču da dobijem:

Bug: 138
Description: correction in httpd.conf
Product: A
Status: Fixed


Bug: 200
Description: port closed
Product: B
Status: Fixed


Bug: 206
Description: ssl doesn’t work
Product: F
Status: Solved


Bug: 211
Description: apache problem
Product: F
Status: Solved




Sortirano by Product (A, B, F, F…)


Ali show me only bugs where Product==F

Bug: 206
Description: ssl doesn’t work
Product: F
Status: Solved


Bug: 211
Description: apache problem
Product: F
Status: Solved