A bug's can_expire attribute is confusing

Bug #595124 reported by Brad Figg
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Brian Murray
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

My example is bug #203251. This bug reached a stage where can_expire was set. If just a comment is added to the bug, can_expire is not unset. If the status of the bug is changed from "Incomplete" to "Triaged" then can_expire *is* unset. However, as soon as the status is set back to "Incomplete" can_expire is set again.

Related branches

Changed in ubuntu:
status: New → Invalid
Revision history for this message
Brian Murray (brian-murray) wrote :

bug = launchpad.bugs[203251]
In [3]: bug.can_expire
Out[3]: True
In [4]: bug.date_last_updated
Out[4]: datetime.datetime(2010, 6, 15, 21, 53, 48, 256877, tzinfo=TimeZone(0))

I wonder how often the can_expire attribute of a bug report is updated.

Changed in malone:
status: New → Confirmed
Revision history for this message
Deryck Hodge (deryck) wrote :

Setting this back to New to make sure I take a look today.

Changed in malone:
status: Confirmed → New
Revision history for this message
Deryck Hodge (deryck) wrote :

I've had a look now. can_expire is a wrapper around findExpirableBugTasks, which only looks at date_last_updated and not date_last_message. We should extend the query in findExpirableBugTasks to consider date_last_message.

While I think this is an easy bug to fix, I'm hesitant to tag it trivial, as I have this theory that ultimately no malone bug is trivial. But this is an easy one, definitely.

Changed in malone:
importance: Undecided → High
tags: added: dhrb easy
Changed in malone:
status: New → Triaged
Revision history for this message
Brian Murray (brian-murray) wrote :

date_last_updated is not the issue. In comment 1 you can see that date_last_updated is recent and less than 60 days old.

Revision history for this message
Brian Murray (brian-murray) wrote :

Some documentation, at least in lib/lp/bugs/doc/bugtask-expiration.txt, about can_expire indicates that it only should indicate if the bug *may* expire.

"IBug specifies two properties related to bug expiration. can_expire
tells you whether one or more of the bug's bug tasks may be expired, if
the bug doesn't get any more activity."

Revision history for this message
Brian Murray (brian-murray) wrote :

So if can_expire really means may expire than the documentation should be updated to reflect that. However, the following test passes and I'm unsure why.

    # Add a comment to the bug report and see if it can still expire
    >>> from lp.bugs.tests.bug import create_old_bug
    >>> ubuntu_bugtask2 = create_old_bug('expirable_distro', 351, ubuntu)
    >>> ubuntu_bugtask2.bug.can_expire
    True
    >>> from lp.testing.factory import LaunchpadObjectFactory
    >>> factory = LaunchpadObjectFactory()
    >>> factory.makeBugComment(bug=ubuntu_bugtask2.bug)
    <Message at...
    >>> ubuntu_bugtask2.bug.can_expire
    False

summary: - Launchpad's can_expire not being reset when comments added.
+ Launchpad's can_expire is confusing
summary: - Launchpad's can_expire is confusing
+ A bug's can_expire attribute is confusing
Deryck Hodge (deryck)
Changed in malone:
assignee: nobody → Brian Murray (brian-murray)
status: Triaged → Fix Committed
milestone: none → 10.08
Revision history for this message
Ursula Junque (ursinha) wrote : Bug fixed by a commit
tags: added: qa-needstesting
tags: added: qa-ok
removed: qa-needstesting
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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