Merge lp:~sinzui/launchpad/licenses-modified into lp:launchpad
Status: | Merged |
---|---|
Approved by: | j.c.sackett |
Approved revision: | not available |
Merge reported by: | Curtis Hovey |
Merged at revision: | not available |
Proposed branch: | lp:~sinzui/launchpad/licenses-modified |
Merge into: | lp:launchpad |
To merge this branch: | bzr merge lp:~sinzui/launchpad/licenses-modified |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
j.c.sackett (community) | Approve | ||
Review via email: mp+107229@code.launchpad.net |
Commit message
Prevent Launchpad from notifying maintainers multiple times when their project was given a complimentary commercial subscription.
Description of the change
Pre-implementation: flacoste
When an existing project uses Change details to add a proprietary
license, The maintainer is notified once because the licenses change,
and then again because the form was used to change the project. The
ObjectModifiedEvent event is created twice, which in turn calls the single
subscriber to IObjectModified
-------
RULES
* Create a specific kind of event that is only created by the
_
* Subclass the ObjectModifiedEvent and implemented a unique interface.
* Do not use edited_fields because few callsites populate it
properly. Francis advises not supporting it.
* Subscribe the notify function to the new interface.
* Update the model (which is used by both UI and API) to notify
the new event. It will be the only callsite for the event in
any request.
QA
* Visit https:/
* Register a new project and choose the MIT license.
* Choose Change details
* Add the proprietary license.
* Verify only one notification is shown.
LINT
lib/
lib/
lib/
lib/
lib/
TEST
./bin/test -vvc lp.registry.
IMPLEMENTATION
Created LicensesModifie
events. The class ignores the edited_fields and object_
but they are provided for the parent class. Updated _setLicenses() to
use the new event.
lib/
lib/
lib/
Subscribed product_
the codes that was needed to work with the generic event.
lib/
lib/
lib/
Launchpad is struggling to show the diff, yet loggerhead can show it :(.
Attached is the diff of this branch against devel.
-- launchpad. net/~sinzui
Curtis Hovey
http://