Make the grouping of interleaved changes less time-sensitive

Bug #353890 reported by Graham Binns
34
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
Gavin Panella

Bug Description

At the moment BugActivity and comments are grouped together based on the time at which they occurred, with the requirement being that they occur at exactly the same time for them to be grouped together. Currently we can rely on this since things that should be grouped together (description, summary and tag changes; status, importance, milestone and assignee changes) will share a transaction time as they are submitted as part of the same form.

Once we move to an AJAX-driven bugs page, though, this is going to be come more problematic, since people will be able to edit two or three things separately on the same page. Whilst the user may perceive this to be one set of activity it will in fact be three different DB transactions, each of which will have a different transaction time, even if they're within milliseconds of each other. This will break the grouping and make the activity notifications cluttersome.

What should happen:

We should group activity and comments by time and person. We can be a bit looser with the time, then, since it doesn't really matter if we group two sets of actions carried out by the same person together. We can group together everything done by a person within five minutes (for example) of the first action by that person. If someone else makes another change in that time we can simply split that out into another set of actions. A new comment by any person essentially marks the start of a new block, so that comments are always separated, thus:

 1. Foo Bar adds a comment
 2. Foo Bar sets status
 3. Foo Bar changes description

Is one block of items, but:

 1. Foo Bar adds a comment
 2. Foo Bar sets status
 3. Foo Bar changes description
 4. No Priv sets importance
 5. Foo Bar adds a comment
 6. Foo Bar changes summary

Is three blocks of items, even if all of Foo Bar's actions take place within five minutes of each other. Each new comment starts a new block.

Related branches

Graham Binns (gmb)
Changed in malone:
importance: Undecided → High
milestone: none → 2.2.4
status: New → Triaged
Graham Binns (gmb)
description: updated
Changed in malone:
assignee: nobody → gmb
Changed in malone:
importance: High → Medium
Revision history for this message
Martin Pool (mbp) wrote :

This sounds good.

At the moment you get the somewhat surprising behaviour that one logical change of setting the status and adding a comment generates one mail but two entries in the bug page.

Changed in malone:
milestone: 2.2.4 → none
Revision history for this message
Gavin Panella (allenap) wrote :

To give us the "loose" date/time grouping, we can use DateTimeFormatterAPI.approximatedate() as part of the grouping key (the other part being the person making the change).

Revision history for this message
Graham Binns (gmb) wrote : Re: [Bug 353890] Re: Make the grouping of interleaved changes less time-sensitive

2009/7/24 Gavin Panella <email address hidden>:
> To give us the "loose" date/time grouping, we can use
> DateTimeFormatterAPI.approximatedate() as part of the grouping key (the
> other part being the person making the change).

Comments are a hard boundary for grouping activity, too, so I think
that maybe just using approximatedate() might not be sufficient, since
we need to establish which activity goes with which comment. (Note
that I'm writing this off the top of my head and haven't looked at the
approximateddate() code).

Revision history for this message
Gavin Panella (allenap) wrote :

gmb wrote:
> Comments are a hard boundary for grouping activity, too, so I think
> that maybe just using approximatedate() might not be sufficient,
> since we need to establish which activity goes with which
> comment. (Note that I'm writing this off the top of my head and
> haven't looked at the approximateddate() code).

Good point. I was just thinking about seeing the activities between
the comments, as we're seeing more of now because of the AJAXification
of the bugs page, but lumped together, and de-duped.

Perhaps grouping with a related comment can be considered first, for
activity within a static ~5 minute window following the comment, then
the approximatedate() grouping could be applied.

Graham Binns (gmb)
Changed in malone:
assignee: Graham Binns (gmb) → nobody
Gavin Panella (allenap)
Changed in malone:
assignee: nobody → Gavin Panella (allenap)
status: Triaged → In Progress
tags: added: bugjam2010
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Gavin Panella (allenap)
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in launchpad:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui)
Changed in launchpad:
milestone: none → 11.01
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.