Merge lp:~wgrant/launchpad/no-ibug-private-default into lp:launchpad

Proposed by William Grant on 2012-08-08
Status: Merged
Approved by: William Grant on 2012-08-08
Approved revision: no longer in the source branch.
Merged at revision: 15766
Proposed branch: lp:~wgrant/launchpad/no-ibug-private-default
Merge into: lp:launchpad
Diff against target: 38 lines (+3/-6)
2 files modified
lib/lp/bugs/interfaces/bug.py (+1/-2)
lib/lp/bugs/interfaces/malone.py (+2/-4)
To merge this branch: bzr merge lp:~wgrant/launchpad/no-ibug-private-default
Reviewer Review Type Date Requested Status
Steve Kowalik (community) code 2012-08-08 Approve on 2012-08-08
Review via email: mp+118661@code.launchpad.net

Commit Message

Clean up private/security_related defaults on IBug to not be specified.

Description of the Change

A followup to the isolated fix for bug #1034089, this branch drops the default values of False from IBug['private'] and IBug['security_related']. This lets them default to None, so createBug knows to use the target-specific default. IMaloneApplication['createBug'] no longer needs to override them.

To post a comment you must log in.
Steve Kowalik (stevenk) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/bugs/interfaces/bug.py'
2--- lib/lp/bugs/interfaces/bug.py 2012-08-06 03:47:42 +0000
3+++ lib/lp/bugs/interfaces/bug.py 2012-08-08 02:23:40 +0000
4@@ -208,7 +208,6 @@
5 Bool(title=_("This bug report should be private"), required=False,
6 description=_("Private bug reports are visible only to "
7 "their subscribers."),
8- default=False,
9 readonly=True))
10 information_type = exported(
11 Choice(
12@@ -343,7 +342,7 @@
13 readonly=True)))
14 security_related = exported(
15 Bool(title=_("This bug is a security vulnerability."),
16- required=False, default=False, readonly=True))
17+ required=False, readonly=True))
18 has_patches = Attribute("Does this bug have any patches?")
19 latest_patch_uploaded = exported(
20 Datetime(
21
22=== modified file 'lib/lp/bugs/interfaces/malone.py'
23--- lib/lp/bugs/interfaces/malone.py 2012-08-07 22:29:30 +0000
24+++ lib/lp/bugs/interfaces/malone.py 2012-08-08 02:23:40 +0000
25@@ -74,11 +74,9 @@
26 target=Reference(
27 schema=IBugTarget, required=True,
28 title=u"The project, distribution or source package that has "
29- "this bug."),
30- security_related=copy_field(IBug['security_related'], default=None),
31- private=copy_field(IBug['private'], default=None))
32+ "this bug."))
33 @export_factory_operation(
34- IBug, ['title', 'description', 'tags'])
35+ IBug, ['title', 'description', 'tags', 'security_related', 'private'])
36 def createBug(owner, title, description, target, security_related=None,
37 private=None, tags=None):
38 """Create a bug (with an appropriate bugtask) and return it.