= Calendar view of Milestones and Tickets = [[PageOutline(2-5,Contents,pullout)]] == Description == Macro for the Trac Wiki Ticketing system to display Milestones and Tickets in a calendar view. This Macro is hosted [http://macgeek.dyndns.org/software/Trac_WikiTicketCalendar here] [[Image(Picture2.jpg)]] 20091029 google calendar style update [[Image(WikiTicketCalendarMacro.20091029.2.png)]][[Image(WikiTicketCalendarMacro.20091029.png)]] == Bugs/Feature Requests == Existing bugs and feature requests for UserStatsMacro are [query:status!=closed&component=WikiTicketCalendarMacro&order=priority here]. If you have any issues, create a [/newticket?component=WikiTicketCalendarMacro&owner=rjollos new ticket]. == Installation == Can someone please add some installation instructions that work with 11.5? What is the location where the macro must be copied to could be a good start. I copied it to plugin directories. No indication anywhere where the wiki-macros location is in 11.5. See '''For Trac 0.11''' section in the Installation section bellow -- jay.w.xie at gmail.com == Port to Trac 0.11.1 == Hi there, I ported this macro to work with version 0.11.1 along the lines of WikiCalendarMacro. Unfortunately I'm familiar with java, php or c but didn't do any python coding yet. It's up and running on my production system for about a week and I didn't experience any problems yet ... but that doesn't count much. If anyone could do a little quality assurance, I would be very thankful. Thanks in advance. Greets, Alex (alex [at] goldstift [dot] de) === Installation === '''For Trac 0.10 and before''' Simply download the attached WikiTicketCalendarMacro.py at the end of this page to your projects "wiki-macros"-folder and reload your webserver. '''For Trac 0.11''' This macro should also be copied into the "plugins" folder, so download the attached WikiTicketCalendarMacro.py at the end of this page there. Then enable it in trac.ini or the "Manage Plugins" page under the "Admin" tab. Afterwards you should be able to use the macro in your wiki === Usage === Excerpt of the source documentation: {{{ Activate it in 'trac.ini' [components] WikiTicketCalendarMacro.* = enabled format: WikiTicketCalendar([year,month,[showbuttons,[wiki_page_format]]]) displays a calendar, the days link to: - milestones (day in bold) if there is one on that day - a wiki page that has wiki_page_format (if exist) - create that wiki page if it does not exist arguments: 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 there is not a milestone placed on that day) (if exist, otherwise link to create page) default is "%Y-%m-%d", '*' for default examples: WikiTicketCalendar(2006,07) WikiTicketCalendar(2006,07,false) WikiTicketCalendar(*,*,true,Meeting-%Y-%m-%d) WikiTicketCalendar(2006,07,false,Meeting-%Y-%m-%d) }}} == Bugfix == To fix encoding problems for e.g. german users add the following code to the script: {{{ import locale def expand_macro(self, formatter, name, arguments): loc = locale.setlocale(locale.LC_ALL) locale.setlocale(locale.LC_TIME, 'english') . . . locale.setlocale(locale.LC_ALL, loc) return Markup(table) }}} If you want to use one of the latest patches be sure to fix the daylight saving problem and change: {{{ duedatestamp = time.mktime((year, month, day, 0, 0, 0, 0, 0, -1)) duedatestamp_eod = time.mktime((year, month, day, 23, 59, 0, 0, 0, -1)) to duedatestamp = time.mktime((year, month, day, 0, 0, 0, 0, 0, 0)) duedatestamp_eod = time.mktime((year, month, day, 23, 59, 0, 0, 0, 0)) }}} I can not offer any patch here because the maximum count of external links is reached for this ticket. == Recent Changes == [[ChangeLog(wikiticketcalendarmacro, 3)]] [attachment:WikiTicketCalendarMacro.20091029.py.gz] by xeroo on 10/29/09 - Update to Google Calendar style css. (采用谷歌日历风格样式) - Wiki brief is shown in calendar if exsits. (每日对应wiki如果存在则在此日显示wiki摘要) - Open tickets is shown under milestone, see line 305. (milestone中未关闭的tickets会显示在milestone下面,见305行) - Ticket action history is shown instead of tickets created and closed. Only close history is shown by default, this can be modified at line 330. (显示ticket变更历史,而不是只显示创建和关闭,此代码中目前仅显示关闭动作,可以在330行修改选择显示的动作列表) - Screenshot: [attachment:WikiTicketCalendarMacro.20091029.png] == Author/Contributors == '''Author:''' [wiki:mcomb] [[BR]] '''Maintainer:''' [wiki:mcomb] [[BR]] '''Contributors:'''