Roundup Tracker

Maybe some of you already encountered this problem. How can I lookup all issues created by a retired user. The *Creator* search property will only list non-retired users.

I made some changes to the issue.search.html page and came up with the next solution.

Change:

  <tr tal:define="name string:creator;
                  db_klass string:user;
                  db_content string:username;"
      tal:condition="db/user/is_view_ok">
    <th>Creator:</th>
    <td metal:use-macro="search_select">
      <option metal:fill-slot="extra_options"
              tal:attributes="value request/user/id">created by me</option>
    </td>
    <td metal:use-macro="column_input"></td>
    <td metal:use-macro="sort_input"></td>
    <td metal:use-macro="group_input"></td>
  </tr>

Into:

  <tr tal:condition="db/user/is_view_ok">
    <th>Creator:</th>
    <td>
      <select name="creator">
        <option value="">don't care</option>
        <option value="">------------</option>
        <option tal:attributes="value request/user/id">
          created by me
        </option>
        <optgroup label="Users">
          <tal:block tal:repeat="user db/user/list">
            <option tal:attributes="value user/id"
              tal:content="user/username">
            </option>
          </tal:block>
        </optgroup>
        <optgroup label="Retired">
          <tal:block tal:repeat="retired_id python:db._db.user.getnodeids(retired=True)">
            <option tal:attributes="value retired_id"
              tal:content="python:db._db.user.get(retired_id, 'username')">
            </option>
          </tal:block>
        </optgroup>
      </select>
    </td>
    <td metal:use-macro="column_input"></td>
    <td metal:use-macro="sort_input"></td>
    <td metal:use-macro="group_input"></td>
  </tr>

The selection menu will look like:

      <select name="creator">
        <option value="">don't care</option>
        <option value="">------------</option>
        <option value="">created by me</option>
        <optgroup label="Users">
          <option value="">sun</option>
          <option value="">earth</option>
          <option value="">venus</option>
        </optgroup>
        <optgroup label="Retired">
          <option value="">mars</option>
          <option value="">moon</option>
        </optgroup>
      </select>

With some minor changes it can be used for *Last modified by* (actor) too.

Regards,<br> Marlon


CategoryInterfaceWeb