Version 62 (modified by Steffen Hoffmann, 11 years ago) (diff)

correct argument name for template pre-selection and start to move historic notes

Calendar view of Milestones and Tickets


Macro for the Trac Wiki to display Milestones and Tickets from the Ticketing system in a calendar view. See screenshot (WikiTicketCalendarMacro 1.2.0 & Trac 0.12) with different localizations (wikipage links and CSS style ticket tooltip) below:

screenshot of WikiTicketCalendarMacro 1.2.0 with tooltip in different languages and CSS tooltip ticket description

Development of the single-file macros is discontinued. Code has been merged with WikiCalendarMacro for joined upstream development. Make sure to change over to the packaged plugin code hosted within the /wikicalendarmacro domain to receive latest improvements and bug fixes.


The invocation for the screenshot above is [[WikiTicketCalendar(*,*,true,Wochenberatung/%Y-%m-%d,true,Beratung)]].

Macro can be invoked in the following two basic ways:

  1. "Simple"
  2. "Advanced"
    • equivalent keyword-argument available for all but first two arguments
    • mixed use of keyword-arguments with simple arguments permitted, but strict order of simple arguments (see above) still applies while keyword-arguments in-between do not count for that positional mapping,
    • query evaluates a valid TracQuery expression based on any ticket field including multiple expressions grouped by 'and' and 'or'


year specifies the year to be shown, '*' current year * year=2011
month specifies the month to be shown, '*' current month * month=12
nav (1) show previous/next navigation or (0) not 1 nav=1
wiki strftime format for wiki pages to display as link (if exist, otherwise links to a create page) '*' for default. Supports any expression that strftime can handle "%Y-%m-%d" wiki="%Y-%m-%d"
cdate (1) show ticket created / open dates [1,0] 1 cdate=1
base wiki template tried to create new page "" base=""
query evaluates a valid TracQuery expression based on any ticket field including multiple expressions grouped by 'and' and 'or' query="id!=0"
short total ticket count per day, that'll have ticket list display condensed to just ticket no., 0 = never condense list. This feature looks like this [0,1,...] 0 short=0
width set calendar table 'min-width', and optionally 'width' for surrounding div triggered by prepending '+' to value 100% width=100%


     equivalent to [[WikiTicketCalendar(*,*,true,Talk-%Y-%m-%d,true,Talk)]]


  1. All maintained versions of this macro support keyword arguments and mixed use of both - simple and keyword arguments - as well.

This could make macro invocations more readable and maybe even shorter than before, as long as you largely stick to the defaults and just want to change one or two values. So i.e. the 3rd example from above could be rewritten now as:

  1. The query keyword supports any expression supported by TracQuery. This is the single new ticket selection logic that can use custom field values as well for expressions chained by AND (OR since 0.12 only). An always-true expression was chosen on purpose to select and show all tickets by default. Use your own query expression to create per-developer or per-component ticket calendars,

or you could choose to display tickets only with high/highest priority, tickets with some special content in a custom field, etc.


Generic guidelines on installation and troubleshooting can be found at TracPlugins.

Steps to install and configure this plugin are:

  1. Install
    1. with easy_install:
      $ sudo easy_install
  2. Enable
    • Update TracIni file (..../trac.ini) with:
      wikicalendar.* = enabled
      This enables both, this macro as well as the WikiCalendarMacro. Both macros are bundled in wikicalendar-2.0.0 and later. For historic versions the old instructions are preserved below:
  1. Configure
    • The plugin optionally makes use of an own configuration section, that could be placed into 'trac.ini' as follows:
      [wikiticketcalendar] = due_close
      ticket.due_field.format = %y-%m-%d
    • Note: these are the implicit default values to give backwards compatible behaviour.
    • Real configuration examples:
      • for a custom due date field named 'due-date' that holds US style date with 4-digit year:
        [wikiticketcalendar] = due-date
        ticket.due_field.format = %m/%d/%Y
      • for a custom due date field named 'due_date' that holds true POSIX microsecond timestamps (see: custom time fields proposal)
        [wikiticketcalendar] = due_date
        ticket.due_field.format = ts
  2. Restart web server:
    $ sudo /etc/init.d/apache2 restart

About i18n/l10n support

The 0.12 branch of this plugin is prepared for localization (tooltip customization in calendar navigation).

But English message texts are still the (POSIX) default. If this isn't your preferred language, you can

  1. look, if it's already available from the Trac plugin l10n project at Transifex or
  2. do it yourself (see the l10n cookbook page for Trac plugins for more details).

You've done a new translation? Superb! Contributing your translation is highly appreciated.

You could send it to the plugin's maintainer or contribute to Trac plugin l10n project via Transifex:

Top translations: Trac_Plugin-L10N » etcalendar-locale-messages-pot_0

Kindly provided by

Preparing the plugin from source requires no additional steps for compiling message catalog files. Only to include translations marked as # fuzzy by the translator, you'll want to do a manual message catalog compilation with the extra -f argument before packaging:

cd wikiticketcalendarmacro/
python ./ compile_catalog -f
python ./ bdist_egg

Complaints about missing locale directory are often a side-effect of failure to compile any message catalog for inclusion into Python egg, hence the whole path is missing. Due to a known Trac issue, Babel has to be installed prior to Trac, to get it all working as expected.

Again, for more details see the l10n cookbook page for Trac plugins.

Bug Reports

Get it, enjoy and report back, please. Comments welcome.

Existing bugs and feature requests for WikiTicketCalendarMacro are here.

If you have any issue that is not found there, create a new ticket.

Make sure to send feature requests for the macro bundle only (see WikiCalendarMacro).

Poll(What do you think of the WikiTicketCalendarMacro?; Great; Useful; Somewhat useful, but could be better; Useless; Horrible; Don't care/don't need such stuff)?

Source & Download

For the latest code see WikiCalendarMacro. The information below is historic by now.

You can:

  1. check out WikiTicketCalendarMacro from here using Subversion;
  2. or browse the source and just save a file with the Trac repository browser;
  3. or download the zipped source from [download:wikiticketcalendarmacro here];

1 Note: The 0.11 single-file macro install is significantly smaller than the Python egg with translations,
and there's no visible difference to the genuine 0.12 version, as long as you don't use localization for Trac 0.12.

2 Note: The original version of the macro was hosted here and it's outdated.

3 Note: For trunk development branch look at the WikiCalendarMacro, since code for both macros has been merged.

Historic notes

These are the old instructions for enabling historic versions of the WikiTicketCalendarMacro:

WikiTicketCalendarMacro.* = enabled

for Trac <= 0.11

wikiticketcalendar.* = enabled

for Trac >= 0.12 and trunk branch with i18n support (have a different code structure due to packaging)


Author: mcomb
Maintainer: hasienda
Contributors: Boris Savelev, rjollos

See also

Found on the web

Attachments (2)

Download all attachments as: .zip