My group in our company had the same problem as all groups: How to coordinate annual holiday
for the group members?
Recently we used the wall-calendar in my office to remember each members holiday plan.
After plans had changed, it looked odd. And it worked only inside my office.
As we already use TWiki for project management and knowledge base, I looked for a Wiki based solution.
I browsed through
the rich TWiki plugin area, but nothing fulfilled my wishes. Especially no plugin was
able to show an annual overview.
I created a solution by combining EasyTimelinePlugin and FilterPlugin.
A table is maintained, where group members can define their holiday plans. Keywords in the
last column define whether it is acknowledged holiday, a plan for holiday or some other
kind of absence of a person.
The table can easily be modified by all team members, even such that have no
Wiki skills.
Now EasyTimelinePlugin is used to render an overview. Data is extracted
from the table with FilterPlugin. Note that the image simulated as required
Plugins are not installed in this TWiki.
You can now easily see, that Paul will have problems in getting his holiday acknowledged,
as John jumped ahead.
Implementation Details
Displaying Data
Below you find the EasyTimeline code to render the calendar. Syntax details are beyond the scope
of this application note. However, you should find it easy to do gently modifications (e.g. translate
labels, change size, change/add keywords or add team members).
The EaysTimeline code will work only for a particular year. If you step to the next year, you'll have to edit.
All group members have to be included in the EasyTimeline code. Just adding a new member into the holiday table will not be enough.
Normally you would want to use the group members Wiki name in the table (e.g. Main.JohnDoe)
Extracting Data
While the EasyTimeline rendering is fine in itself, the holiday planer application would be a pain if
you had to edit the EasyTimeline code itself for changing the events. It becomes usable by extracting the
event dates from a table (which is easily modified). This is done with the help of FilterPlugin.
Refer to this slice of the EasyTimeline code:
With %EXTRACT% the table(s) inside the current topic are searched for lines with Susan in the
first column. The regular expression (refer to pattern) then matches the dates in column 2 and 3 and the keyword in
the last column. Finally the matched data is rearranged and inserted into the EaysTimeline code
(refer to format).
EasyTimelinePlugin will see this code:
The table uses German date syntax. You can change this by modifying the regular expression pattern.
Conclusion
TWiki is fine in itself. It becomes outstanding when you can do gentle application programming
by combining plugin features as above. Which other Wiki can do that?
Comments
PeterThoeny - 17 Aug 2008:
Thank you Stefan for sharing this with the TWiki community!
CarloSchulz - 18 Aug 2008:
Stefan, very cool stuff. Especially the detailed doccu. Will give it a try on my own TWiki site...
SeanCMorgan - 19 Aug 2008:
I very much like this approach. I tried to introduce this function with HolidaylistPlugin, but it died because it was too hard for users to maintain their data. Thanks.