Bug 7577

Summary: The calendar filter breaks the all builds page
Product: [Build System, Metadata & Runtime] Toaster Reporter: Belen Barros Pena <belen.barros.pena>
Component: toasterAssignee: Michael Wood <michael.g.wood>
Status: VERIFIED FIXED QA Contact: Cristina Agurida <cristina-danielax.agurida>
Severity: normal    
Priority: Medium+ CC: alexandru.damian, belen.barros.pena, cristiana.voicu, cristina-danielax.agurida, jessica.zhang
Version: unspecified   
Target Milestone: 1.9 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Belen Barros Pena 2015-04-07 16:23:46 UTC
When I try to use the "Build date range" option in the all builds page, I get the error below.

Environment:


Request Method: GET
Request URL: http://192.168.2.39:8000/toastergui/builds/?count=10&orderby=completed_on%3A-&search=&last_date_from=07%2F04%2F2015&date_from_updated=01%2F04%2F2015&filter=daterange&date_to_updated=02%2F04%2F2015&last_date_to=07%2F04%2F2015&page=1

Django Version: 1.6
Python Version: 2.7.6
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.messages',
 'django.contrib.sessions',
 'django.contrib.admin',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'orm',
 'toastermain',
 'south',
 'bldcontrol',
 'bldviewer',
 'toastergui')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  114.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/yocto/master/bitbake/lib/toaster/toastergui/views.py" in builds
  1891.             context, pagesize, orderby = _build_list_helper(request, buildrequests, True)
File "/home/yocto/master/bitbake/lib/toaster/toastergui/views.py" in _build_list_helper
  1935.         (filter_string, search_term, ordering_string) = _search_tuple(request, BuildRequest)
File "/home/yocto/master/bitbake/lib/toaster/toastergui/views.py" in _search_tuple
  233.         raise BaseException("Invalid filter " + str(invalid))

Exception Type: BaseException at /toastergui/builds/
Exception Value: Invalid filter We have an invalid number of separators: daterange -> [u'daterange']
Comment 1 Belen Barros Pena 2015-04-07 16:30:24 UTC
I can only reproduce this on Chrome, by the way.
Comment 3 Cristina Agurida 2015-06-10 12:17:43 UTC
Verified on master: 926de56da9469e3d4ea8349d8e7c9777ae6f93c1