Bug 731982 - XMLRPC: Product should not be required when updated TestRun's build
Summary: XMLRPC: Product should not be required when updated TestRun's build
Alias: None
Product: TCMS
Classification: Other
Component: Application
Version: 3.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.8.0
Assignee: Yang Ren
QA Contact: tools-bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-19 11:14 UTC by Petr Šplíchal
Modified: 2018-02-16 00:33 UTC (History)
5 users (show)

Fixed In Version: 3.8.0-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed:

Attachments (Terms of Use)

Description Petr Šplíchal 2011-08-19 11:14:43 UTC
Description of problem:

When trying to update a TestRun's build I see the following

    >>> TestRun.update(6757, {'build': 1398 })
    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
    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: 'ValueError: Field "product" is
    required by build or product_version'>

Product is a foreign key of the build, there is no product id in
the TestRun itself, so requiring product id does not make sense.
Please remove this limitation as it causes unnecesary build data

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

Comment 1 jianchen 2012-06-14 08:35:57 UTC
Fixed in tcms 3.8.0, please verify after release.
Product id was not required when use TestRun.update() method update build.

Comment 2 Xin Gao 2012-07-26 02:57:05 UTC
Verify 3.8.0-1 on stage -->PASS

Verify steps:
1.test TestRun.update() method update build.
such as, 
$ n.TestRun.update(6757, {'build': 1398 })

Actual result:
works well.

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