TaskPlanner 0.9beta

Introduction

The TaskPlanner plugin allows you to add, edit and manage tasks and 'to-do lists' easily in Moin, track their status and progress. With the new action "?action=TaskPlanner" you can augment every wiki pages with 'to-do lists'. This is extremely useful for a PersonalWiki - such as when installing MoinMoin locally on one's own machine, and using it as a PersonalInformationManager. However, this new plugin can also help when collaboratively managing projects in a company's intranet. Often you document the results of meetings in a wiki: What has been done so far and, more importantly, what still has to be done. TaskPlanner plugin can help here in managing and assigning tasks.

To append a task list to a page, simply call "Task Planner" from your "More Actions" menu. You then will get a form where you can specify the task:

addtask.jpg

Moin generates automatically a unique 6-digit task ID and saves the username of the creator and the creation date. Next you have to name the task and assign it to someone. The rest of the form is optional:

Click "save" to save the task to the database. To manage task easily you normally use the TaskTable macro. Simply put <<TaskTable>> on the page to see all the task appended to that page or <<TaskTable(page=OtherPage)>> to see tasks append to page OtherPage.

tasktable.jpg

You can also put the macro on you personal homepage and write  <<TaskTable(user=TestUser)>>  to see all task assigned to you.

As you can see, every task has a special icon showing its status and priority. When you click on the ID, you will get to the task's wikihome page or - if there is no homepage yet - asked to create one. By clicking on 'Edit task' you can edit the task, change priority and status and so on. Note: the 'Remove task' link is only visible to superusers. Normal users can mark a task which should be deleted with "remove me".

The TaskPlanner plugin goes nicely together with the AttachTable macro. With AttachTable you can easily manage the file attachments for wiki pages. I have changed the original version of Erick Martin and made it fit to the TaskPlanner plugin. Now AttachTable has some built-in mimetpy-classes, full multi language support and if the attachment is a jpg/gif/png file you can now also get a thumbnail preview of the image. Therefore you have to call AttachTable like this: <<AttachTable(preview=1)>>

imagepreview.jpg

Installation

TaskPlanner requires Moin 1.6.

  1. Download TaskPlanner.py and put it in your mywiki/data/plugin/action/ directory.

  2. Download TaskTable.py and AttachTable.py and put them in your mywiki/data/plugin/macro/ directory.

  3. Download TaskPlannerAttachTableIcons.zip and extract the archive and copy the files to your theme's directory, e.g. if you use modern theme, put them into python/share/moin/htdocs/modern/img/.

  4. Optional: Download the language files you want and drop them into python/Lib/site-packages/MoinMoin/i18n/ directory.

    • Note: You can use the given .po files below for your own translation efforts. But be aware that these files need to have utf-8 encoding. So if you don't have an utf-8-capable editor recode the files above to iso-8859-1, make the changes and code them back to utf-8. Otherwise there will be errors. For recoding the files, use recode.py on MoinMoinBugs/RecodingToolForPoFilesDoesNotWorkOnWin.

    • German:

Now comes the difficult part: We have to do some changes to the Moin code.

Open common.css of the theme you use (e.g. htdocs/modern/css/common.css) and append this at the end of the file:

   1 --- common_old.css	2006-12-26 16:05:04.000000000 +0100
   2 +++ common.css	2006-12-23 22:38:40.000000000 +0100
   3 @@ -448,3 +448,48 @@
   4  /* end MonthCalendar stuff */
   5  
   6  span.anchor { display: none; }
   7 +
   8 +
   9 +/* AttachTable and TaskTable css */
  10 +.attachmentTable {
  11 +
  12 +}
  13 +
  14 +.attachmentTable table {
  15 +    border: 2px solid rgb(100,135,220);  /* Light blue */
  16 +    border-collapse: collapse;
  17 +    width: 80%;
  18 +    margin-left: 20px;
  19 +}
  20 +
  21 +.attachmentTable td {
  22 +    border: 1px solid lightblue;
  23 +    padding: 4px
  24 +}
  25 +
  26 +.attachmentTable th {
  27 +    border: 1px solid lightblue;
  28 +    background-color: rgb(100,135,220); /* rgb(100,135,220) */
  29 +    font-weight: bold;
  30 +    padding: 4px
  31 +}
  32 +
  33 +.attachmentTable tr {
  34 +    background-color: rgb(240,240,240)
  35 +}
  36 +
  37 +.attachmentTable tr.altrow {
  38 +    background-color: rgb(127,127,255);
  39 +}
  40 +
  41 +.attachmentTable tr:hover {
  42 +    background-color: rgb(140,170,230);
  43 +    color: white
  44 +}
  45 +
  46 +.smallText {
  47 +    text-align: right;
  48 +    font-size: small;
  49 +}
  50 +
  51 +/* end AttachTable and TaskTable stuff */
  52 \ No newline at end of file
