Code review comment for lp:~sinzui/launchpad/release-bugtask-bug-512182

Revision history for this message
Curtis Hovey (sinzui) wrote :

This is my branch to send modification events from createProductRelease().

    lp:~sinzui/launchpad/release-bugtask-bug-512182
    Diff size: 79
    Launchpad bug: https://bugs.launchpad.net/bugs/512182
    Test command: ./bin/test -vv -t reg.*doc/milestone
    Pre-implementation: no one (where were the antipodeans?)
    Target release: 10.01

Send modification events from createProductRelease()
----------------------------------------------------

When a release is created from a milestone all the fix committed bugs are
updated to fix released, but the events are not recorded in the bug history,
nor is the assigned engineer awarded karma. The problem is in
Milestone.createProductRelease().

Rules
-----

    * The loop of bugtasks must use snapshot and ObjectModifiedEvent to
      ensure the subscribers are notified.

QA
--

    * Create a release on staging from a milestone that has bugs that are
      fix committed.
    * Verify the bug status change in in the bug history.
    * Verify the assigned user was awarded the karma.

Lint
----

Linting changed files:
  lib/lp/registry/doc/milestone.txt
  lib/lp/registry/model/milestone.py

Test
----

    * lib/lp/registry/doc/milestone.txt
      * Added a test to verify that an ObjectModifiedEvent is called for
        the updated bugtask.

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

    * lib/lp/registry/model/milestone.py
      * Updated the bugtask loop to use notify(ObjectModifiedEvent(...))
        for each bugtask.

« Back to merge proposal