Version 55 (modified by hasienda, 4 years ago) (diff)

some editorial changes

Calendar view of Milestones and Tickets


Macro for the Trac Wiki to display Milestones and Tickets from the Ticketing system in a calendar view. The original version of the macro was hosted here.

screenshot of WikiTicketCalendarMacro 1.2.0 with tooltip in different languages and CSS tooltip ticket description
screenshot of WikiTicketCalendarMacro 1.2.0 for Trac 0.12 with different localizations (wikipage links and CSS style ticket tooltip)

The ticket 'list_condense' feature looks like this. Comments welcome.

Available versions are compatible with Trac 0.11, 0.12 and even the old 0.10 (depreciated/unmaintained, security concerns - see #7239). Get it, enjoy and report back, please.

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

  • You don't have permission to vote. You may need to login.

Bugs/Feature Requests

Existing bugs and feature requests for WikiTicketCalendarMacro are here.

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


Download the zipped source from here.
Look at the code and just save a file with the Trac repository browser:

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.

Historically the macro code was activated for a long time by

    WikiTicketCalendarMacro.* = enabled

and that is still correct for the 0.11 branch.

The new versions from 0.12 and trunk branch with i18n support have a different code structure due to packaging.
See i18n/l10n section for an important hint on egg creation. The statement required for activation has changed as well:

    wikiticketcalendar.* = enabled


You can check out WikiTicketCalendarMacro from here using Subversion, or browse the source with Trac.


See download section on how to activate your version.

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

    Simple Usage

    year, month = display calendar for month in year
                  ('*' for current year/month)
    showbuttons = true/false, show prev/next buttons
    wiki_page_format = strftime format for wiki pages to display as link
                       (if exist, otherwise link to create page)
                       default is "%Y-%m-%d", '*' for default
    show_ticket_open_dates = true/false, show also when a ticket was opened
    wiki_page_template = wiki template tried to create new page
    list_condense = ticket count limit to switch off ticket summary display
    cal_width = set calendar table 'min-width', and optionally 'width'
                for surrounding div triggered by prepending '+' to value

    Advanced Use

     - equivalent keyword-argument available for all but first two arguments
     - mixed use of keyword-arguments with simple arguments permitted,
       but strikt 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' 

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

Advanced configuration

All maintained versions of this plugin 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:


Supported keywords are (with default values here):

nav=1             same as 'showbuttens'
wiki="%Y-%m-%d"   same as 'wiki_page_format', supports any expression that strftime can handle
cdate=1           same as 'show_ticket_open_dates'
draft=""          same as 'wiki_page_template'
query="id!=0"     see below
short=0           same as 'list_condense', total ticket count per day, that'll have
                  ticket list display condensed to just ticket no., 0 = never condense list
width=100%;       same as 'cal_width', check '+' prefixed values, if you need more forceful width definition

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 as expressions chained by AND (OR since 0.12 only). An invalid 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.

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

Again these are the implicit default values to give backwards compatible behaviour.

Real configuration examples:

[wikiticketcalendar] = due-date
ticket.due_field.format = %m/%d/%Y
  • 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 = ts

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 » wikiticketcalendar

Kindly provided by

Preparing the plugin from source requires the additional step of compiling message catalog files. Walk through:

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

But if you missed the 2rd step, this will be taken care for before the build step 3.
To exclude translations marked as # fuzzy by the translator, you'll want to omit the extra -f argument to message catalog compilation. In fact this is the default for automatic compilation before the build. Again, for more details see the l10n cookbook page for Trac plugins.

Recent Changes

[9668] by hasienda on 2010-12-13 00:55:10
WikiCalendarMacro: Pulling trunk in from WikiTicketCalendarMacro, refs #7564.

After separate development for some years lines of these plugins
are crossing again, as I do aim at bundling both to join the best
from both branches.

[9637] by hasienda on 2010-12-08 00:40:35
WikiTicketCalendarMacro: Split plugin/macro code into several modules, refs #7564.
[9615] by hasienda on 2010-12-06 23:08:54
WikiTicketCalendarMacro: Improve my quite historical i18n implementation.

An optional i18n implementation with backwards-compatibility to Trac 0.11
could be done, and much more elegant using a dedicated translation method
for Trac plugins from trac.util.dist, correcting [8264] once more.


Author: mcomb
Maintainer: hasienda
Contributors: rjollos

Attachments (2)

Download all attachments as: .zip