= 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 [[https://launchpad.canonical.com/BugHistory|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. *[[http://launchpad.net/bugs/253241|bug 253241]] Add direct tests for all the Bug(Task|Subscription|Etc.) handlers Sorted by priority. Taken from [[https://bugs.edge.launchpad.net/malone/+bugs?field.tag=bughistory|bugs on malone tagged 'bughistory']]. *[[http://launchpad.net/bugs/5443|bug 5443]] Bug activity doesn't indicate changes to the product *[[http://launchpad.net/bugs/34619|bug 34619]] Activity log should show package reassignment *[[http://launchpad.net/bugs/45582|bug 45582]] Activity log doesn't capture security and privacy flag changes *[[http://launchpad.net/bugs/56630|bug 56630]] Tag changes are not recorded in the activity log *[[http://launchpad.net/bugs/95732|bug 95732]] Activity log doesn't show who added a task or when *[[http://launchpad.net/bugs/163091|bug 163091]] Activity log shows which package was changed but not which distribution *[[http://launchpad.net/bugs/28741|bug 28741]] activity log doesn't differentiate between the trackers *[[http://launchpad.net/bugs/155290|bug 155290]] "Audit Trail" show subscriber additions, not subscriber deletions *[[http://launchpad.net/bugs/252943|bug 252943]] Bug activity does not show changes to watches *[[http://launchpad.net/bugs/199594|bug 199594]] Removing or editing an attachment isn't recorded in +activity *[[http://launchpad.net/bugs/252951|bug 252951]] ActivityLog does not track nominations / targetting to a series *[[http://launchpad.net/bugs/252957|bug 252957]] Activty log doesn't record Bug -> question conversions properly *[[http://launchpad.net/bugs/252958|bug 252958]] Activity log doesn't record when people unsubscribe *[[http://launchpad.net/bugs/252959|bug 252959]] Bug activity does not show changes to CVE references *[[http://launchpad.net/bugs/252962|bug 252962]] Bug activity does not show changes to branches *[[https://bugs.edge.launchpad.net/malone/+bug/253238|bug 253238]] Move stanzas from bugactivity-subscriptions.zcml into bug{,task}-events.zcml Potential future work: * [[https://bugs.edge.launchpad.net/malone/+bug/253242|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 [[http://launchpad.net/bugs/199594|bug 199594]] * branches [[http://launchpad.net/bugs/252962|bug 252962]] * cves [[http://launchpad.net/bugs/252959|bug 252959]] * nominations [[http://launchpad.net/bugs/252951|bug 252951]] * private [[http://launchpad.net/bugs/45582|bug 45582]] * questions * don't track properly; we currently only record the status change (to Invalid) that is a side-effect of the conversion. * [[http://launchpad.net/bugs/252957|bug 252957]] * security_related [[http://launchpad.net/bugs/45582|bug 45582]] * subscriptions * don't do unsubscribe [[http://launchpad.net/bugs/252958|bug 252958]] * tags [[http://launchpad.net/bugs/56630|bug 56630]] * watches [[http://launchpad.net/bugs/252943|bug 252943]] === BugTask === * bugwatch [[http://launchpad.net/bugs/252943|bug 252943]] * These all come under the heading of `BugTarget` and all fall under [[http://launchpad.net/bugs/5443|bug 5443]] or [[http://launchpad.net/bugs/34619|bug 34619]]: * distribution * distroseries * product * productseries * sourcepackagename (should record distro for a package, too. See [[http://launchpad.net/bugs/163091|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