common.diff

You can also look here at this changed common.css file for Moin 1.6: common.css

Open now !MoinMoin/theme/_init_.py and change the code as follows:

   1 --- __init__old.py	2006-12-09 13:32:00.000000000 +0100
   2 +++ __init__.py	2006-12-29 16:48:38.000000000 +0100
   3 @@ -64,7 +64,53 @@
   4          # search forms
   5          'searchbutton': ("[?]",                  "moin-search.png", 12, 12),
   6          'interwiki':  ("[%(wikitag)s]",          "moin-inter.png",  16, 16),
   7 -
   8 +        # AttachTable and TaskTable toggle controls
   9 +        'table-null':               ("",                            "table-null.png", 16, 16),
  10 +        'table-close':              (_("Click to collapse table"),  "table-close.png", 16, 16),
  11 +        'table-open':               (_("Click to expand table"),    "table-open.png", 16, 16),
  12 +        # TaskTable icons
  13 +        'task--todo':               (_("To Do"),                    "task-no-todo.png", 48, 48),
  14 +        'task--inprogress':         (_("In Progress"),              "task-no-inprogress.png", 48, 48),
  15 +        'task--pending':            (_("Pending"),                  "task-no-pending.png", 48, 48),
  16 +        'task--done':               (_("Done"),                     "task-no-done.png", 48, 48),
  17 +        'task--failed':             (_("Failed"),                   "task-no-failed.png", 48, 48),
  18 +        'task-low-todo':            (_("Low - To Do"),              "task-low-todo.png", 48, 48),
  19 +        'task-low-inprogress':      (_("Low - In Progress"),        "task-low-inprogress.png", 48, 48),
  20 +        'task-low-pending':         (_("Low - Pending"),            "task-low-pending.png", 48, 48),
  21 +        'task-low-done':            (_("Low - Done"),               "task-low-done.png", 48, 48),
  22 +        'task-low-failed':          (_("Low - Failed"),             "task-low-failed.png", 48, 48),
  23 +        'task-medium-todo':         (_("Medium - To Do"),           "task-medium-todo.png", 48, 48),
  24 +        'task-medium-inprogress':   (_("Medium - In Progress"),     "task-medium-inprogress.png", 48, 48),
  25 +        'task-medium-pending':      (_("Medium - Pending"),         "task-medium-pending.png", 48, 48),
  26 +        'task-medium-done':         (_("Medium - Done"),            "task-medium-done.png", 48, 48),
  27 +        'task-medium-failed':       (_("Medium - Failed"),          "task-medium-failed.png", 48, 48),
  28 +        'task-high-todo':           (_("High - To Do"),             "task-high-todo.png", 48, 48),
  29 +        'task-high-inprogress':     (_("High - In Progress"),       "task-high-inprogress.png", 48, 48),
  30 +        'task-high-pending':        (_("High - Pending"),           "task-high-pending.png", 48, 48),
  31 +        'task-high-done':           (_("High - Done"),              "task-high-done.png", 48, 48),
  32 +        'task-high-failed':         (_("High - Failed"),            "task-high-failed.png", 48, 48),
  33 +        'task-critical-todo':       (_("Critical - To Do"),         "task-critical-todo.png", 48, 48),
  34 +        'task-critical-inprogress': (_("Critical - In Progress"),   "task-critical-inprogress.png", 48, 48),
  35 +        'task-critical-pending':    (_("Critical - Pending"),       "task-critical-pending.png", 48, 48),
  36 +        'task-critical-done':       (_("Critical - Done"),          "task-critical-done.png", 48, 48),
  37 +        'task-critical-failed':     (_("Critical - Failed"),        "task-critical-failed.png", 48, 48),
  38 +        'task-closed':              (_("Closed"),                   "task-closed.png", 48, 48),
  39 +        'task-removeme':            (_("Remove Me"),                "task-removeme.png", 48, 48),
  40 +        # AttachTable mimetypes
  41 +        'unknown':                  (_("Unknown filetype"),         "filetype-unknown.png", 48, 48),
  42 +        'generic-x-archive':        (_("Archive file"),             "generic-x-archive.png", 48, 48),
  43 +        'generic-x-audio':          (_("Audio file"),               "generic-x-audio.png", 48, 48),
  44 +        'generic-x-image':          (_("Image file"),               "generic-x-image.png", 48, 48),
  45 +        'generic-text-x-source':    (_("Source code file"),         "generic-text-x-source.png", 48, 48),
  46 +        'generic-x-video':          (_("Video file"),               "generic-x-video.png", 48, 48),
  47 +        '.doc':                     (_("MS Word file"),             "mime-msword.png", 48, 48),
  48 +        '.html':                    (_("HTML file"),                "mime-text-html.png", 48, 48),
  49 +        '.mdb':                     (_("MS Access file"),           "mime-msaccess.png", 48, 48),
  50 +        '.pdf':                     (_("PDF file"),                 "mime-pdf.png", 48, 48),  
  51 +        '.ppt':                     (_("MS PowerPoint file"),       "mime-mspowerpoint.png", 48, 48),
  52 +        '.txt':                     (_("Text file"),                "generic-x-text.png", 48, 48),
  53 +        '.xls':                     (_("MS Excel file"),            "mime-msexcel.png", 48, 48),
  54 + 
  55          # smileys (this is CONTENT, but good looking smileys depend on looking
  56          # adapted to the theme background color and theme style in general)
  57          #vvv    ==      vvv  this must be the same for GUI editor converter
