<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://reviewboard-tflink.rhcloud.com/r/57/">http://reviewboard-tflink.rhcloud.com/r/57/</a>
     </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On December 10th, 2013, 5:58 p.m. UTC, <b>Tim Flink</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://reviewboard-tflink.rhcloud.com/r/57/diff/1/?file=1607#file1607line55" style="color: black; font-weight: bold; text-decoration: underline;">blockerbugs/models/update.py</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">class Update(db.Model):</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">55</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                              <span class="n">order_by</span><span class="o">=</span><span class="n"><span class="hl">date_submitted</span></span><span class="o">.</span><span class="n">desc</span><span class="p">()))</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">55</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                              <span class="n">order_by</span><span class="o">=</span><span class="p"><span class="hl">(</span></span><span class="n"><span class="hl">status</span></span><span class="o"><span class="hl">.</span></span><span class="n"><span class="hl">desc</span></span><span class="p"><span class="hl">(),</span></span><span class="hl"> </span><span class="n"><span class="hl">pending</span></span><span class="o">.</span><span class="n">desc</span><span class="p">()))<span class="hl">)</span></span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Why is this sort order change an improvement? If an older update is pending while a newer update is stable, we&#39;d want to show the newer update</pre>
 </blockquote>



 <p>On December 11th, 2013, 2:59 p.m. UTC, <b>Martin Krizek</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">But wouldn&#39;t the older update be marked as obsolete?</pre>
 </blockquote>





 <p>On December 11th, 2013, 4:37 p.m. UTC, <b>Tim Flink</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It should be but for example, if you look at the tracking app right now, there are 2 anaconda/blivet updates - one of which has been deleted in bodhi but still shows up.

This issue was supposed to be fixed but obviously, it&#39;s not. Filed as https://phab.qadevel.cloud.fedoraproject.org/T27

I think that the problem of phantom updates are the root cause of the problem as reported, but I&#39;ll ask in bug to be sure.</pre>
 </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">After re-reading the bug, I stand corrected. That was a completely different issue than I was thinking about in my head.

I don&#39;t like sorting on string fields by default but I also don&#39;t see much of a way around it unless we changed the schema to use status enums instead of strings.

Go ahead and push to develop. We might want to look into changing the update status field to an enum but that&#39;s well outside the scope of this fix.</pre>
<br />




<p>- Tim</p>


<br />
<p>On December 10th, 2013, 3:54 p.m. UTC, Martin Krizek wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://reviewboard-tflink.rhcloud.com/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for blockerbugs.</div>
<div>By Martin Krizek.</div>


<p style="color: grey;"><i>Updated Dec. 10, 2013, 3:54 p.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://fedorahosted.org/fedora-qa/ticket/438">438</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
blockerbugs
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">commit 911781af9cc06e27c0a8580f07f7673c90e7329d
Author: Martin Krizek &lt;mkrizek@redhat.com&gt;
Date:   Tue Dec 10 16:28:52 2013 +0100

    Sort updates by (status.desc(), pending.desc())
    
    This way an update label is correctly set when multiple updates fix a
    bug. The label is chosen by the following order (the lowest one):
    
    pending testing &lt; testing &lt; pending stable &lt; stable
    
    Fixes: #438

Note: the rest of the issues with displaying label is handled outside this ticket in https://phab.qadevel.cloud.fedoraproject.org/T21</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Sorting seems to be working as expected.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>blockerbugs/models/update.py <span style="color: grey">(89c083da5c91558d4dead118c67e4a1138b8cae1)</span></li>

 <li>blockerbugs/controllers/main.py <span style="color: grey">(1795ed1d717bb85e0f3d9e7e7008d68c2aae36d8)</span></li>

 <li>blockerbugs/__init__.py <span style="color: grey">(dcf6c5aadb24e6d86e95d5bb3d608b81721de47f)</span></li>

</ul>

<p><a href="http://reviewboard-tflink.rhcloud.com/r/57/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>