зеркало из https://github.com/mozilla/treeherder.git
Bug 1530966 - Increase threshold for suggested bugs to be recent to 365 days (#4716)
This commit is contained in:
Родитель
6211b27794
Коммит
e84b3cd430
|
@ -95,11 +95,11 @@ def test_get_open_recent_bugs(transactional_db, sample_bugs, search_term, exp_bu
|
|||
def test_get_all_other_bugs(transactional_db, sample_bugs, search_term, exp_bugs):
|
||||
"""Test that we retrieve the expected old bugs for a search term."""
|
||||
bug_list = sample_bugs['bugs']
|
||||
ninetyfive_days_ago = datetime.now() - timedelta(days=95)
|
||||
fourhundred_days_ago = datetime.now() - timedelta(days=400)
|
||||
# Update the last_change date so that all bugs will be placed in
|
||||
# the all_others bucket, and none in open_recent.
|
||||
for bug in bug_list:
|
||||
bug['last_change_time'] = ninetyfive_days_ago
|
||||
bug['last_change_time'] = fourhundred_days_ago
|
||||
_update_bugscache(bug_list)
|
||||
|
||||
suggestions = Bugscache.search(search_term)
|
||||
|
|
|
@ -218,8 +218,10 @@ class Bugscache(models.Model):
|
|||
def search(cls, search_term):
|
||||
max_size = 50
|
||||
|
||||
# 90 days ago
|
||||
time_limit = datetime.datetime.now() - datetime.timedelta(days=90)
|
||||
# 365 days ago as limit for recent bugs which get suggested by default
|
||||
# if they are not resolved. Other bugs, both older or resolved, are
|
||||
# hidden by default with a "Show / Hide More" link.
|
||||
time_limit = datetime.datetime.now() - datetime.timedelta(days=365)
|
||||
|
||||
# Replace MySQL's Full Text Search Operators with spaces so searching
|
||||
# for errors that have been pasted in still works.
|
||||
|
|
Загрузка…
Ссылка в новой задаче