_init_.diff

If you don't know where to put this stuff correctly, you can also have a look at this patched _init_.py file for Moin 1.6: __init__.py

Annotation: Alternatively you can put the modified icon dict also in your theme file, see discussion below for that. That's more safe if you update Moin since the wiki/data/plugin/theme stuff is not touched by that.

That's it!

Documentation

To add and manage tasks simply call the action "Task Planner" from your more actions menu or click on the "Add/Manage" link of the TaskTable macro. I do recommand the second because all setting from the TaskTable macro like assign or page are transfered to the action.

"Closed" tasks are tasks you want to keep for archiving in the database. When closing a task, the person who closed the task and the closure date are saved.

"Remove me" tasks are tasks that are no longer needed. Superusers can decide whether to remove them or not and set them back to closed state. When using TaskPlanner on a PersonalWiki normally you set yourself as superuser.

I didn't integrate a e-mail notification system because I don't like the idea and thus don't want to support that - although some CEO are quite keen on that. First: You get enough e-mails today, we shouldn't enlarge that. Second: I don't like the idea of impersonally bombing the users to hell with to do lists. I would prefer to have more social contact. Go and visit your colleague and remind him if he forgot a "to do". Do put the TaskTable plugin on your homepage and look at it daily. That suffices in my eyes...

Usage of TaskTable

<<TaskTable>> Display tasks for current page

<<TaskTable(page=SomeWikiPage)>> Display tasks for page 'SomeWikiPage'

<<TaskTable(assign=UserName)>> Display tasks assigned to 'UserName'

<<TaskTable(page=SomeWikiPage, assign=UserName)>> Display tasks assigned to 'UserName' for page 'SomeWikiPage'

<<TaskTable(sort=status)>> <<TaskTable(sort=date)>> Display tasks sorted by given criteria

<<TaskTable(readonly=1, closed=1)>>

args:

@page=string: display tasks appended to an other page (default=CurrentPage)

@assign=string: display only tasks for a specific user (default=None)

@sort=string: sort task by either by status or date (default=sort by prio, then date)

@closed=bool: display the table in a closed/open state overriding the default cfg value in wikiconfig.py. In wikiconfig.py you can set a cfg value by 'task_table_compact=1' to e.g. show all task tables closed by default.

@readonly=bool: display the table without the 'remove task' option

Usage of AttachTable

<<AttachTable>>

<<AttachTable(page=FrontPage, preview=1)>>

<<AttachTable(readonly=1, closed=1, syntax=1)>>

args:

@page=string display the attachemnt table for a different page

@preview=1 if the attachment is a jpg/gif/png file, show a thumbnail image

