Merge lp://staging/~sinzui/launchpad/not-packaged-0 into lp://staging/launchpad/db-devel
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Curtis Hovey | ||||||||
Approved revision: | no longer in the source branch. | ||||||||
Merged at revision: | not available | ||||||||
Proposed branch: | lp://staging/~sinzui/launchpad/not-packaged-0 | ||||||||
Merge into: | lp://staging/launchpad/db-devel | ||||||||
Diff against target: |
639 lines (+202/-164) 13 files modified
database/sampledata/current-dev.sql (+38/-38) database/sampledata/current.sql (+35/-35) database/schema/comments.sql (+1/-0) database/schema/patch-2207-52-0.sql (+11/-0) lib/lp/registry/browser/product.py (+22/-5) lib/lp/registry/browser/tests/product-portlet-packages-view.txt (+50/-4) lib/lp/registry/browser/tests/product-views.txt (+0/-78) lib/lp/registry/configure.zcml (+3/-0) lib/lp/registry/doc/product.txt (+28/-3) lib/lp/registry/interfaces/product.py (+10/-0) lib/lp/registry/model/product.py (+1/-0) lib/lp/registry/stories/product/xx-product-index.txt (+1/-1) lib/lp/registry/stories/webservice/xx-project-registry.txt (+2/-0) |
||||||||
To merge this branch: | bzr merge lp://staging/~sinzui/launchpad/not-packaged-0 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stuart Bishop (community) | db | Approve | |
Björn Tillenius (community) | db | Approve | |
Brad Crittenden (community) | code | Approve | |
Review via email: mp+23693@code.staging.launchpad.net |
Description of the change
This is my branch to allow users to say a project is not packaged in Ubuntu.
lp:~sinzui/launchpad/not-packaged
Diff size: 632
Launchpad bug: https:/
https:/
Test command: ./bin/test -vv \
-t reg.*doc/
-t reg.*webservice
-t reg.*product-views \
-t reg.*product-
-t reg.*xx-
Pre-
Target release: 10.04
Allow users to say a project is not packaged in Ubuntu
-------
If you look at https:/
packaging information for the project. Thing is, this project is not packaged
and probably never will be. There's no way of telling Launchpad that or
getting rid of the prompt for packaging on the screen.
Rules
-----
* Add IProduct.
* Add a rule to product-
now is less than next_suggest_
* Add an option to the suggested packages:
This is Not Packaged in Ubuntu
that sets the date to resume suggestion at 1 year from now.
UI
--
The image at shows the "This project is not packaged in Ubuntu" option
and the fixed button label.
http://
QA
--
* Visit https:/
* Choose (This is Not Packaged in Ubuntu).
* Verify the page does not suggest packages when it reloads.
Lint
----
Linting changed files:
database/
database/
database/
database/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
Test
----
* lib/lp/
* Added documentation for next_suggest_
* lib/lp/
* Verified that next_suggest_
* lib/lp/
* Removed redundant test. product-
same tests.
* lib/lp/
* Verified that "This project is not packaged in Ubuntu" is a form
option.
* Verified that the form is not rendered when
* Verified that choosing "This project is not packaged in Ubuntu" sets
the next_suggest_
* lib/lp/
* Updated the test to verify what the user sees.
Implementation
--------------
Regenerated sample data for current and current-dev.
* database/
* Added next_suggest_
* database/
* Documented Product.
* lib/lp/
* Any logged in user can set next_suggest_
any logged in user can link a project to a source package.
* lib/lp/
* Added next_suggest_
* lib/lp/
* Added next_suggest_
* lib/lp/
* Revised the rules to show the portlet when now is less than
* Revised the packages vocabulary to include an option to represent
that the project is not packaged in Ubuntu.
* Fixed the casing of the 'Set Ubuntu Package Information' button label.
* Updated the action to set next_suggest_
now if the user chooses "This is not packaged in Ubuntu".
Hi Curtis,
This change looks very good. Thank you for your persistence in
getting it done.
On IRC I suggested a quiet period equal to the Ubuntu release
schedule, i.e. six months rather than twelve. What was your thinking
for twelve?
> === modified file 'lib/lp/ registry/ browser/ product. py' registry/ browser/ product. py 2010-04-14 17:16:56 +0000 registry/ browser/ product. py 2010-04-19 18:53:16 +0000 form.browser import TextAreaWidget, TextWidget self): launchpad. is_lpnet: packaging_ date = self.context. next_suggest_ packaging_ date packaging_ date is None packaging_ date < datetime. now(tz= pytz.UTC) )
> --- lib/lp/
> +++ lib/lp/
> @@ -44,8 +44,11 @@
>
>
> from cgi import escape
> +from datetime import datetime, timedelta
> from operator import attrgetter
>
> +import pytz
> +
> from zope.component import getUtility
> from zope.event import notify
> from zope.app.
> @@ -1047,6 +1050,7 @@
> suggestions = None
> max_suggestions = 8
> other_package = object()
> + not_packaged = object()
>
> @cachedproperty
> def sourcepackages(
> @@ -1064,8 +1068,10 @@
> return True
> if self.user is None or config.
> return False
> - else:
> - return True
> + next_suggest_
> + return (
> + next_suggest_
> + or next_suggest_
I think <= might be better.
> @property values( self):
> def initial_