Bug 1008489 - Test case create_date not exposed via XMLRPC
Test case create_date not exposed via XMLRPC
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: python-nitrate (Show other bugs)
20
Unspecified Unspecified
urgent Severity urgent
: ---
: ---
Assigned To: Petr Šplíchal
Fedora Extras Quality Assurance
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-16 09:14 EDT by Alexander Todorov
Modified: 2016-05-31 21:45 EDT (History)
4 users (show)

See Also:
Fixed In Version: python-nitrate-1.0-0.fc20
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-18 18:54:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed patch (1.68 KB, text/plain)
2013-10-16 10:24 EDT, Alexander Todorov
no flags Details

  None (edit)
Description Alexander Todorov 2013-09-16 09:14:47 EDT
Description of problem:

TestCase.create_date field not accessioble via XMLRPC. Please fix immediately. I need this field in my reports script.
Comment 1 jianchen 2013-09-17 03:38:50 EDT
I can get create_date field through TestCase.get(case_id).

In [9]: n.TestCase.get(1193)
Out[9]: 
{'alias': '',
 'arguments': None,
 'attachment': [],
 'author': 'zcerza',
 'author_id': 1882,
 'case_id': 1193,
 'case_status': 'CONFIRMED',
 'case_status_id': 2,
 'category': 'Regression',
 'category_id': 10,
 'component': [25663, 26871],
 'create_date': '2008-02-21 15:16:18',
 'default_tester': 'rousseau',
 'default_tester_id': 1791,
 'estimated_time': '00:00:30',
 'extra_link': None,
 'is_automated': 0,
 'is_automated_proposed': False,
 'notes': None,
 'plan': [210, 150],
 'priority': 'P1',
 'priority_id': 1,
 'requirement': None,
 'reviewer': None,
 'reviewer_id': None,
 'script': None,
 'summary': 'home page',
 'tag': [],
 'text': {'action': '<OL>\n<LI>Go to Edit -&gt; Preferences, and set the home page to something (such as http://www.google.com)</LI>\n<LI>Close preferences panel</LI>\n<LI>Click the Home bookmark on the Bookmarks Toolbar<BR/></LI>\n</OL>',
  'author': 'zcerza',
  'author_id': 1882,
  'breakdown': '',
  'case': 'home page',
  'case_id': 1193,
  'case_text_version': 3,
  'create_date': '2008-02-26 11:35:14',
  'effect': 'You are brought to the page you set as your home page.',
  'id': 672,
  'setup': 'Firefox smoketest.'}}
Comment 2 Alexander Todorov 2013-09-18 05:08:19 EDT
>>> import nitrate
>>> nitrate.TestCase.get(1193)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'TestCase' has no attribute 'get'

>>> tc =  nitrate.TestCase(1193)
>>> print tc
TC#1193   - home page
>>> tc.create_date
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'TestCase' object has no attribute 'create_date'
>>> 

$ rpm -q python-nitrate
python-nitrate-0.9-0.el6.noarch


Which version of python-nitrate supports TestCase.get() ? The proposed workaround is not working for me.
Comment 3 Alexander Todorov 2013-09-27 07:36:04 EDT
ping any update there?
Comment 4 jianchen 2013-09-30 03:43:59 EDT
(In reply to Alexander Todorov from comment #3)
> ping any update there?

Sorry for the late response, you have used python-nitrite which maintained by Petr Šplíchal<psplicha@redhat.com>, you can contact with him for help.
Comment 5 Alexander Todorov 2013-09-30 04:30:32 EDT
Petr,
please see previous comments. Is this a client side bug in the end?
Comment 6 Petr Šplíchal 2013-10-16 09:36:46 EDT
Hi. As for now, the "create_date" attribute is not provided by the
nitrate module. I only added those attributes which were needed /
available at the time when I wrote the module. It should be quite
easy to add it. I see the value is correctly provided by XMLRPC.
Moving the bug to python-nitrate component.
Comment 7 Alexander Todorov 2013-10-16 10:24:58 EDT
Created attachment 812959 [details]
proposed patch
Comment 8 Alexander Todorov 2013-10-16 10:26:52 EDT
The attached patch works for me. Please build a new version of the module as soon as you can.
Comment 9 Petr Šplíchal 2013-10-19 08:44:43 EDT
Thanks for the patch. I've applied a slightly adjusted version
into the devel branch including a simple unit test case:
https://github.com/psss/python-nitrate/commit/981757a

You can try the fresh python-nitrate from the testing repo:
http://psss.fedorapeople.org/python-nitrate/testing/download/
Please, note that it's still a little bit experimental ;-)
Comment 10 Alexander Todorov 2013-10-21 06:33:04 EDT
(In reply to Petr Šplíchal from comment #9)
> You can try the fresh python-nitrate from the testing repo:
> http://psss.fedorapeople.org/python-nitrate/testing/download/
> Please, note that it's still a little bit experimental ;-)

works for me
Comment 11 Fedora Update System 2014-04-11 11:25:50 EDT
python-nitrate-1.0-0.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python-nitrate-1.0-0.fc20
Comment 12 Fedora Update System 2014-04-15 11:36:52 EDT
Package python-nitrate-1.0-0.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-nitrate-1.0-0.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5095/python-nitrate-1.0-0.fc20
then log in and leave karma (feedback).
Comment 13 Fedora Update System 2014-05-18 18:54:07 EDT
python-nitrate-1.0-0.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

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