@syntax=1 display the wiki syntax how to reference to an attachment

@closed=0 display the table in a closed/open state overriding the default cfg value 'attach_table_compact' in wikiconfig.py. In wikiconfig.py you can set a cfg value by 'attach_table_compact=1' to e.g. show all attach tables closed by default.

@readonly=0 force the display the table in a readonly mode, i.e. remove the 'delete attachment' option

Adding Mimetypes for AttachTable

If you want to add an new mimetype icon e.g. for .py-files, you have to add just this line to theme/_init_.py:

'.py':                     (_("Python Source file"),            "mime-python.png", 48, 48),

AttachTable will recognize this automatically.

If you are unhappy with the mimetype classes which are provided by AttachTable and you think in some class a specific extension is missing (e.g. in the generic-x-image class there are no ".emf" files) you have to change AttachTable.py from line 253 onwards:

AttachTable.py line 253:
elif ext in ['.py', '.js', '.jar', '.diff', '.patch']:
    ext = 'generic-text-x-source'
elif ext in ['.tar', '.zip', '.bz2', '.rar', '.gz', '.cab', '.lha', '.arj']:
    ext = 'generic-x-archive'
elif ext in ['.wav', '.aif', '.aifc', '.aiff', '.midi', '.mid', '.au']:
    ext = 'generic-x-audio'
elif ext in ['.jpg', '.jpeg', '.jpe', '.gif', '.png']: # Do not add new image extensions here. See below!!
    ext = 'generic-x-image'
    if preview_images:
        do_preview = True
elif ext in ['.bmp', '.ps', '.eps', '.cdr', '.pct', '.mac', '.drw', '.svg']: # Do add new image extensions only here
    ext = 'generic-x-image'
elif ext in ['.mpeg', '.mpg', '.wmv', '.avi', '.mov', '.movie', '.qt']:
    ext = 'generic-x-video'
elif ext in ['.htm', '.html']:
    ext = '.html'

The icons for the mimetpyes for AttachTable are taken from "Dropline Neu!" from http://www.gnome-look.org/content/show.php?content=38835. There you can find more mimetype icons.

Also "Docunium" from http://rimshotdesign.com/goodies.php has a really wonderfull and very, very large icon collection for different mimetypes. Try it out. It looks really great!

Related Work

I have tried also to do a redesign of Moin's standard icon set based on the style of TaskPlanner and the mimetypes of AttachTable. I've called the icon set "MoinDropline". The most common icons look like this now:

common_icons.jpg

.. and the iconbar of classic theme like this:

classic_theme.jpg

You can find MoinDropline, hints on download and installation here.

Discussion

Problems

Hi Oliver; I luv your "tasty" taskplanner, but there're some bugs. Are you still updating this macro regulary?

  1. I use umlauts (like ä) in the Action Module / Form for "Created by", "Task name", "Assigned to" and got some error like:  'ascii' codec can't encode character u'\xe0' in position 58: ordinal not in range(128)  see traceback_taskplanner.html.

  2. If I click to "Edit Task" on a single Task I receive an error like  Please use the interactive user interface for adding, editing and removing tasks.  . After a second time (clicking on edit task), it works. clickingerror.jpg

    • Has this problem been solved? I seem to have the same problem. -- TakeoKatsuki 2009-10-30 04:06:21

  3. Only a stupid newbee Question; I put the german po Files into my MoinMoin directory, but still got "english"? Did I missed something?

[beteigeuze@web34 data]$ ls ~/lib/python2.4/site-packages/MoinMoin/i18n/
ar.MoinMoin.po     de.MoinMoin.po     es.MoinMoin.po  hi.MoinMoin.po  it.MoinMoin.po  Makefile        nb.MoinMoin.po     ro.MoinMoin.po  tr.MoinMoin.po
bg.MoinMoin.po     de.TaskPlanner.po  fa.MoinMoin.po  hr.MoinMoin.po  ja.MoinMoin.po  mk.MoinMoin.po  nl.MoinMoin.po     ru.MoinMoin.po  uk.MoinMoin.po
ca.MoinMoin.po     dummy.py           fi.MoinMoin.po  hu.MoinMoin.po  ko.MoinMoin.po  mn.MoinMoin.po  pl.MoinMoin.po     sl.MoinMoin.po  vi.MoinMoin.po
cs.MoinMoin.po     dummy.pyc          fr.MoinMoin.po  id.MoinMoin.po  ku.MoinMoin.po  MoinMoin.pot    pt-br.MoinMoin.po  sr.MoinMoin.po  zh.MoinMoin.po
da.MoinMoin.po     el.MoinMoin.po     gl.MoinMoin.po  __init__.py     lt.MoinMoin.po  msgfmt.py       pt.MoinMoin.po     sv.MoinMoin.po  zh-tw.MoinMoin.po
de.AttachTable.po  en.MoinMoin.po     he.MoinMoin.po  __init__.pyc    lv.MoinMoin.po  msgfmt.pyc      README             tools

Ideas for a better PIM integration

how about a jabber notification of uncompleted tasks

Ideas for a better intranet integration and as project management and coordination tool

[Add your ideas and patches here]

Ideas about the TaskPlanner

I got some ideas about optimizing the TaskPlanner:

I would like to use a structure like:

And also maybe another main department/project like:

The point is that I want to use in a single wiki different "project groups". I would use your form for this purpose in this way:

That's why I got here some inputs (I know is a lot; and if you start to thinking about all this stuff, too deeply - you end up to creating a whole new wiki project management software with MoinMoin :-) ), well anyway, here we go:

This are just a few inputs; maybe somebody pick them up and "do something", bye -- MarcelHäfner 2008-05-07 21:50:03

Unfortunately the TaskPlanner works unpredictable under Moin 1.7.x. I can delete old tasks, but klick on "Add/Manage tasks" just does nothing. I cannot add new tasks what makes the TaskPlanner a little bit.. useless ;-) -- MelaEckenfels 2008-08-03 06:28:24

TaskPlanner doesn't work on Moin 1.7.x efficiently because of the function send_page in Page.py, 1.6 takes a additional variable msg where as 1.7.x doesn't have that. -- PravinKumar 2008-09-18 00:00:00

That's the change someone has to do.

   1 msg = _("Done")
   2 request.theme.add_msg(msg, "info")
   3 Page(request, pagename).send_page()

Could please someone explain how to fix it to work with Moin 1.7.x? -- DavidFava2008-10-03 00:00:00

I updated TaskPlanner (with email notification) so it can work with version 1.9.1.: TaskPlanner-1.9.1.py. -- JeroenVet 2010-01-23 14:21:31

Also, to use in version 1.9.1. this patch should be applied to AttachTable.py:

@@ -201,7 +201,7 @@
                                                                       'year': _fdate[4], }
 
         base, ext = os.path.splitext(attachment)
-        get_url = getAttachUrl(pagename, attachment, request, escaped=1)
+        get_url = getAttachUrl(pagename, attachment, request)
         parmdict = {'page_url': page_url, 'action': action,
                     'urlfile': urlfile, 'label_del': label_del,
                     'base': base, 'label_edit': label_edit,

-- JeroenVet 2010-01-23 14:46:49

2009-03-28 - Not work for me. version 1.8.0

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

2009-03-28 22:58:57,625 WARNING MoinMoin.log:136 load_config for "C:\path\to\logging_configuration_file" failed with "No section: 'formatters'".
2009-03-28 22:58:57,625 WARNING MoinMoin.log:137 using logging configuration read from built-in fallback in MoinMoin.log module!
2009-03-28 22:58:58,015 INFO MoinMoin.config.multiconfig:125 using wiki config: C:\moin\HomeWiki\wikiconfig.pyc
Traceback (most recent call last):
  File "C:\moin\HomeWiki\moin.cgi", line 54, in 
    run(Config)
  File "C:/Moin/Lib/site-packages\MoinMoin\server\server_cgi.py", line 58, in run
    request.run()
  File "C:\Moin\Lib\site-packages\MoinMoin\request\__init__.py", line 1205, in run
    self.initTheme()
  File "C:\Moin\Lib\site-packages\MoinMoin\request\__init__.py", line 1184, in initTheme
    self.loadThem

(!) Just read what you posted above. Obviously your logging configuration is invalid / does not exist. -- ThomasWaldmann 2009-03-29 10:32:58

Requests

This is a promising tool for project management. Here are some suggestions/requests. Thanks. -- TakeoKatsuki 2009-10-28 09:10:39

MoinMoin: TaskPlanner (last edited 2010-12-21 17:52:54 by 24-247-174-123)