Bug 1127153

Summary: [xmlrpc]User can not update case's estimated_time when invoke TestCase.update method.
Product: [Other] TCMS Reporter: yangqiu <qiyang>
Component: XMLRPCAssignee: Yang Ren <ryang>
Status: VERIFIED --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.8.10CC: cqi, leiwang, ryang
Target Milestone: ---   
Target Release: ---   
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 yangqiu 2014-08-06 09:49:04 UTC
Description of problem:
as summary.

Version-Release number of selected component (if applicable):
v3.8.10-1 on devel server.

How reproducible:
100%

Steps to Reproduce:
1.invoke n.TestCase.update([293348],{'estimated_time':'22h33m44s'})--->Fault: <Fault 500: ["'int' object has no attribute 'seconds'"]>
2.invoke n.TestCase.update([293348],{'estimated_time':'11d22h33m44s'})--->Fault: <Fault 500: ["'int' object has no attribute 'seconds'"]>
3.invoke n.TestCase.update([293348],{'estimated_time':'11:22:33'})--->Fault: <Fault 400: ["[('estimated_time', u'Enter a valid estimated time. e.g. 12h45m')]"]>

Actual results:


Expected results:
for step 1: system returns 400 error, like: <Fault 400: ["[('estimated_time', u'Enter a valid estimated time. e.g. 11:22:33')]"]> 
for step 2: system returns 400 error, like: <Fault 400: ["[('estimated_time', u'Enter a valid estimated time. e.g. 11:22:33')]"]> 
for step 3: system can update the case's estimated_time.

Additional info:
the document for TestCase.update does not define the format of estimated_time.

Comment 1 yangqiu 2014-08-06 09:55:53 UTC
this issue also happened when invoke TestCase.filter,like

n.TestCase.filter( {'case_id__in': [293346,293347,293348], 'estimated_time': '00:00:00'})--->Fault: <Fault 400: ["invalid literal for int() with base 10: '00:00:00'"]>

n.TestCase.filter( {'case_id__in': [293346,293347,293348], 'estimated_time': '22h33m44s'})--->Fault: <Fault 400: ["invalid literal for int() with base 10: '22h33m44s'"]>

n.TestCase.filter( {'case_id__in': [293346,293347,293348], 'estimated_time': '11d22h33m44s'})--->Fault: <Fault 400: ["invalid literal for int() with base 10: '11d22h33m44s'"]>

Comment 2 yangqiu 2014-08-06 10:10:23 UTC
this issue also happened when invoke TestRun.filter

Comment 3 jianchen 2014-08-08 07:58:57 UTC
Update is okay now, but the update return format(estiamted_time) is seconds.

Comment 4 Tingting Zhao 2014-08-12 08:01:38 UTC
verify on devels server with v3.8.10
TestCase.update()---->pass
TestCase.filter()---->fail.500 Fault: <Fault 500:["global name 'values' is not defined"]>
verify steps are the same as the description.

Comment 5 Tingting Zhao 2014-08-13 10:06:21 UTC
Invoke n.TestCase.filter({'case_id__in':[293393],'estimated_time__in':['20']})
result:it searched out the cases with the estimated time is 20s

Comment 6 Tingting Zhao 2014-08-13 10:08:31 UTC
But the document writes:the format of the time is "Time".
So need to update the document and ensure the final format.

Comment 7 yangqiu 2014-08-18 10:27:39 UTC
verify this issue on v3.8.10-1 on devel.---Pass
verify steps are same as comments.