Bug 843395

Summary: TestPlan.get_test_cases() should include the sortkey
Product: [Other] TCMS Reporter: Petr Šplíchal <psplicha>
Component: XMLRPCAssignee: Yang Ren <ryang>
Status: VERIFIED --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.7.0CC: ohudlick, ryang
Target Milestone: ---   
Target Release: 3.8.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:

Description Petr Šplíchal 2012-07-26 08:41:38 UTC
Description of problem:

When getting the list of all test plan cases it would be fine to
include the sortkey as well. I see there is the TestCasePlan.get()
function but it would more efficient to fetch all the sortkeys in
one call rather then calling it for each test case separately.

Version-Release number of selected component (if applicable):
Nitrate 3.8.0

Steps to Reproduce:
TestPlan.get_test_cases(6544))

Actual results:
[{'alias': '',
  'arguments': '',
  'attachment': [],
  'author': 'psplicha',
  'author_id': 2117,
  'case_id': 174452,
  'case_status': 'CONFIRMED',
  'case_status_id': 2,
  'category': '      Function    ',
  'category_id': 415,
  'component': [],
  'create_date': '2012-07-07 03:19:43',
  'default_tester': 'psplicha',
  'default_tester_id': 2117,
  'estimated_time': '00:00:00',
  'extra_link': None,
  'is_automated': 0,
  'is_automated_proposed': False,
  'notes': '',
  'plan': [6740, 6730, 6729, 6726, 6725, 6544, 6504, 6503, 6499],
  'priority': 'P1',
  'priority_id': 1,
  'requirement': '',
  'reviewer': None,
  'reviewer_id': None,
  'script': '',
  'summary': 'Test case',
  'tag': []},
  ...

Expected results:
sortkey included in the result hash as well.

Comment 2 Zheng Liu 2012-09-24 05:55:53 UTC
This bug has been fixed, please verify in next release.

Comment 3 Xin Gao 2012-10-10 07:57:24 UTC
Verify 3.8.1 on tcms-test -->PASS

Verify steps:
>>> TestPlan.get_test_cases(7043)

Actual result:
"sortkey" info are included in the result.