Bug Activity Log Completion
- Lose the Message column, which adds no real value, and move anything therein into the 'what changed column' (c.f. adding subscribers).
- All portlets on the +activity page (actions menu, subscribers, search, bug watches, etc.) can be removed; they aren't needed for that page (this would fix bug 28750).
- Make it more clear when we're refering to bugs in changes. So, for example, marking as a duplicate just uses the bug number in the Old Value / New Value area. We should write "Bug $foo" and linkify it like we do in bug comments.
- Check that the date format used is standard to Launchpad.
It'd be really nice if we could be sure that all changes associated with a bug would be recorded in the activity log, without developers having to make changes to the activity log code when they add new bug/bugtask-related features. However, this is a nice-to-have; it'd be pretty hard to actually do it at the moment.
Existing work
mpt already did some work on mocking up the UI for interleaving activity log with bug comments back in the distant past. The mockups can be found here. We're probably going to do some new mockups using the new Launchpad UI, but we'll keep these around for reference for the time being.
Altering the way BugActivity and BugNotification get updated
kiko has suggested that we alter the way that changes get made to bugs. At the moment, a change made to a bug will trigger an Event, which will then be processed by a handler. The handler will then call IBug.addChangeNotification() or IBug.addCommentNotification() depending on the type of Event that it's handling.
kiko's suggestion is that we alter this as follows:
Replace the current addChangeNotification() and addCommentNotification() with a single addChangeNotification() method.
The new addChangeNotification() method will accept an object that describes the change and knows how to add BugActivity and BugNotification records for that change.
So, we'd have, say, a BugChange class and a BugTaskChange class, each of which knows how to handle the changes to a bug or bug task properly.
The base class for this command object - let's call it BugChangeBase for argument's sake - would raise NotImplemented in the methods responsible for adding BugNotification and BugActivity records. This way, we could ensure that for each new type of bug change that we add the developer must add methods to deal with BugActivity and BugNotification properly.
Bugs to fix
Preparatory work:
- Change the API to ensure that notification and activity are both accounted for.
bug 253241 Add direct tests for all the Bug(Task|Subscription|Etc.) handlers
Sorted by priority. Taken from bugs on malone tagged 'bughistory'.
bug 5443 Bug activity doesn't indicate changes to the product
bug 34619 Activity log should show package reassignment
bug 45582 Activity log doesn't capture security and privacy flag changes
bug 56630 Tag changes are not recorded in the activity log
bug 95732 Activity log doesn't show who added a task or when
bug 163091 Activity log shows which package was changed but not which distribution
bug 28741 activity log doesn't differentiate between the trackers
bug 155290 "Audit Trail" show subscriber additions, not subscriber deletions
bug 252943 Bug activity does not show changes to watches
bug 199594 Removing or editing an attachment isn't recorded in +activity
bug 252951 ActivityLog does not track nominations / targetting to a series
bug 252957 Activty log doesn't record Bug -> question conversions properly
bug 252958 Activity log doesn't record when people unsubscribe
bug 252959 Bug activity does not show changes to CVE references
bug 252962 Bug activity does not show changes to branches
bug 253238 Move <subscriber> stanzas from bugactivity-subscriptions.zcml into bug{,task}-events.zcml
Potential future work:
bug 253242 Fill in the gaps in the activity log using data from bug notifications
Changes to subscribers/bugactivity.py
record_bugsubscription_added() currently marks whatchanged='bug' and message='added subscriber %s'. It should instead do something like whatchanged='subscriber added', newvalue=$subscriber.
Remove record_product_task_(added|edited)() since they aren't used and are pretty much identical to record_bugtask_(added|edited)().
Currently unmonitored bug activity
Bug
- attachments
don't do editing, deleting bug 199594
branches bug 252962
cves bug 252959
nominations bug 252951
private bug 45582
- questions
- don't track properly; we currently only record the status change (to Invalid) that is a side-effect of the conversion.
security_related bug 45582
- subscriptions
don't do unsubscribe bug 252958
tags bug 56630
watches bug 252943
BugTask
bugwatch bug 252943
These all come under the heading of BugTarget and all fall under bug 5443 or bug 34619:
- distribution
- distroseries
- product
- productseries
sourcepackagename (should record distro for a package, too. See bug 163091).
Overview of all current bug activity monitoring
Bug
- attachments
- do adding
- don't do editing, deleting
- branches
- do nothing
- cves
- do nothing
- description
- do
- duplicateof
- do
- name
- do
- nominations
- do nothing (only bug task creation)
- private
- do nothing
- questions
- don't track properly; we currently only record the status change (to Invalid) that is a side-effect of the conversion.
- security_related
- do nothing
- subscriptions
- do subscribe
- don't do unsubscribe
- tags
- do nothing
- title
- do
- watches
- do nothing
- bugtasks
- do added
- see below for the rest
BugTask
- assignee
- do
- bugwatch
- do nothing
- distribution
- do nothing
- distroseries
- do nothing
- importance
- do
- milestone
- do
- product
- do nothing
- productseries
- do nothing
- sourcepackagename
- do nothing
- status
- do