<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>7318</bug_id>
          
          <creation_ts>2015-02-13 11:30:13 +0000</creation_ts>
          <short_desc>Managed mode must use sessions to remember user search/orderby preferences</short_desc>
          <delta_ts>2015-11-17 10:20:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Toaster</product>
          <component>toaster</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.1</target_milestone>
          <dependson>8279</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Belen Barros Pena">belen.barros.pena</reporter>
          <assigned_to name="Michael Wood">michael.g.wood</assigned_to>
          <cc>alexandru.damian</cc>
    
    <cc>belen.barros.pena</cc>
    
    <cc>bluelightning</cc>
    
    <cc>bogdanx.a.voiculescu</cc>
    
    <cc>cristiana.voicu</cc>
    
    <cc>jessica.zhang</cc>
          
          <qa_contact name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>48803</commentid>
    <comment_count>0</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2015-02-13 11:30:13 +0000</bug_when>
    <thetext>This is somehow a corner case, since you probably won&apos;t encounter it unless you are switching between Toaster modes. It is a bug nonetheless, so there it goes. 

Steps to reproduce:

1. Start toaster in build (managed) mode and visit the all builds page
2. Stop toaster
3. Source the environment script
4. Start Toaster in analysis (interactive) mode 
5. If you are redirected to the no builds state, type this url in your browser

localhost:8000/toastergui/builds

The page fails to load. This is the trace:

Environment:

Request Method: GET
Request URL:
http://127.0.0.1:8000/toastergui/builds/?count=10&amp;orderby=updated%3A-&amp;page=
1

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


Traceback:
File &quot;/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py&quot;
in get_response
  114.                     response = wrapped_callback(request,
*callback_args, **callback_kwargs)
File &quot;/home/yocto/master/bitbake/lib/toaster/toastergui/views.py&quot; in builds
  3139.         (filter_string, search_term, ordering_string) =
_search_tuple(request, Build)
File &quot;/home/yocto/master/bitbake/lib/toaster/toastergui/views.py&quot; in
_search_tuple
  216.         raise BaseException(&quot;Invalid ordering model:&quot; +
str(model) + str(invalid))

Exception Type: BaseException at /toastergui/builds/
Exception Value: Invalid ordering model:&lt;class
&apos;orm.models.Build&apos;&gt;(u&apos;updated&apos;, [&apos;bitbake_version&apos;, &apos;build_name&apos;,
&apos;buildartifact&apos;, &apos;buildrequest&apos;, &apos;completed_on&apos;, &apos;cooker_log_path&apos;,
&apos;distro&apos;, &apos;distro_version&apos;, &apos;errors_no&apos;, &apos;helptext_build&apos;, u&apos;id&apos;,
&apos;layer_version_build&apos;, &apos;logmessage&apos;, &apos;machine&apos;, &apos;outcome&apos;, &apos;package&apos;,
&apos;project&apos;, &apos;started_on&apos;, &apos;target&apos;, &apos;task_build&apos;, &apos;timespent&apos;,
&apos;variable_build&apos;, &apos;warnings_no&apos;])</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49399</commentid>
    <comment_count>1</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2015-03-12 11:05:32 +0000</bug_when>
    <thetext>This is a side-effect of using cookies to store the page state.

Since in managed mode we have server-side session support, we need to switch the implementation to use session to remember user search/orderby preferences.

This is doable after we split the applications for managed mode and analysis mode in 1.9.

Deferring bug to 1.9, after the build and analysis mode applications are split.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50555</commentid>
    <comment_count>2</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2015-04-28 14:15:48 +0000</bug_when>
    <thetext>Moved to Michael, to be included in the UI frontend refactoring.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53493</commentid>
    <comment_count>3</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2015-08-27 15:19:22 +0000</bug_when>
    <thetext>Since 7449 was not implemented, please confirm this bug is obsolete too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55036</commentid>
    <comment_count>4</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2015-10-07 15:31:11 +0000</bug_when>
    <thetext>Please recheck this during 2.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56420</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2015-11-12 12:15:53 +0000</bug_when>
    <thetext>This should be fixed by the work that has been done to consolidate the two modes and re-use a proper project for analysis mode/command line builds.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56507</commentid>
    <comment_count>6</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2015-11-17 10:20:00 +0000</bug_when>
    <thetext>obsolete.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>