Bug 1024843

Summary: [XMLRPC] Do we really need to get a TestBuild object to construct search criterias?
Product: [Other] TCMS Reporter: cqi
Component: XMLRPCAssignee: Yang Ren <ryang>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: DevelCC: ryang
Target Milestone: ---Keywords: Improvement
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description cqi 2013-10-30 13:51:00 UTC
Within get_runs and get_caseruns method in build.py, build is the necessary criteria to search all objects associated with the TestBuild. Both of these twos get a real TestBuild object and then construct search criterias object, which is a django QuerySet criterias.

However, according to the ability of django's ORM, it's unnecessary to pass a complete TestBuild object, only the ``build_id`` is enough. Thus, one SQL query consumption is saved, and we can imagine how much resources can be saved in the server side, when those two method is being used in auto testing scripts.