Make it possible to set bug privacy using the API

Bug #308374 reported by Kees Cook
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Eleanor Berger

Bug Description

Expose IBug.setPrivate to that it's possible to set bug privacy using the API.

--------------------------------------------------
was:

*setup launchpadlib object*
bug = launchpad.bugs[num]
bug.private = False
bug.lp_save()

this fails:
Traceback (most recent call last):
  File "./not-a-bug.py", line 33, in <module>
    bug.lp_save()
  File "/usr/lib/python2.5/site-packages/launchpadlib/resource.py", line 467, in lp_save
    self._root._browser.patch(URI(self.self_link), representation)
  File "/usr/lib/python2.5/site-packages/launchpadlib/_browser.py", line 263, in patch
    extra_headers=headers)
  File "/usr/lib/python2.5/site-packages/launchpadlib/_browser.py", line 211, in _request
    raise HTTPError(response, content)
launchpadlib.errors.HTTPError: HTTP Error 500: Internal Server Error

content is: ('private', <Bug at 0x974f1d0>)

OOPS: OOPS-1081EA142

Tags: api lp-bugs
Ursula Junque (ursinha)
description: updated
Revision history for this message
Eleanor Berger (intellectronica) wrote :

Setting bug privacy using the API is not possible yet. When it will be, though, it probably won't be by setting the `private` attribute but rather by calling setPrivate on the bug.

description: updated
Changed in malone:
importance: Undecided → High
milestone: none → 2.2.1
status: New → Triaged
Revision history for this message
Kees Cook (kees) wrote :

In the meantime, the documentation should be adjusted -- it currently shows "private" as "writable".

Changed in malone:
assignee: nobody → intellectronica
status: Triaged → In Progress
Changed in malone:
status: In Progress → Fix Committed
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.