Merge lp:~sinzui/launchpad/default-private-bug-damnit into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | William Grant | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 15761 | ||||
Proposed branch: | lp:~sinzui/launchpad/default-private-bug-damnit | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
157 lines (+90/-7) 4 files modified
lib/lp/bugs/browser/tests/test_bugs.py (+41/-0) lib/lp/bugs/interfaces/malone.py (+6/-4) lib/lp/bugs/tests/test_bugs_webservice.py (+36/-0) lib/lp/systemhomes.py (+7/-3) |
||||
To merge this branch: | bzr merge lp:~sinzui/launchpad/default-private-bug-damnit | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
William Grant | code | Approve | |
Review via email: mp+118644@code.launchpad.net |
Commit message
Honour what the user submits (and the project's default privacy bugs rule) when creating bugs via the API.
Description of the change
A recent attempt to refactor and normalise the bug creation rules causes
all bugs created of the API to be public if no private or security bools
are passed. The bug creation rules do not respect the default private
bug creation rules of the project.
-------
RULES
Pre-
* Locate the existing test that shows bugs created via the API honour
the default private bugs rules
* Damn it. Write one (again!)
* BugSet.createBug() is getting InformationType
Informati
* lp.systemhomes.
security bools to InformationType. The method sets the default values
for private/security to False/False; manufacturing user submitted
data for BugSet.createBug().
* Only adapt private/security if the user submits the information.
and will apply the projects default rules.
QA
* Run this function against qastaging:
def test_default_
lp = Launchpad.
project = lp.projects[
* Verify the bug is private.
* Run this function against qastaging:
def test_force_
lp = Launchpad.
project = lp.projects[
* Verify the bug is public.
LINT
lib/
lib/
lib/
lib/
TEST
./bin/test -vvc -t TestMaloneView lp.bugs.
./bin/test -vvc -t BugSetTestCase lp.bugs.
IMPLEMENTATION
Updated MaloneApplicati
kwargs if they are provided. Let BugSet.createBug() the bug using the
project's rules for default bug creation.
lib/
lib/
Update the exported createBug() to permit default None so that Lp does not
tamper with the data the user submits. Added an integration test to ensure
This rule does not break again.
lib/
lib/