Code review comment for lp:~edwin-grubbs/launchpad/bug-525956-unlink-button

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Summary
-------

The sourcepackage index page had an edit button but no way to remove
a link to the upstream via the project series.

The $distroseries/+packaging page also displayed identical info,
so I moved that into a template that could be shared.

Implementation details
----------------------

Moved identical formatting of upstream connection info from
distroseries-packaging.pt and sourcepackage-portlet-associations.pt
into sourcepackage-upstream-connections.pt. Added the (-) removal link
and moved the edit link next to the projectgroup/project/series info.
    lib/lp/registry/browser/configure.zcml
    lib/lp/registry/templates/distroseries-packaging.pt
    lib/lp/registry/templates/sourcepackage-portlet-associations.pt
    lib/lp/registry/templates/sourcepackage-upstream-connections.pt

Added $sourcepackage/+remove-packaging and $sourcepackage/upstream-connections.
    lib/lp/registry/browser/sourcepackage.py
    lib/lp/registry/browser/tests/sourcepackage-views.txt
    lib/lp/registry/stories/distroseries/xx-show-distroseries-packaging.txt
    lib/lp/registry/templates/sourcepackage-remove-packaging.pt

Drive-by improvement of formatting.
    lib/lp/registry/model/productseries.py
    lib/lp/registry/model/sourcepackage.py

Tests
-----

./bin/test -vv -t 'sourcepackage-views.txt|xx-show-distroseries-packaging.txt'

Demo and Q/A
------------

* Open https://launchpad.dev/ubuntu/hoary/+source/evolution
    * If there is a "Link to Upstream Project" button, use that
      since the removal button won't show up without an existing link.
    * The Upstream Connections portlet should show:
        GNOME ⇒ Evolution ⇒ trunk (E) (-)
      where (E) is the edit button, and (-) is the remove button.
    * Click on the (-) button.
    * Click on the Unlink button.
    * The Upstream Connections portlet should now show the
      "Link to Upstream Project" button again.
* Open https://launchpad.dev/ubuntu/hoary/+packaging
    * The table should now show the projectgroup/project/series like so:
        GNOME ⇒ Evolution ⇒ trunk (E) (-)

« Back to merge proposal