launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #04630
lp:~deryck/launchpad/bug-heat-wonky-recent-activity-check-688364 into lp:launchpad/db-devel
Deryck Hodge has proposed merging lp:~deryck/launchpad/bug-heat-wonky-recent-activity-check-688364 into lp:launchpad/db-devel.
Requested reviews:
Robert Collins (lifeless)
Stuart Bishop (stub)
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #688364 in Launchpad itself: "Bug heat is wonky"
https://bugs.launchpad.net/launchpad/+bug/688364
For more details, see:
https://code.launchpad.net/~deryck/launchpad/bug-heat-wonky-recent-activity-check-688364/+merge/71756
This is another change to calculate_bug_heat that really should have gone in with my most recent change to that function. I just missed adding this bit for some reason and my tests won't pass without it. Was my own oversite that this wasn't part of the same patch, so now I need to get this landed on its own.
The current version of calculate_bug_heat only applies points for recent activity if it's been greater than 0 days since the last update. Older bugs, rather than recently active bugs. The line I'm changing will make this so that only bugs that are currently active get points applied for heat.
--
https://code.launchpad.net/~deryck/launchpad/bug-heat-wonky-recent-activity-check-688364/+merge/71756
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~deryck/launchpad/bug-heat-wonky-recent-activity-check-688364 into lp:launchpad/db-devel.
=== modified file 'database/schema/trusted.sql'
--- database/schema/trusted.sql 2011-07-22 17:54:34 +0000
+++ database/schema/trusted.sql 2011-08-16 17:57:20 +0000
@@ -1937,7 +1937,7 @@
days_since_last_update = (datetime.utcnow() - date_last_updated).days
total_heat = int(total_heat * (0.99 ** days_since_last_update))
- if days_since_last_update > 0:
+ if date_last_updated.day == datetime.now().day:
# Bug heat increases by a quarter of the maximum bug heat
# divided by the number of days since the bug's creation date.
date_created = datetime.fromtimestamp(
Follow ups