Merge lp:~edwin-grubbs/launchpad/bug-99395-linking-sourcepackages-to-projects into lp:launchpad
| Status: | Merged | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Approved by: | Edwin Grubbs on 2010-02-16 | ||||||||||||||||
| Approved revision: | not available | ||||||||||||||||
| Merged at revision: | not available | ||||||||||||||||
| Proposed branch: | lp:~edwin-grubbs/launchpad/bug-99395-linking-sourcepackages-to-projects | ||||||||||||||||
| Merge into: | lp:launchpad | ||||||||||||||||
| Diff against target: |
473 lines (+242/-78) 7 files modified
lib/canonical/launchpad/webapp/launchpadform.py (+6/-0) lib/lp/bugs/stories/bug-also-affects/xx-also-affects-upstream-default-values.txt (+3/-2) lib/lp/registry/browser/sourcepackage.py (+134/-46) lib/lp/registry/browser/tests/sourcepackage-views.txt (+68/-22) lib/lp/registry/stories/distribution/xx-distribution-packages.txt (+11/-1) lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt (+3/-2) lib/lp/registry/templates/sourcepackage-edit-packaging.pt (+17/-5) |
||||||||||||||||
| To merge this branch: | bzr merge lp:~edwin-grubbs/launchpad/bug-99395-linking-sourcepackages-to-projects | ||||||||||||||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Brad Crittenden (community) | code | 2010-02-16 | Approve on 2010-02-16 |
|
Review via email:
|
|||
Commit Message
Made $sourcepackage/
| Edwin Grubbs (edwin-grubbs) wrote : | # |
| Brad Crittenden (bac) wrote : | # |
Edwin this branch looks great. I expected the multistep stuff to be much harder. Thanks for a nice branch and thorough explanations.
| Edwin Grubbs (edwin-grubbs) wrote : | # |
> Edwin this branch looks great. I expected the multistep stuff to be much
> harder. Thanks for a nice branch and thorough explanations.
Hi Brad,
Here are some tests that were broken by +edit-packaging being two steps
now. I also have changes to browser/
erroneously edit the field's default without copying the field, so the
default value was propagated to other views and was not only a bad value
but also a stale storm object. I'm setting the default manually, since
passing in the render_context is more complicated for the multistep views.
-Edwin
Incremental diff:
=== modified file 'lib/lp/
--- lib/lp/
+++ lib/lp/
@@ -37,8 +37,9 @@
Let's follow the link and specify the packaging information.
>>> user_browser.
- >>> user_browser.
- ... 'thunderbird/
+ >>> user_browser.
+ >>> user_browser.
+ >>> user_browser.
>>> user_browser.
Now the upstream product will be chosen automatically also for pmount.
=== modified file 'lib/lp/
--- lib/lp/
+++ lib/lp/
@@ -28,6 +28,8 @@
from zope.schema.
getVocabul
+from lazr.restful.
+
from canonical.widgets import LaunchpadRadioW
from canonical.launchpad import helpers
@@ -143,8 +145,8 @@
class SourcePackageCh
"""A view to set the `IProductSeries` of a sourcepackage."""
- schema = IProductSeries
- _field_names = ['product']
+ schema = Interface
+ _field_names = []
step_name = 'sourcepackage_
template = ViewPageTemplat
@@ -158,7 +160,12 @@
series = self.context.
if series is not None:
- self.form_
+ default = series.product
+ else:
+ default = None
+ product_field = copy_field(
+ IProductSeries[
+ self.form_fields += Fields(
@property
def cancel_url(self):
=== modified file 'lib/lp/
--- lib/lp/
+++ lib/lp/
@@ -22,35 +22,67 @@
>>> print view.page_title
Link to an upstream project
- >>> print view.cancel...

Summary
-------
Make $sourcepackage/ +edit-packaging a two step form since users are
confused by having to enter $project/$series.
Implementation details ------- ------- -
-------
The launchpadform was displaying "(Optional)" next to readonly widgets, canonical/ launchpad/ webapp/ launchpadform. py
which seems silly.
lib/
Converted SourcePackageCh angeUpstreamVie w to MultiStepView. lp/registry/ browser/ sourcepackage. py lp/registry/ stories/ distribution/ xx-distribution -packages. txt
lib/
lib/
Added multistep info and info on creating a new series if needed. lp/registry/ templates/ sourcepackage- edit-packaging. pt
lib/
Tests
-----
./bin/test -vv -t xx-distribution -packages. txt
Demo and Q/A
------------
* Open https:/ /launchpad. dev/ubuntu/ warty/+ source/ iceweasel/ +edit-packaging
* Enter a project name.
* Click "Continue".
* Select a series.
* Click "Change".
* Verify that the series has changed on the sourcepackage page.