Comment 0 for bug 512182

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

When a release is created from a milestone all the fix committed bugs are updated to fix released, but the events are nre recording the in the bug history, nor is the assigned enineer awarded karma. The problem is in Milestone.createProductRelease(). The look of bugtasks must use snapshot and ObjectModifiedEvent to ensure the subscriber.

        for bugtask in self.open_bugtasks:
            if bugtask.status == BugTaskStatus.FIXCOMMITTED:
                original_bugtask = Snapshot(
                    bugtask, providing=providedBy(bugtask))
                bugtask.transitionToStatus(BugTaskStatus.FIXRELEASED, owner)
                ObjectModifiedEvent(
                    object=bugtask, object_before_modification=original_bugtask,
                    edited_fields=['status']))