""" Display a box with tickets concercing a certain Milestone AND Keyword. We use tagging to group certain keywords together based on featureset, since they might fall in different components. This is ideal in the Roadmap display, since it shows nice summary boxes of all open/closed tickets by keyword. Syntax: [[RoadmapBox(keyword:Quickies;milestone:02-corecleanup)]] [[RoadmapBox(keyword:Bugfixes;milestone:02-corecleanup)]] [[RoadmapBox(keyword:Other;milestone:02-corecleanup)]] Created by: frido.ferdinand@gmail.com ReCreated by: merrillbeth@gmail.com Based on: TicketBox """ ## NOTE: CSS2 defines 'max-width' but it seems that only few browser ## support it. So I use 'width'. Any idea? import re import string ## default style values styles = { "background": "#", "width": "60%", } from trac.wiki.macros import WikiMacroBase from trac.core import * __all__ = ['RoadmapBoxMacro'] class RoadmapBoxMacro(WikiMacroBase): """ Demo macro for a greeting with an argument. {{{ [[RoadmapBox(args)]] }}} """ def expand_macro(self, formatter, name, args): tasklist=[] ticketlist = [] db = self.env.get_db_cnx() curs = db.cursor() txt=args option = {} option['milestone'] = txt try: curs.execute("SELECT id, summary, resolution, owner, status FROM ticket WHERE type ='task' and milestone='%s'" %(option['milestone'])+ "order by status") rows = curs.fetchall() for row in rows: if row[2]: cn="closed ticket" tasklist.append('