Roundup Tracker - Issues

Issue 2550828

classification
Search for empty nosy list doesn't
Type: behavior Severity: normal
Components: Web interface Versions: 1.4
process
Status: closed works for me
:
: : ThomasAH, tekberg
Priority: :

Created on 2014-01-09 17:47 by tekberg, last changed 2014-01-10 14:48 by tekberg.

Messages
msg4980 Author: [hidden] (tekberg) Date: 2014-01-09 17:47
I'm trying to modify issue.search.html to allow one to search for an 
empty nosy list. I defined a macro search_select_multi in page.html that 
is identical to the search_select macro except that it allows for 
multiple selections:

<!-- like search_select, but allows multiple selections. -->
<td metal:define-macro="search_select_multi">
  <select tal:attributes="name name; id name; multiple string:true; size 
string:2"
          tal:define="value python:request.form.getvalue(name)">
    <option selected value="" i18n:translate="">don't care</option>
    <metal:slot define-slot="extra_options" />
    <option value="" i18n:translate="" disabled="disabled">------------
</option>
    <option tal:repeat="s python:db[db_klass].list()"
            tal:attributes="value s/id; selected python:value == s.id"
            tal:content="python:s[db_content]"></option>
  </select>
</td>

Here is the reference to the search_select_multi macro:

<tr tal:define="name string:nosy;
                db_klass string:user;
                db_content string:address;"
    tal:condition="db/user/is_view_ok">
  <th i18n:translate="">Email List:</th>
  <td metal:use-macro="search_select_multi">
  </td>
  <td metal:use-macro="column_input"></td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
</tr>

I would have thought that this line in the search_select_multi macro:

 <option selected value="" i18n:translate="">don't care</option>

might allow one to search for an empty nosy list, When the <option> 
value of "" is used it matches all nosy lists, even empty ones. What 
<option> value does one specify when one wants to search for issues that 
have an empty nosy list?
msg4981 Author: [hidden] (ThomasAH) Date: 2014-01-10 07:51
Just search for "-1" instead of "" (tested with roundup 1.5.x, but
should work with older versions, too)

Please reopen if you have further questions about this.
msg4982 Author: [hidden] (tekberg) Date: 2014-01-10 14:48
It works great. Thanks!
History
Date User Action Args
2014-01-10 14:48:09tekbergsetmessages: + msg4982
2014-01-10 07:51:07ThomasAHsetstatus: new -> closed
resolution: works for me
messages: + msg4981
nosy: + ThomasAH
2014-01-09 17:47:38tekbergcreate