-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No way to retrieve comments from bugs #6
Comments
I think you can do this as things stand now: >>> import bugzilla
>>> bz = bugzilla.Bugzilla('https://bugzilla.redhat.com')
>>> bug = bz.getbug(1234567)
>>> bug.comments
[{'count': 0, 'author': 'jonathan.underwood@gmail.com', 'text': 'The Emacs add-on packaging guidelines no longer stipulate that packages which also bundle support for Emacs should split out
those Emacs files into separate sub-packages. This package should instead ship those files with the main package which should also Require emacs-filesystem. See https://fedoraproject.org/wik
i/Packaging:Emacs for more detail.', 'creator': 'jonathan.underwood@gmail.com', 'creation_time': <DateTime '20150622T17:53:39' at 7fd40edfbbd8>, 'bug_id': 1234567, 'creator_id': 163554, 'tim
e': <DateTime '20150622T17:53:39' at 7fd40edfb950>, 'id': 8360743, 'is_private': False}, {'count': 1, 'author': 'jkurik@redhat.com', 'text': "This bug appears to have been reported against '
rawhide' during the Fedora 23 development cycle.\nChanging version to '23'.\n\n(As we did not run this process for some time, it could affect also pre-Fedora 23 development\ncycle bugs. We a
re very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)\n\nMore information and reason for this action is here:\nhttps://fedoraproject.org/wiki/BugZappers/House
Keeping/Fedora23", 'creator': 'jkurik@redhat.com', 'creation_time': <DateTime '20150715T13:56:19' at 7fd40edfbc68>, 'bug_id': 1234567, 'creator_id': 352756, 'time': <DateTime '20150715T13:56
:19' at 7fd40edfba28>, 'id': 8443503, 'is_private': False}] |
I tried this, and it didn't work for our BZ 4.0.3 or 5.0 installation. There is no comments attribute on my bug object. I had to do this to be able to retrieve them: |
This is the traceback I get:
|
yeah the "comments" as a return for getbug/query is a bugzilla.redhat.com extension AFAIK. so if you have a patch for comments(), send it over and we can find a way to make it work with rh and non-rh bugzilla |
Opened pull request #7 as a potential fix for this |
Thanks, I've pushed your patch now |
From what I can see, the current code doesn't allow the retrieval of comments based on bug number. It should be as simple as adding a 'self._proxy.Bug.comments({'ids': bug_ids})' type of call into the base and referencing that from with the Bug class.
Any reason not to do this? I have a POC that seems to work that I could submit.
The text was updated successfully, but these errors were encountered: