Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 386766 Details for
Bug 556719
Need to add a new xmlrpc API: hwcert.getPartnerInfo
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch improve:
a.patch (text/plain), 3.95 KB, created by
XINSUN
on 2010-01-26 07:48:44 UTC
(
hide
)
Description:
Patch improve:
Filename:
MIME Type:
Creator:
XINSUN
Created:
2010-01-26 07:48:44 UTC
Size:
3.95 KB
patch
obsolete
>Index: code/webservice.pl >=================================================================== >--- code/webservice.pl (revision 216) >+++ code/webservice.pl (working copy) >@@ -66,7 +66,7 @@ > > #my @legal_fields = ("vendor", "make", "model", "spec_url", "bug_id", "category", "product", "version", "platform", "passthrough"); > my %legal_field_map = ( >- 'vendor' => 'cf_partner.value', >+ 'vendor' => 'rh_hwcert_vendor_names.publish_name', > 'make' => 'rh_hwcert_make.name', > 'model' => 'rh_hwcert_model_names.model', > 'spec_url' => 'rh_hwcert_model_names.spec_url', >@@ -97,7 +97,7 @@ > } > my $sql_fields = join(',', @inner_fields); > >- my $sql_join_table = "rh_hwcert_model_names, rh_hwcert_make,rh_hwcert_name_testplan_map, rh_hwcert_testplan, cf_partner, rh_hwcert_product_kbase_tag, rh_hwcert_testplan_type"; >+ my $sql_join_table = "rh_hwcert_model_names, rh_hwcert_make,rh_hwcert_name_testplan_map, rh_hwcert_testplan, rh_hwcert_vendor_names, rh_hwcert_product_kbase_tag, rh_hwcert_testplan_type"; > > #Parse other parameters for sql_cond; > my @vendor; >@@ -131,12 +131,11 @@ > } > > my $sql_cond = " rh_hwcert_model_names.make_id = rh_hwcert_make.make_id >- AND rh_hwcert_make.cf_partner_id = cf_partner.id >+ AND rh_hwcert_make.vendor_id = rh_hwcert_vendor_names.vendor_id > AND rh_hwcert_model_names.name_id = rh_hwcert_name_testplan_map.name_id > AND rh_hwcert_name_testplan_map.testplan_id = rh_hwcert_testplan.testplan_id > AND rh_hwcert_testplan.product_id = rh_hwcert_product_kbase_tag.product_id > AND rh_hwcert_testplan.type_id = rh_hwcert_testplan_type.type_id >- AND cf_partner.isactive = 1 > AND rh_hwcert_model_names.removed = 0 > AND rh_hwcert_name_testplan_map.is_public = 1 > AND rh_hwcert_testplan.removed = 0 >@@ -146,7 +145,7 @@ > my $vendors = '\''; > $vendors .= join( '\', \'', @vendor); > $vendors .= '\''; >- $sql_cond .= qq{ AND cf_partner.value in ($vendors) }; >+ $sql_cond .= qq{ AND rh_hwcert_vendor_names.publish_name in ($vendors) }; > } > > if (scalar(@make) > 0) { >@@ -236,10 +235,9 @@ > > $logger->debug("Starting: hwcert-xmlrpc-getPartnerInfo"); > >- my $sql_fields = "cf_partner.value, rh_hwcert_make.name"; >- my $sql_join_table = "rh_hwcert_make, cf_partner"; >- my $sql_cond = " rh_hwcert_make.cf_partner_id = cf_partner.id >- AND cf_partner.isactive = 1"; >+ my $sql_fields = "rh_hwcert_vendor_names.publish_name, rh_hwcert_make.name"; >+ my $sql_join_table = "rh_hwcert_vendor_names LEFT JOIN rh_hwcert_make ON rh_hwcert_vendor_names.vendor_id = rh_hwcert_make.vendor_id"; >+ my $sql_cond = ""; > > #Parse the parameters for sql_cond; > my @vendor; >@@ -251,16 +249,17 @@ > my $vendors = '\''; > $vendors .= join( '\', \'', @vendor); > $vendors .= '\''; >- $sql_cond .= qq{ AND cf_partner.value in ($vendors) }; >+ $sql_cond .= qq{ WHERE rh_hwcert_vendor_names.publish_name in ($vendors) }; > } > > my $dbh = Bugzilla->dbh; >- my $query = "SELECT $sql_fields FROM $sql_join_table WHERE $sql_cond"; >+ my $query = "SELECT $sql_fields FROM $sql_join_table"; > $logger->debug("hwcert-xmlrpc-getPartnerInfo : Sql execute: $query"); > > my $sth = $dbh->prepare($query); > $sth->execute(); > >+ > my %partner_info_list; > while ( my @row = $sth->fetchrow_array() ) { > if (scalar(@row) > 0) { >@@ -268,7 +267,9 @@ > my $make_name = shift(@row); > > $partner_info_list{$partner_name} = [] unless (exists $partner_info_list{$partner_name}); >- push(@{$partner_info_list{$partner_name}}, $make_name); >+ if ($make_name) { >+ push(@{$partner_info_list{$partner_name}}, $make_name); >+ } > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 556719
:
385331
|
385621
| 386766