Merge lp://staging/~sinzui/launchpad/not-packaged into lp://staging/launchpad/db-devel

Proposed by Curtis Hovey
Status: Rejected
Rejected by: Curtis Hovey
Proposed branch: lp://staging/~sinzui/launchpad/not-packaged
Merge into: lp://staging/launchpad/db-devel
Diff against target: 786 lines (+284/-184)
13 files modified
database/sampledata/current-dev.sql (+38/-38)
database/sampledata/current.sql (+35/-35)
database/schema/patch-2207-96-0.sql (+12/-0)
lib/lp/registry/browser/product.py (+28/-3)
lib/lp/registry/browser/tests/product-portlet-packages-view.txt (+117/-14)
lib/lp/registry/browser/tests/product-views.txt (+0/-75)
lib/lp/registry/configure.zcml (+3/-0)
lib/lp/registry/doc/product.txt (+27/-3)
lib/lp/registry/interfaces/product.py (+9/-0)
lib/lp/registry/model/product.py (+2/-0)
lib/lp/registry/stories/product/xx-product-index.txt (+4/-3)
lib/lp/registry/stories/webservice/xx-project-registry.txt (+2/-0)
lib/lp/registry/templates/product-portlet-packages.pt (+7/-13)
To merge this branch: bzr merge lp://staging/~sinzui/launchpad/not-packaged
Reviewer Review Type Date Requested Status
Henning Eggers (community) code Needs Fixing
Björn Tillenius database Pending
Review via email: mp+22810@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: 778
    Launchpad bug: https://bugs.launchpad.net/bugs/538024
    Test command: ./bin/test -vv \
        -t reg.*doc/product.txt \
        -t reg.*webservice/xx-project-registry.txt \
        -t reg.*product-views \
        -t reg.*product-portlet-packages-view \
        -t reg.*xx-product-index
    Pre-implementation: Edwin, Jonathan, Brad
    Target release: 10.04

Allow users to say a project is not packaged in Ubuntu
------------------------------------------------------

If you look at https://launchpad.net/launchpad-web you'll see suggestions for
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.date_last_packaging_check to schema and interface.
    * Add a rule to product-portlet-packages to suggest packages if
      There are no packages and
      The date_last_packaging_check is None or > now - 1 year
    * Add an action to the form for the user to say:
      This is Not Packaged in Ubuntu
    * Replace the +ubuntupkg link with an option in the suggestions so
      that to form has only two actions for the user. Choosing the new
      option will redirect the user to +ubuntupkg

UI
--

The image at

    http://people.canonical.com/~curtis/package-suggestion-portlet.png

shows two presentations of the Packages in Ubuntu portlet for unlinked
project

    * The version with suggestions shows a single suggestion and an
      option to state that the project provides an unlisted package.
      The user can choose to link to a package or state the project
      has no Ubuntu packages.
    * the version without suggests states that there were no matches,
      but allows the user to still another package. The user can also
      state that the project is not packaged in Ubuntu.

The user is redirect to <project>/<trunk>/+ubuntupkg when he chooses
"An unlisted package" and (Link to Ubuntu Package).

QA
--

    * Visit https://edge.launchpad.net/gdp (not packaged with suggestions).
    * Choose (This is Not Packaged in Ubuntu).
    * Verify the page does not suggest packages when it reloads.
    * Visit https://edge.launchpad.net/gedit-class-browser
      (not packaged without suggestions).
    * Choose "An unlisted package" and (Link to Ubuntu Package).
    * Verify you are on the +ubuntupkg form.

Lint
----

Linting changed files:
  database/sampledata/current-dev.sql
  database/sampledata/current.sql
  database/schema/patch-2207-96-0.sql
  lib/lp/registry/configure.zcml
  lib/lp/registry/browser/product.py
  lib/lp/registry/browser/tests/product-portlet-packages-view.txt
  lib/lp/registry/browser/tests/product-views.txt
  lib/lp/registry/doc/product.txt
  lib/lp/registry/interfaces/product.py
  lib/lp/registry/model/product.py
  lib/lp/registry/stories/product/xx-product-index.txt
  lib/lp/registry/stories/webservice/xx-project-registry.txt
  lib/lp/registry/templates/product-portlet-packages.pt

