Merge lp:~wallyworld/launchpad/branch-infotype-portlet-1040999 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Ian Booth on 2012-08-28 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15875 |
| Proposed branch: | lp:~wallyworld/launchpad/branch-infotype-portlet-1040999 |
| Merge into: | lp:launchpad |
| Diff against target: |
348 lines (+95/-59) 5 files modified
lib/lp/code/browser/branch.py (+31/-13) lib/lp/code/browser/configure.zcml (+7/-0) lib/lp/code/browser/tests/test_branch.py (+45/-40) lib/lp/code/stories/branches/xx-branch-edit-privacy.txt (+4/-4) lib/lp/code/templates/branch-portlet-privacy.pt (+8/-2) |
| To merge this branch: | bzr merge lp:~wallyworld/launchpad/branch-infotype-portlet-1040999 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| William Grant | code | 2012-08-27 | Approve on 2012-08-28 |
|
Review via email:
|
|||
Commit Message
Allow branch's information type to be changed from the privacy portlet; always allow branch to be marked as security related.
Description of the Change
== Implementation ==
This branch does 2 things:
1. add an edit link to the branch privacy portlet to allow information type to be edited
This branch does not wire up any javascript (that will be done next branch). So the user clicks on the edit link and is taken to a new edit page where they can edit the information type. ie the same non js infrastructure as used elsewhere for lifecycle status etc. The view used to process the information type change does have the ajax processing in place so the next branch will be only javascript.
2. change the algorithm used by getInformationT
Previously, a branch could not be made private/public security unless there were such bugs linked. Now, a branch can always be marked as security. The hooks for checking linked bugs have been left in place though because even though not used right now, very soon user data branches will only be allowed when there are user data linked bugs.
== Tests ==
Add test to TestBranchEditView to check the XHR updating of information type work correctly.
Update tests in TestBranchEditV
Update TestBranchPriva
== Lint ==
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
| Ian Booth (wallyworld) wrote : | # |
Thanks!
> 16 + @enabled_
> 17 + def visibility(self):
> 18 + """Return the 'Set information type' Link."""
> 19 + text = 'Change information type'
> 20 + return Link('+
>
> Should this be information_type instead of visibility?
>
I considered it but bugs uses 'visibility' for exactly the same thing and I wanted to be consistent.
How strongly do you feel about changing it?
| William Grant (wgrant) wrote : | # |
On 28/08/12 13:39, Ian Booth wrote:
> Thanks!
>
>> 16 + @enabled_
>> 17 + def visibility(self):
>> 18 + """Return the 'Set information type' Link."""
>> 19 + text = 'Change information type'
>> 20 + return Link('+
>>
>> Should this be information_type instead of visibility?
>>
>
> I considered it but bugs uses 'visibility' for exactly the same thing and I wanted to be consistent.
> How strongly do you feel about changing it?
Not strongly at all, but Bugs probably isn't good precedent, as the name
derives from the old hybrid privacy/security portlet.

16 + @enabled_ with_permission ('launchpad. Edit') edit-informatio n-type' , text)
17 + def visibility(self):
18 + """Return the 'Set information type' Link."""
19 + text = 'Change information type'
20 + return Link('+
Should this be information_type instead of visibility?
55 InformationType .PUBLICSECURITY , .PRIVATESECURIT Y,
56 InformationType
57 )
Could you fix these to be in the traditional order (between PUBLIC and USERDATA)?
129 + class=" lp.code. browser. branch. BranchEditInfor mationTypeView" "launchpad. Edit"
130 + permission=
This should probably be launchpad.Moderate. Curtis added it last week to let project owners change the information type too.