Roundup Tracker

The following is a template I've used to manage a whole list of issues at once (note that you can customise the list of issues being managed using exactly the same parameters as the issue index page):

<!-- dollarId: issue.index,v 1.2 2001/07/29 04:07:37 richard Exp dollar-->
<tal:block metal:use-macro="templates/page/macros/icing">
<title metal:fill-slot="head_title"> 
 <span tal:replace="config/TRACKER_NAME" />: List of issues
</title> 
<td class="page-header-top" metal:fill-slot="body_title">
 <h2>List of issues</h2>
</td>
<td class="content" metal:fill-slot="content">

<tal:block tal:condition="not:context/is_view_ok">
You are not allowed to view this page.
</tal:block>

<tal:block tal:define="batch request/batch" tal:condition="context/is_view_ok">
 <form method="POST" tal:attributes="action request/classname">
 <table class="list">
  <tr>
   <th tal:condition="request/show/id">ID</th>
   <th tal:condition="request/show/activity">Activity</th>
   <th tal:condition="request/show/topic">Topic</th>
   <th tal:condition="request/show/title">Title</th>
   <th tal:condition="request/show/status">Status</th>
   <th tal:condition="request/show/creator">Creator</th>
   <th tal:condition="request/show/assignedto">Fixer</th>
  </tr>
 <tal:block tal:repeat="i batch">
  <tr tal:condition="python:request.group[1] and
                            batch.propchanged(request.group[1])">
   <th tal:attributes="colspan python:len(request.columns)"
       tal:content="python:i[request.group[1]]" class="group">
   </th>
  </tr>
  <tr tal:attributes="class python:['normal', 'alt'][repeat['i'].index%6/3]">
   <td tal:condition="request/show/id" tal:content="i/id"></td>
   <td nowrap tal:condition="request/show/activity"
       tal:content="i/activity/reldate"></td>
   <td tal:condition="request/show/topic" tal:content="structure i/topic/field"></td>
   <td tal:condition="request/show/title">
    <a tal:attributes="href string:issue${i/id}"
        tal:content="python:str(i.title.plain(hyperlink=0)) or '[no title]'">title</a>
   </td>
   <td tal:condition="request/show/status" tal:content="structure i/status/menu"></td>
   <td tal:condition="request/show/creator" tal:content="i/creator"></td>
   <td tal:condition="request/show/assignedto" tal:content="structure i/assignedto/menu"></td>
  </tr>
 </tal:block>
 <tr class="navigation" tal:define="colspan python:len(request.columns)">
  <th tal:attributes="colspan python:colspan/2">
    <a tal:define="prev batch/previous" tal:condition="prev"
      tal:attributes="href python:request.indexargs_href(request.classname,
      {':startwith':prev.first, ':pagesize':prev.size})">&lt;&lt; previous</a>
   &nbsp;
  </th>
  <th tal:attributes="colspan python:colspan/2 + colspan%2">
    <a tal:define="next batch/next" tal:condition="next"
      tal:attributes="href python:request.indexargs_href(request.classname,
      {':startwith':next.first, ':pagesize':next.size})">next &gt;&gt;</a>
   &nbsp;
  </th>
 </tr>
 <tr>
  <td>
   <input name="@action" value="edit" type="hidden">
   <input name="@template" value="pm" type="hidden">
   <input value=" Save Changes " type="submit">
   <tal:block replace="structure request/indexargs_form" />
  </td>
 </tr>
</table>
</form>

<form method="GET" class="index-controls" tal:attributes="action request/classname">
 <tal:block tal:replace="structure python:request.indexargs_form(sort=0, group=0)" />
 <table class="form">
  <tr tal:condition="batch">
   <th>Sort on:</th>
   <td>
    <select name=":sort">
     <option value="">- nothing -</option>
     <option tal:repeat="col context/properties"
             tal:attributes="value col/_name;
                             selected python:col._name == request.sort[1]"
             tal:content="col/_name">column</option>
    </select>
   </td>
   <th>Descending:</th>
   <td><input type="checkbox" name=":sortdir"
              tal:attributes="checked python:request.sort[0] == '-'"> 
   </td>
  </tr>
  <tr>
   <th>Group on:</th>
   <td>
    <select name=":group">
     <option value="">- nothing -</option>
     <option tal:repeat="col context/properties"
             tal:attributes="value col/_name;
                             selected python:col._name == request.group[1]"
             tal:content="col/_name">column</option>
    </select>
   </td>
   <th>Descending:</th>
   <td><input type="checkbox" name=":groupdir"
              tal:attributes="checked python:request.group[0] == '-'"> 
   </td>
  </tr>
  <tr><td colspan="4"><input type="submit" value="Redisplay"></td></tr>
 </table>
</form>

</tal:block>

</td>
</tal:block>

-- RichardJones

The above should look a bit like this:

List of issues

ID Activity Topic Title Status Creator Fixer
1234 2 months ago Send in the Pantomime Horses Gumby
<< previous   next >>  

Using the template above and a different way of batch updates

Simply select the data above in the edit interface (does this wiki have the ability to handle file uploads? Might be a better distribution mechanism.) and put it into a file. I used item.batch.html.

Then choose your normal search and edit the URL to include @template=batch.

One thing to note if you use this, in addition to changing the fields, make sure to change the:

<input name="@template" value="pm" type="hidden">

to:

<input name="@template" value="index|batch" type="hidden">

or some such. Note that the index|batch template value format is supported as of version 1.6.0 of roundup.

Now the question is does anybody have any tal (and possibly back end patches) to allow batch updates by selecting issues from an issue.index page and updating them using a standard issue.item page. The editing interface can be based on BatchSearchAndEditing. This way I can change a whole bunch of issues to a closed state, or add a single change note to a bunch of messages by narrowing the update list using a search, fine tuning by unselecting a message using a checkbox, and then updating all of them using a standard change form.

-- John Rouillard