Test
----

    * lib/lp/registry/doc/product.txt
      * Added documentation for date_last_packaging_check.
    * lib/lp/registry/stories/webservice/xx-project-registry.txt
      * Verified that date_last_packaging_check is exported.
    * lib/lp/registry/browser/tests/product-views.txt
      * Removed redundant test. product-portlet-packages-view.txt did the
        same tests.
    * lib/lp/registry/browser/tests/product-portlet-packages-view.txt
      * Revised the test to show that choosing "An unlisted package"
        redirects to +ubuntupkg. Removed the verification of the link
        to the form.
      * Verified that form label states that the packages are in the
        current Ubuntu series.
      * Verified that the form is not rendered when the user is anonymous.
      * Verified that the for is rendered when last_date_packaging_check
        is None or older than a year, otherwise it is not rendered.
      * Added a test to verify the form works.
    * lib/lp/registry/stories/product/xx-product-index.txt
      * Updated the test to verify what the user sees.

Implementation
--------------

    * database/schema/patch-2207-96-0.sql
      * Added date_last_packaging_check column to Product.
    * database/sampledata/current-dev.sql
      * regenerated sample data.
    * database/sampledata/current.sql
      * regenerated sample data.
    * lib/lp/registry/configure.zcml
      * Any logged in user can set last_date_packaging_check.
    * lib/lp/registry/interfaces/product.py
      * Added date_last_packaging_check
    * lib/lp/registry/model/product.py
      * Added date_last_packaging_check
    * lib/lp/registry/browser/product.py
      * Revised the rules to show the portlet--do not show it if
        date_last_packaging_check is not < a year old.
      * Revised the packages vocabulary to include an option to represent
        another package. When the user chooses the option, he is redirected
        to +ubuntupkg.
      * Revised the field label to make it clear that the packages are in
        the current Ubuntu series.
      * Added a action to state that the project is not packaged. The
        date_last_packaging_check is set to now.
    * lib/lp/registry/templates/product-portlet-packages.pt
      * Removed the link to +ubuntupkg.
      * Moved the paragraph about no matches into the first form so that
        the second form could be removed.

To post a comment you must log in.
Revision history for this message
Henning Eggers (henninge) wrote :
Download full text (22.3 KiB)

Hi Curtis,
thank you for this important work to get the link-to-upstream work ahead. I see things coming together and this is a part of it.

However, I cannot yet approve this branch, please see my comments below. Also, I ask you to please seek an UI review, too, as mentioned elsewhere in my comments.

Am 05.04.2010 18:37, schrieb Curtis Hovey:
>
> Allow users to say a project is not packaged in Ubuntu
> ------------------------------------------------------
>
> If you look at https://launchpad.net/launchpad-web you'll see suggestions for
> 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.date_last_packaging_check to schema and interface.
> * Add a rule to product-portlet-packages to suggest packages if
> There are no packages and
> The date_last_packaging_check is None or> now - 1 year
> * Add an action to the form for the user to say:
> This is Not Packaged in Ubuntu
> * Replace the +ubuntupkg link with an option in the suggestions so
> that to form has only two actions for the user. Choosing the new
> option will redirect the user to +ubuntupkg
>
>
> UI
> --
>
> The image at
>
> http://people.canonical.com/~curtis/package-suggestion-portlet.png
>
> shows two presentations of the Packages in Ubuntu portlet for unlinked
> project
>
> * The version with suggestions shows a single suggestion and an
> option to state that the project provides an unlisted package.
> The user can choose to link to a package or state the project
> has no Ubuntu packages.
> * the version without suggests states that there were no matches,
> but allows the user to still another package. The user can also
> state that the project is not packaged in Ubuntu.

I am not doing a UI review here but I think this branch needs one. Let me still add my thoughts here.
In the second version it seems pointless to have just one static element in the radio button list. I think it would be much saner to not display the heading and the list in this case and have the "Link Ubuntu package" redirect to +ubuntupkg (which it does anyway).

>
> The user is redirect to<project>/<trunk>/+ubuntupkg when he chooses
> "An unlisted package" and (Link to Ubuntu Package).
>
>
> QA
> --
>
> * Visit https://edge.launchpad.net/gdp (not packaged with suggestions).
> * Choose (This is Not Packaged in Ubuntu).
> * Verify the page does not suggest packages when it reloads.
> * Visit https://edge.launchpad.net/gedit-class-browser
> (not packaged without suggestions).
> * Choose "An unlisted package" and (Link to Ubuntu Package).
> * Verify you are on the +ubuntupkg form.

Maybe add a step to have a LOSA apply some SQL to change date_last_packaging_check to be a year old, to test the expiry functionality?

However, I had some problems trying this out on dev.

 * When clicking on "This is Not Packaged in Ubuntu" without selecting a radio button, the form r...

review: Needs Fixing (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: