| Summary: | Sorting columns breaks Toaster | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Toaster | Reporter: | Mihail Stanciu <stanciux.mihail> |
| Component: | toaster | Assignee: | Michael Wood <michael.g.wood> |
| Status: | VERIFIED DUPLICATE | QA Contact: | Mihail Stanciu <stanciux.mihail> |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | alexandru.damian, belen.barros.pena, cristiana.voicu, cristina-danielax.agurida, jessica.zhang, ke.zou |
| Version: | 1.9 | ||
| Target Milestone: | 2.0 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | Regression (Used to work) |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Mihail Stanciu
2015-07-15 11:48:57 UTC
Traceback: Environment: Request Method: GET Request URL: http://localhost:8000/toastergui/builds/?count=10&orderby=timespent%3A-&page=1 Django Version: 1.6.6 Python Version: 2.7.8 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.messages', 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.staticfiles', 'django.contrib.humanize', 'bldcollector', 'toastermain', 'south', 'toastergui', 'bldcontrol', 'orm') 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/lib64/python2.7/site-packages/django/core/handlers/base.py" in get_response 112. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/gushie/poky/bitbake/lib/toaster/toastergui/views.py" in returned_wrapper 138. context = view(request, *args, **kwargs) File "/home/gushie/poky/bitbake/lib/toaster/toastergui/views.py" in builds 1886. context, pagesize, orderby = _build_list_helper(request, queryset) File "/home/gushie/poky/bitbake/lib/toaster/toastergui/views.py" in _build_list_helper 1906. (filter_string, search_term, ordering_string) = _search_tuple(request, Build) File "/home/gushie/poky/bitbake/lib/toaster/toastergui/views.py" in _search_tuple 329. raise BaseException("Invalid ordering model:" + str(model) + str(invalid)) Exception Type: BaseException at /toastergui/builds/ Exception Value: Invalid ordering model:<class 'orm.models.Build'>(u'timespent', ['bitbake_version', 'build_name', 'buildartifact', 'buildrequest', 'completed_on', 'cooker_log_path', 'distro', 'distro_version', 'helptext_build', u'id', 'layer_version_build', 'logmessage', 'machine', 'outcome', 'package', 'project', 'started_on', 'target', 'task_build', 'variable_build']) This breaks because "timespent" is not a field in the database, but it is calculated on the fly. There are two ways to go about here: a). disable sorting by time spent b). add the field to the database Belen, we need your input. (In reply to comment #2) > This breaks because "timespent" is not a field in the database, but it is > calculated on the fly. It looks like this would explain why sorting by 'time' throws an error, but I am not sure it explains why sorting by 'errors' and 'warnings' also throws an error. Although the error seems to be the same error in all cases, so I could be wrong. > > There are two ways to go about here: > > a). disable sorting by time spent > > b). add the field to the database I am ok with disabling the sorting by 'time', unless we think that adding the field to the database could improve performance in any way. > > > Belen, we need your input. *** Bug 8131 has been marked as a duplicate of this bug. *** *** Bug 8228 has been marked as a duplicate of this bug. *** Triggers the same problem caused by bug #8131 *** This bug has been marked as a duplicate of bug 8131 *** As per last comment set it as verified duplicate. |