Bug 857828 - [XML-RPC] TestCase.filter() can not filter case via "product"
Summary: [XML-RPC] TestCase.filter() can not filter case via "product"
Keywords:
Status: VERIFIED
Alias: None
Product: TCMS
Classification: Other
Component: XMLRPC
Version: 3.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.8.1
Assignee: Yang Ren
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-17 07:13 UTC by Xin Gao
Modified: 2022-03-14 03:25 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Xin Gao 2012-09-17 07:13:26 UTC
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 05:28:44 UTC
(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 05:41:59 UTC
product is not the directly foreignkey of test case, adjust xml-rpc API TestCase.filter() describe.

Comment 3 Xin Gao 2012-09-21 05:44:44 UTC
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 07:57:49 UTC
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.