Bug 716499

Summary: TestPlan.update() unable to update product version
Product: [Other] TCMS Reporter: Petr Šplíchal <psplicha>
Component: ApplicationAssignee: Yuguang Wang <yuwang>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.4.1CC: GFENG, junzhang, nli, ohudlick, ryang, tools-bugs, vchen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.5.0-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-26 13:20:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Petr Šplíchal 2011-06-24 16:34:29 UTC
Description of problem:

When trying to update the product version using XMLRPC I see the
followin traceback:

    TestPlan.update(289, {'product': 61, 'default_product_version': 995 })

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "nitrate.py", line 120, in request_with_cookies
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
    return u.close()
  File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 1: "UnboundLocalError: local variable 'form' referenced before assignment">


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

Additional info:

Works fine when updating product only: TestPlan.update(289, {'product': 61 })

Comment 1 Yuguang Wang 2011-07-08 10:41:20 UTC
It's fixed.
Will inform you to verify when it's online.
Thanks for reporting.

Comment 2 Guoping Feng 2011-07-15 07:07:47 UTC
Verify 3.5.0-1 on stage -->PASS

Verify steps:
1.Choose a plan, such as 4127(plan ID), and check the plan's product and version.
2.Enter xml-rpc.
3.>>> n.server.TestPlan.update(4127,{'product':283,'default_product_version':1155})
[{'product': 'abcde', 'create_date': '2011-06-28 09:44:57', 'name': 'eric', 'parent': 'plan June', 'type_id': 23, 'author': 'gfeng', 'is_active': 'True', 'extra_link': '', 'parent_id': 4130, 'default_product_version': 'QQQ', 'owner': 'gfeng', 'plan_id': '4127', 'author_id': 2976, 'owner_id': 2976, 'type': 'Place Holder', 'product_id': 283}]
4.Reload the plan 4127 page and check the product and version.

Actual result:
The version is changed to "QQQ" successfully.

Comment 3 Petr Šplíchal 2011-07-27 12:20:36 UTC
Now works fine, thanks for the fix!