Roundup Tracker

At work, I found that I was accumulating a lot of really simple little issues that really didn't need all the attributes of a full-blown issue. They were relatively groupable (ie. some were related to conference presentations, some to registration wizard, some to registrations management, etc).

I've implemented a new issue "priority" in our tracker called "grab-bag". If an issue is of that priority, it gets an additional form area which lets you enter single-line "mini issues" (which are just a description and status) and lists the unresolved ones.

Haven't bothered to implement a detector to close the issue if the last grab-bag item is closed, but that wouldn't be too hard. All up, it took me about 10 minutes to implement (schema addition, add new priority, looking up how the form variables are supposed to be constructed and editing the issue.item.html template). The code follows.

In schema.py::

     # list of simple little components of a larger issue
     grabbag = Class(db, "grabbag", description=String(), status=Link("status"))

     ...

     issue = IssueClass(db, "issue",
                     milestone=Link('milestone'), blockers=Multilink("issue"),
                     assignedto=Link("user"), topic=Multilink("keyword"),
                     priority=Link("priority"), status=Link("status"),
                     system=Link("system"), grabbag=Multilink("grabbag"))

issue.item.html::

  <table class="files"
      tal:define="
      grabbagid python:db._db.priority.lookup('grabbag');
      resolved python:db._db.status.lookup('resolved');
      grabbag python:[i for i in context.grabbag if i.status != resolved]"
      tal:condition="python:context.priority == grabbagid">
   <tr><th colspan="3" class="header">Grab-Bag</th></tr>
   <tr tal:condition="grabbag">
     <th>Resolve</th><th>Edit</th><th>Description</th>
   </tr>
   <tr tal:repeat="item grabbag">
    <tal:block condition="python:item.status != resolved">
     <td>
      <form style="padding:0" tal:condition="context/is_edit_ok"
            tal:attributes="action string:issue${context/id}">
       <input type="hidden" tal:attributes="value string:$resolved;
          name string:grabbag${item/id}@status">
       <input type="hidden" name="@action" value="edit">
       <input style="font-size: 80%" type="submit" value="resolve">
      </form>
     </td>
     <td><a tal:condition="item/is_edit_ok"
            tal:attributes="href string:grabbag${item/id}">edit</a>
     </td>
     <td tal:content="item/description" />
    </tal:block>
   </tr>
   <tr>
    <td colspan="3"><form><input type="text" size="60"
    name="grabbag-1@description"><input type="hidden" name="grabbag-1@status"
    tal:attributes="value python:db._db.status.lookup('unread')"><input
    type="hidden"
    name="@link@grabbag" value="grabbag-1"><input type="hidden" name="@action"
    value="edit"><input type="submit" value="add"></td>
   </tr>
  </table>

-- RichardJones


CategorySchema