VersionThreeDotO/Bugs/ActivityLogInterleaving

Not logged in - Log In / Register

Activity Log Interleaving

Preamble

We would like to display all bug activity interleaved with the comments on the main bug page, and ditch the +activity page.

But first we need to think about how we record activity because there are some issues there.

Recording activity

Currently we use the BugActivity table, but this has a far from complete record of activity. By contrast, the BugNotification table (which references Message and thus MessageChunk) contains a fairly consistent and comprehensive record which can be readily parsed. However, it only contains information about events that subscribers have been notified of.

In short, many events which we would like to show in the UI are not being recorded.

Some ideas:

  1. Derive entire activity log from BugNotification. Events that we currently do not record would be recorded in BugNotification too, but marked using a new not a notification field, or by replacing BugNotification.is_comment with an enum. BugActivity would be dropped.

  2. Derive entire activity log from BugActivity. This would mean recording many more events in BugActivity than we currently do. It would also mean that a lot of activity information will be recorded in both BugNotification and BugActivity.

  3. Derive a lot of the activity log from BugNotification, and use BugActivity for other events. This would mean recording a few more events in BugActivity than we currently do.

After much discussion, we've come to the conclusion that we can actually use the existing BugActivity table, with some work having been done on it, to provide the data we need for interleaving changes with comments in the UI. See CompleteActivityLog for details of what we intend to do.

Additionally, we require that all activity logs are recorded purely as text, with the exception of the person performing the action, for which a field already exists in BugActivity. The alternative is to have a column for every possible activity reference, but we felt that was overkill. We only require that the activity log be useful for human consumption, and that it is correct at the time of recording activity.

Guidelines

  1. The existing fields of BugActivity should be used, with the exception of message, which is deprecated.

  2. The what_?changed field currently often specifies "bug" as what changed, but this is somewhat implied by the naming of the table, and is often inaccurate. Rather, what_changed should be a record of what kind of activity has occurred, for example:

    • subscriber added, subscriber removed

    • when a bugtask is altered: $bugtarget_name: $property_name

    • branch linked, branch unlinked

    • ...
  3. oldvalue and newvalue should be used for every entry. For additions, like subscriber added, newvalue should be populated. Likewise, oldvalue should be populated for removals.

Displaying activity

bug_comments.jpg

+--------------------------------------------+---------------------+
| malone: importance Undecided --> Critical  | Foo Bar, 1 hour ago |
| malone: assignee Nobody --> Foo Bar        +---------------------+
| malone: status New --> Confirmed                                 |
+------------------------------------------------------------------+

+---------------------------------------------+---------------------+
| > Description Updated                       | Foo Bar, 1 hour ago |
+---------------------------------------------+---------------------+

+---------------------------------------------+---------------------+
| V Description Updated                       | Foo Bar, 1 hour ago |
|                                             +---------------------+
| This is the new description. We don't show the old one here, at   |
| least not in the first iteration of implementing this spec.       |
+-------------------------------------------------------------------+

VersionThreeDotO/Bugs/ActivityLogInterleaving (last edited 2009-01-27 12:08:02 by beuno)