Bug 1127153 - [xmlrpc]User can not update case's estimated_time when invoke TestCase.update method.
Summary: [xmlrpc]User can not update case's estimated_time when invoke TestCase.update...
Keywords:
Status: VERIFIED
Alias: None
Product: TCMS
Classification: Other
Component: XMLRPC
Version: 3.8.10
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Yang Ren
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-06 09:49 UTC by yangqiu
Modified: 2018-07-04 21:43 UTC (History)
4 users (show)

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


Attachments (Terms of Use)

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.


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