Merge lp://qastaging/~edwin-grubbs/launchpad/bug-602385-register-project-from-sourcepackage-page-part2 into lp://qastaging/launchpad/db-devel
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Curtis Hovey | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 9653 | ||||
Proposed branch: | lp://qastaging/~edwin-grubbs/launchpad/bug-602385-register-project-from-sourcepackage-page-part2 | ||||
Merge into: | lp://qastaging/launchpad/db-devel | ||||
Prerequisite: | lp://qastaging/~edwin-grubbs/launchpad/bug-602385-register-project-from-sourcepackage-page | ||||
Diff against target: |
772 lines (+340/-97) 10 files modified
README (+106/-4) lib/canonical/launchpad/emailtemplates/product-other-license.txt (+3/-2) lib/canonical/widgets/product.py (+1/-0) lib/canonical/widgets/templates/license.pt (+23/-5) lib/lp/registry/browser/product.py (+81/-9) lib/lp/registry/browser/sourcepackage.py (+9/-6) lib/lp/registry/browser/tests/project-add-views.txt (+23/-23) lib/lp/registry/browser/tests/test_sourcepackage_views.py (+71/-39) lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt (+19/-5) lib/lp/registry/templates/product-new.pt (+4/-4) |
||||
To merge this branch: | bzr merge lp://qastaging/~edwin-grubbs/launchpad/bug-602385-register-project-from-sourcepackage-page-part2 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | ui | Approve | |
Leonard Richardson (community) | Approve | ||
Review via email: mp+32234@code.qastaging.launchpad.net |
Description of the change
Summary
-------
This branch finishes the work on bug 602385. When you register a project
off of the source package page, you will now get to see the source
package's copyright info, so that you can choose the license more
easily. When the project is created, it will automatically be linked to
the source package.
Implementation details
-------
Added LicenseWidget.
template can display $source_
lib/
lib/
Add source_package_name and distroseries hidden fields to
ProjectAddStepO
into self.request.form, since they are already available as
self.request.
Verify that the user is redirected back to the source package, that they
are linked, and that there is an informational message explaining that.
lib/
lib/
lib/
Add source_package_name and distroseries to the url that takes you from
the source package page to the /projects/+new page. Since the source
package is autolinked after creating the project, there is no need to
redirect the user back to +edit-packaging, so the return_url is now just
set to the canonical url for the source package.
lib/
lib/
Fixed bad tests that were dependent on copying fields from data to
self.request.form.
lib/
Tests
-----
./bin/test -vv -t 'test_sourcepac
Demo and Q/A
------------
Add copyright information on launchpad.dev by running this query.
UPDATE SourcePackageRe
SET copyright =
'The following line should be highlighted since it looks like a license
/usr/
foo
bar
baz
1
2
3
4';
* Open http://
1. Select "Register the upstream project" radio button.
2. Click on "Link to Upstream Project"
3. You should now be on Step 2 of the /projects/+new page.
4. Verify that clicking on the green "Copyright info from source package"
link expands the copyright.
5. Select a license.
6. Click on "Complete registration and link to pmount package".
7. You now be redirected back to
http://
There should be an informational message saying:
"Linked Pmount project to pmount source package"
and the "Upstream connections" portlet should show Pmount=>trunk.
* Click on the yellow edit-icon next to Pmount=>trunk.
* Click on the "Register the upstream project" link.
* The /projects/+new page should give you an error that pmount is
already used by another project.
* Choose a different URL, click Continue, click
"No, this is a new project", and then follow steps 3 through 6 above.
* If you didn't use a different displayname, you will have to hover
over the first link in Pmount=>trunk to see that it points to the
new pmount project and not the first one you created.
r=me with the minor changes discussed on IRC (Seeing whether 'count' is really neccessary, reformatting the line wrap when printing out the email so as to avoid confusing readers of the tests.)