launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #06154
[Merge] lp:~sinzui/launchpad/export-private-bugs-0 into lp:launchpad
Curtis Hovey has proposed merging lp:~sinzui/launchpad/export-private-bugs-0 into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #920566 in Launchpad itself: "private_bugs is not exposed over the API"
https://bugs.launchpad.net/launchpad/+bug/920566
For more details, see:
https://code.launchpad.net/~sinzui/launchpad/export-private-bugs-0/+merge/89784
Export private_bugs to the API.
Launchpad bug: https://bugs.launchpad.net/bugs/920566
Pre-implementation: no one
It is not possible to setup a project using a script so that it has private
bugs by default.
--------------------------------------------------------------------
RULES
* Export the private_bugs attr.
QA
As a Registry Administrator or Commercial Admin
* Using an API script, verify you can set the private_bugs flag.
from launchpadlib.launchpad import Launchpad
lp = Launchpad.login_with(
'testing', service_root='https://api.qastaging.launchpad.net',
version='devel')
project = lp.projects['pocket-lint']
print "private_bugs is %s" % project.private_bugs
project.private_bugs = not project.private_bugs
project.lp_save()
print "set private_bugs to %s" % project.private_bugs
LINT
lib/lp/registry/interfaces/product.py
lib/lp/registry/stories/webservice/xx-project-registry.txt
TEST
./bin/test -vv -t xx-project-registry lp.registry.tests.test_doc
IMPLEMENTATION
Updated the doctest to verify private_bugs was exported and then exported
the attr.
lib/lp/registry/interfaces/product.py
lib/lp/registry/stories/webservice/xx-project-registry.txt
--
https://code.launchpad.net/~sinzui/launchpad/export-private-bugs-0/+merge/89784
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sinzui/launchpad/export-private-bugs-0 into lp:launchpad.
=== modified file 'lib/lp/registry/interfaces/product.py'
--- lib/lp/registry/interfaces/product.py 2012-01-01 02:58:52 +0000
+++ lib/lp/registry/interfaces/product.py 2012-01-23 20:50:04 +0000
@@ -613,10 +613,10 @@
description=_("Whether or not this project's attributes are "
"updated automatically."))
- private_bugs = Bool(title=_('Private bugs'),
+ private_bugs = exported(Bool(title=_('Private bugs'),
description=_(
"Whether or not bugs reported into this project "
- "are private by default."))
+ "are private by default.")))
licenses = exported(
Set(title=_('Licenses'),
value_type=Choice(vocabulary=License)))
=== modified file 'lib/lp/registry/stories/webservice/xx-project-registry.txt'
--- lib/lp/registry/stories/webservice/xx-project-registry.txt 2011-12-24 15:18:32 +0000
+++ lib/lp/registry/stories/webservice/xx-project-registry.txt 2012-01-23 20:50:04 +0000
@@ -176,6 +176,7 @@
name: u'firefox'
official_bug_tags: []
owner_link: u'http://.../~name12'
+ private_bugs: False
programming_language: None
project_group_link: u'http://.../mozilla'
project_reviewed: False
@@ -241,6 +242,7 @@
name: u'firefox'
official_bug_tags: []
owner_link: u'http://.../~name12'
+ private_bugs: False
programming_language: None
project_group_link: u'http://.../mozilla'
project_reviewed:...redacted...
@@ -402,7 +404,6 @@
When the owner_link is changed the ownership of some attributes is
changed as well.
- >>> # Create a product with a series and release.
>>> login('test@xxxxxxxxxxxxx')
>>> test_project_owner = factory.makePerson(name='test-project-owner')
>>> test_project = factory.makeProduct(