Bug 1128598

Summary: [XML-RPC] There will be errors if one of the four text arguments missed when updating the texts of test cases and test plans
Product: [Other] TCMS Reporter: Tingting Zhao <tzhao>
Component: XMLRPCAssignee: Yang Ren <ryang>
Status: NEW --- 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 Tingting Zhao 2014-08-11 07:47:35 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 the method with author_id:
n.TestCase.store_text(293344,'test steps',4258)
And then check whether it can update the text of the case.
2.then invoke the same method without the author_id
n.TestCase.store_text(293344,'test steps')

Actual results:
step 1 :Fault: <Fault 500: ["'int' object has no attribute 'encode'"]>
step 2 : the case's text will be updated successfully.

Expected results:
step 1:this way should update the text sucessfully
step 2: this way without author_id should update text failed.

Additional info:
It is opposite to the document.

Comment 1 yangqiu 2014-08-13 10:15:14 UTC
Test on v3.8.10-1 on devel server.
when invoke 
n.TestCase.store_text(293432, 'Action test 11111', 'Effect test 22222', 'Setup test 33333', 'Breakdown test 44433')
system returns 500 error, like:
Fault: <Fault 500: ["'NoneType' object has no attribute 'serialize'"]>

Comment 2 Xu Lei 2014-08-14 09:10:36 UTC
(In reply to yangqiu from comment #1)
> Test on v3.8.10-1 on devel server.
> when invoke 
> n.TestCase.store_text(293432, 'Action test 11111', 'Effect test 22222',
> 'Setup test 33333', 'Breakdown test 44433')
> system returns 500 error, like:
> Fault: <Fault 500: ["'NoneType' object has no attribute 'serialize'"]>

got it, fixed and will merge into 3.8.10

Comment 3 Xu Lei 2014-08-19 02:10:18 UTC
this api will not accept the None value in setup, effect and breakdown, the document is correct for current scene.

And if you want to support one particular text to be updated, we need a new api, not modify this one.

Comment 4 Tingting Zhao 2014-08-19 02:50:20 UTC
In [16]:n.TestCase.store_text(293344,'preparation','effection','steps') with a argument missed.
Out[16]:Fault: <Fault 500: ["'int' object has no attribute 'encode'"]>

In [17]: n.TestPlan.store_text(10140, 4258) without plan text.
Out[17]:Fault: <Fault 500: ["'int' object has no attribute 'encode'"]>