14 | | Check the documentation for WikiTicketCalendarMacro to learn about its option to preselect a wiki page template for new pages and much more. The macro WikiTicketCalendarMacro, once forked off from this macro, has been re-integrated. Both macros are available in `wikicalendar-2.0.0` and later. |
| 15 | A heavily modified version is used [https://wiki.ctdo.de/#DiesenMonatimCTDO here as event calendar], source unknown. |
| 16 | |
| 17 | == Usage |
| 18 | |
| 19 | Enter `[[WikiTicketCalendar(*,*,true,Wochenberatung/%Y-%m-%d,true,Beratung)]]` in your wiki page to achieve the following: |
| 20 | |
| 21 | [[Image(wikiticketcalendar_screenshot.gif)]] |
| 22 | |
| 23 | The calendar can be invoked in the following two basic ways: |
| 24 | '''Simple''' |
| 25 | {{{ |
| 26 | [[WikiTicketCalendar([<year>,<month>,[<nav>,[<wiki>,[<cdate>,[<template>,[<query>,[<short>,[<width>]]]]]]]])]] |
| 27 | }}} |
| 28 | '''Advanced''' |
| 29 | {{{ |
| 30 | [[WikiTicketCalendar([nav=(0|1)],[wiki=<strftime-expression>], |
| 31 | [cdate=(0|1)],[base=<template>],[query=<TracQuery-expr>], |
| 32 | [short=<integer-value>],[width=[+]<valid-CSS-size>])]] |
| 33 | }}} |
| 34 | - equivalent keyword-argument available for all but first two arguments |
| 35 | - 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, |
| 36 | - query evaluates a valid TracQuery expression based on any ticket field including multiple expressions grouped by 'and' and 'or' |
| 37 | |
| 38 | === Arguments |
| 39 | |
| 40 | ||'''Argument'''||'''Description'''||'''Default'''||'''Example'''|| |
| 41 | || `year`|| specifies the year to be shown, '*' current year || * || year=2011 || |
| 42 | || `month`|| specifies the month to be shown, '*' current month || * || month=12 || |
| 43 | || `nav`|| (1) show previous/next navigation or (0) not || 1 || nav=1 || |
| 44 | || `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" || |
| 45 | || `cdate`|| (1) show ticket created / open dates [1,0] || 1 || cdate=1 || |
| 46 | || `base`|| wiki template tried to create new page || "" || base="" || |
| 47 | || `query`|| evaluates a valid TracQuery expression based on any ticket field including multiple expressions grouped by 'and' and 'or' || || query="id!=0" || |
| 48 | || `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 [attachment:wikiticketcalendar_screenshot_1-2-1.png this] [0,1,...] || 0 || short=0 || |
| 49 | || `width`|| set calendar table 'min-width', and optionally 'width' for surrounding div triggered by prepending '+' to value || 100% || width=100% || |
| 50 | |
| 51 | === Examples |
| 52 | |
| 53 | {{{ |
| 54 | [[WikiTicketCalendar(2006,07)]] |
| 55 | [[WikiTicketCalendar(2006,07,false)]] |
| 56 | [[WikiTicketCalendar(*,*,true,Meeting-%Y-%m-%d)]] |
| 57 | [[WikiTicketCalendar(2006,07,false,Meeting-%Y-%m-%d)]] |
| 58 | [[WikiTicketCalendar(2006,07,true,*,true)]] |
| 59 | [[WikiTicketCalendar(2006,07,true,Meeting-%Y-%m-%d,true,Meeting)]] |
| 60 | [[WikiTicketCalendar(wiki=Talk-%Y-%m-%d,base=Talk)]] |
| 61 | equivalent to [[WikiTicketCalendar(*,*,true,Talk-%Y-%m-%d,true,Talk)]] |
| 62 | [[WikiTicketCalendar(wiki=Meeting-%Y-%m-%d,query=type=task&owner=wg1)]] |
| 63 | [[WikiTicketCalendar(wiki=Meeting_%Y/%m/%d,short=6)]] |
| 64 | [[WikiTicketCalendar(*,*,true,Meeting-%Y%m%d,width=+75%;)]] |
| 65 | }}} |
| 66 | |
| 67 | '''Notes''': |
| 68 | 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: |
| 69 | {{{ |
| 70 | [[WikiTicketCalendar(wiki=Meeting-%Y-%m-%d)]] |
| 71 | }}} |
| 72 | 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, |
| 73 | or you could choose to display tickets only with high/highest priority, tickets with some special content in a custom field, etc. |