[python-bugzilla] Examples of setting release notes
Bryan Kearney
bkearney at redhat.com
Fri Jun 20 13:13:30 UTC 2014
On 06/19/2014 04:29 PM, Cole Robinson wrote:
> On 06/19/2014 04:26 PM, Bryan Kearney wrote:
>> On 06/19/2014 04:18 PM, Cole Robinson wrote:
>>> On 06/19/2014 03:31 PM, Bryan Kearney wrote:
>>>> Does anyone have examples of using python-bugzilla to set release notes?
>>>>
>>>
>>> Haven't confirmed, but it's probably just:
>>>
>>> bz.update([list, of, ids], {"cf_release_notes": "my release notes"})
>>>
>>> If you're ever wondering what the bugzilla field name is, you can do
>>>
>>> bugzilla query --bug_id $bugnum --raw
>>>
>>> And check the attribute names
>>>
>>> - Cole
>>>
>> I tried to do
>>
>> updates = bugzilla.build_update(\
>> cf_doc_type = "v8_cf_doc_type",
>> cf.release_notes = note)
>> bugzilla.update_bugs(bugid,updates)
>>
>> but I keep getting failures since this is a rh extension. does the bz.update
>> path bypass the check of known attributes?
>>
>
> build_update doesn't have an explicit option for the custom RH release_notes
> field, and a bunch of other custom fields as well. All build_update does is a
> more user friendly way to create a suitable dictionary to pass to update_bugs.
> So you can also do:
>
> update = bugzilla.build_update(...)
> update["cf_release_notes"] = "foo"
> bugzilla.update_bugs(ids, update)
>
> - Cole
>
Thank you.. I went with this:
updates = {\
"cf_doc_type ": "v8_cf_doc_type",
"cf_release_notes" : note}
bugzilla.update_bugs(bugid,updates)
-- bk
More information about the python-bugzilla
mailing list