Bug 857828 - [XML-RPC] TestCase.filter() can not filter case via "product"
[XML-RPC] TestCase.filter() can not filter case via "product"
Status: VERIFIED
Product: TCMS
Classification: Other
Component: XMLRPC (Show other bugs)
3.8.0
Unspecified Unspecified
medium Severity medium
: ---
: 3.8.1
Assigned To: Yang Ren
tools-bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-17 03:13 EDT by Xin Gao
Modified: 2015-12-01 00:44 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
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: ---


Attachments (Terms of Use)

  None (edit)
Description Xin Gao 2012-09-17 03:13:26 EDT
Description of problem:
TestCase.filter() can not filter case via "product".

Version-Release number of selected component (if applicable):
tcms 3.8 on stage/production

How reproducible:


Steps to Reproduce:
1. TestCase.filter({'product__name': 'ACK Viewer'})
2. TestCase.filter({'product__id': 136})
3.
  
Actual results:
Fault: <Fault 1: "FieldError: Cannot resolve keyword 'product' into field. Choices are: alias, arguments, attachment, author, case_attachment, case_bug, case_id, case_run, case_status, category, component, create_date, default_tester, email_settings, estimated_time, extra_link, is_automated, is_automated_proposed, notes, plan, priority, requirement, review_case, reviewer, script, summary, tag, testcasecomponent, testcaseplan, testcasetag, testplan, text">

Expected results:
works well

Additional info:
Comment 1 jianchen 2012-09-21 01:28:44 EDT
(In reply to comment #0)
> Description of problem:
> TestCase.filter() can not filter case via "product".
> 
> Version-Release number of selected component (if applicable):
> tcms 3.8 on stage/production
> 
> How reproducible:
> 
> 
> Steps to Reproduce:
> 1. TestCase.filter({'product__name': 'ACK Viewer'})
> 2. TestCase.filter({'product__id': 136})
> 3.
>   
> Actual results:
> Fault: <Fault 1: "FieldError: Cannot resolve keyword 'product' into field.
> Choices are: alias, arguments, attachment, author, case_attachment,
> case_bug, case_id, case_run, case_status, category, component, create_date,
> default_tester, email_settings, estimated_time, extra_link, is_automated,
> is_automated_proposed, notes, plan, priority, requirement, review_case,
> reviewer, script, summary, tag, testcasecomponent, testcaseplan,
> testcasetag, testplan, text">
> 
> Expected results:
> works well
> 
> Additional info:
you can use this commands to filter testcase belong the product:
TestCase.filter({'category__product__name': 'ACK Viewer'})
Comment 2 jianchen 2012-09-21 01:41:59 EDT
product is not the directly foreignkey of test case, adjust xml-rpc API TestCase.filter() describe.
Comment 3 Xin Gao 2012-09-21 01:44:44 EDT
jianchen,
I got your means, y mean "product" isn't an independent para in this method. If so, pls update docs so as to avoid user's confusion.

Thanks
Xin

(In reply to comment #1)
> (In reply to comment #0)
> > Description of problem:
> > TestCase.filter() can not filter case via "product".
> > 
> > Version-Release number of selected component (if applicable):
> > tcms 3.8 on stage/production
> > 
> > How reproducible:
> > 
> > 
> > Steps to Reproduce:
> > 1. TestCase.filter({'product__name': 'ACK Viewer'})
> > 2. TestCase.filter({'product__id': 136})
> > 3.
> >   
> > Actual results:
> > Fault: <Fault 1: "FieldError: Cannot resolve keyword 'product' into field.
> > Choices are: alias, arguments, attachment, author, case_attachment,
> > case_bug, case_id, case_run, case_status, category, component, create_date,
> > default_tester, email_settings, estimated_time, extra_link, is_automated,
> > is_automated_proposed, notes, plan, priority, requirement, review_case,
> > reviewer, script, summary, tag, testcasecomponent, testcaseplan,
> > testcasetag, testplan, text">
> > 
> > Expected results:
> > works well
> > 
> > Additional info:
> you can use this commands to filter testcase belong the product:
> TestCase.filter({'category__product__name': 'ACK Viewer'})
Comment 4 Xin Gao 2012-10-10 03:57:49 EDT
Verify 3.8.1 on tcms-test -->PASS

Verify steps:
check doc

Actual result:
    +------------------------------------------------------------------+
    |                 Case Search Parameters                           |
    +------------------------------------------------------------------+
    |        Key          |          Valid Values                      |
    | author              | A bugzilla login (email address)           |
    | attachment          | ForeignKey: Attchment                      |
    | alias               | String                                     |
    | case_id             | Integer                                    |
    | case_status         | ForeignKey: Case Stat                      |
    | category            | ForeignKey: Category                       |
    | component           | ForeignKey: Component                      |
    | default_tester      | ForeignKey: Auth.User                      |
    | estimated_time      | Time                                       |
    | plan                | ForeignKey: Test Plan                      |
    | priority            | ForeignKey: Priority                       |
    | category__product   | ForeignKey: Product                        |
    | summary             | String                                     |
    | tags                | ForeignKey: Tags                           |
    | create_date         | Datetime                                   |
    | is_automated        | 1: Only show current 0: show not current   |
    | script              | Text                                       |
    +------------------------------------------------------------------+

Note You need to log in before you can comment on or make changes to this bug.