adding/removing user/team subscriptions to bug reports edits date_last_updated

Bug #879589 reported by Dave Walker on 2011-10-21
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Critical
Steve Kowalik

Bug Description

If a user adds/removes a subscription to a bug report it changes the bug last_modified date. This is bad as it gives the bug a false sense of activity, when really - it's just a bookmark being added.

Thanks.

Related branches

Ursula Junque (ursinha) on 2011-10-21
tags: added: ubuntu-qa
Dave Walker (davewalker) on 2011-10-21
description: updated
Benji York (benji) on 2011-10-21
Changed in launchpad:
status: New → Triaged
importance: Undecided → Low
tags: added: bughistory
Brian Murray (brian-murray) wrote :

Its actually date_last_updated on the bug object that changes.

summary: adding/removing user/team subscriptions to bug reports edits
- last_modified date
+ date_last_updated
Francis J. Lacoste (flacoste) wrote :

Escalated by Kate for Ubuntu Engineering.

tags: added: escalated
Changed in launchpad:
importance: Low → Critical
Robert Collins (lifeless) wrote :

This requires some design level thought: we need to:
  - preserve the audit facility
  - including the ability to incrementally audit bugs (which means that
 new observers and new subscribers need to bring the bug forward in
 searches) - observer grants already have a datestamp to permit this
  - meet other sorts of incremental operations like 'bug status changed
 since X' and/or 'bug status or comments changed since X and/or 'bug
 status or comments or tasks changed since X'.

 Essentially, a bit of a rethink on the date fields we have, when they
 change, and how, and then tie it all up in a bow and migrate things
 across. last-changed is essentially a denormalisation, and as such
 there are many different summaries we might use - so we may need to
 e.g. have several fields, or we may need to improve bugactivity to permit efficient queries on different sorts of things (tasks changes, comments, subscriptions, private status). Performance testing will be needed as well (obviously) to decide whats best.

> e.g. have several fields

I wonder if just a two level split would be a good place to start:
'last major update' and 'last update': audits or api caching can be
updated on any change at all but most user oriented things will be ok
with just major changes. I think adding that would fix some other
bugs too.

Kate Stewart (kate.stewart) wrote :

Sounds like a reasonable approach to me. Daviey - what's your thoughts on this?

Steve Kowalik (stevenk) wrote :

So I don't think this requires design level thought. Calling IBug.subscribe() directly does not update date_last_updated, by design. That behavior hasn't changed since r3000 something -- for a long long while.

The problem is happening due to the API. When you call bug.subscribe(person=launchpad.me) over the API the lazr.restful machinery calls notify(ObjectModifiedEvent(bug)) since it assumes the object has been modified since you just called a method on it. That causes date_last_updated to be updated via the Zope subscriber.

Now I've dumped state, I'm going to write a test and fix the issue hopefully on Monday.

Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
assignee: nobody → Steve Kowalik (stevenk)
tags: added: qa-needstesting
Changed in launchpad:
status: Triaged → Fix Committed
Steve Kowalik (stevenk) on 2012-09-10
tags: added: qa-ok
removed: qa-needstesting
Steve Kowalik (stevenk) on 2012-09-11
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers