Extension:Todo Tasks

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
Todo Tasks

Release status:Extension status unmaintained

ImplementationTemplate:Extension#type Parser function, Special page, Database
DescriptionTemplate:Extension#description Create/maintain todo tasks, notify users to whom the task is assigned, display tasks by projects
Author(s)Template:Extension#username Paul Grinberg (Gri6507talk)
Latest versionTemplate:Extension#version v0.10.0 (Dec 6, 2009)
Database changesTemplate:Extension#needs-updatephp Yes
LicenseTemplate:Extension#license GPL
Download Template:WikimediaDownload/svn
Change Log
Hooks usedTemplate:Extension#hook

Translate the Todo Tasks extension if it is available at translatewiki.net

Check usage and version matrix.

The Todo Tasks extension provides the ability to create and modify todo tasks which get assigned to some wiki user(s). The extension also provides the capability of emailing the assignee(s) of the task upon creation/modification of the task. The extension also allows each wiki user to review all of their assigned tasks. Additionally, the extension allows for review of the assigned tasks by projects. The entire user interface is completely internationalized with over a dozen languages!

Even though this extension is similar to Extension:Tasks Extension, it has some additional functionality and the implementation is more generic due to the use of the Extension:DynamicPageList extension.

Reason for existence[edit]

Many companies have a work environment which spans multiple physical locations and employs many people. Oftentimes, meetings are held without a full quorum of attendees. Just as often, tasks and action items coming from these meetings get assigned to people, whether they are present at the meeting or not. This could lead to some tasks getting lost or forgotten.

Wiki usage in the corporate world has greatly reduced the possibility of that happening. With the use of standard templates, the documentation of these tasks is very easy, reliable, and consistent in functionality and appearance. Unfortunately, having the task documented does not guarantee that the task assignee(s) will become aware of that task.

The primary reason for this extension is to notify the task assignee(s) of whatever work they have been assigned to do. The secondary reason for the extension is to provide a simple interface to both create new tasks and view existing tasks. Another reason for the extension is to allow managerial oversight of all assigned tasks by project.

Installation Instructions[edit]

Step 1[edit]

Download the version of the extension code appropriate for your MediaWiki version from here. Extract all files into the extensions/TodoTasks/ directory.

Step 2[edit]

Add the following text to your LocalSettings.php:

require_once( "$IP/extensions/TodoTasks/TodoTasks.php" ); 
$wgGroupPermissions['sysop']['editinterface']   = true;

Note: be sure to verify installation path and "Task List" file of extension version installed.

Step 3[edit]

Make the necessary changes to your MySQL database. If you are using a prefix on your tables, replace /*$wgDBprefix*/ with your prefix. Otherwise you should create a table just named 'todo'.

CREATE TABLE /*$wgDBprefix*/todo (
                          id   INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
                          hash TINYBLOB

Step 4[edit]

If your wiki does not already have it installed, follow the installation instructions to install the Extension:DynamicPageList (third-party).

Step 5[edit]

If your wiki does not already have it installed, follow the installation instructions to install the Extension:ParserFunctions.

Step 6[edit]

In addition to tasks being assigned to users, tasks can optionally be associated with projects (see todo template for details). This allows for managerial oversight of tasks based on projects. In other words, by going to a special page, the manager could then get a listing of all assigned tasks for a given project.

Project tracking is enabled by default. If you want to disable it, set in LocalSettings.php

$wgUseProjects = false;

If you don't disable project tracking, then you must create the MediaWiki:TodoTasksValidProjects page in your wiki. The format of this page should be

* Project 1
* Project 2
* etc

Make sure to fill this file with the correct Project Names. This is how the extension knows about valid projects.

Step 7[edit]

Create a Template:Todo with the following code

<includeonly><div style="background-color: #fff0f0; border: 1px dashed blue; margin: 0.0em; padding: 0.2em;">
<font style="BACKGROUND-COLOR: yellow">'''TODO''':</font> {{#todo:{{{1}}}|{{#ifeq: {{{2|+}}}|{{{2|-}}}|{{{2}}}|}}|{{#ifeq: {{{project|+}}}|{{{project|-}}}|{{{project}}}|}}}}</div></includeonly>
<noinclude>This template is intended to be used as a note to users to indicate that more work needs to be done. To use this template, use:
 <nowiki>{{Todo|What to do|Who|project=proj1,proj2}}</nowiki>
where the ''Who'' field is a comma-separated list of one of the following case insensitive items (in order of preference):

# Wiki user name
# A full name 
# The last name of the user
# A partial name of the user

and project is an optional comma-separated list of valid projects as defined by [[MediaWiki:TodoTasksValidProjects]].</noinclude>

Step 8[edit]

Create a Template:Todo.dpl with the following code

* '''{{{2}}}''' - {{{1}}}
</includeonly><noinclude>This template is to be used only in conjunction with the [http://semeb.com/dpldemo/index.php?title=Dynamic_Page_List Dynamic Page List Extension] and the [[Template:Todo]]. '''DO NOT MODIFY IT'''</noinclude>

Protect this template; you don't want a malicious user modifying it.

Usage Instructions[edit]

The todo template is self documenting. The basic idea is that whenever you want to assign a task to some user, simply add the text

{{todo|What to do|who1,who2,etc}}

where the last parameter is a comma separated list of wiki usernames, full user names, or partial lastnames (case insensitive) to whom the tasks should be assigned. When viewed, an assigned tasks looks like


Even if project tracking is enabled, association of a task with a project is optional. To assign a task to a project, simply use

{{todo|What to do|who1,who2,etc|project=proj1,proj2,etc}}

where the last parameter is a comma separated list of valid projects as defined in Step 6.

The actual assigning of a task is done when the Save Page button is clicked when done editing the page. The act of assigning the task will send out an email to all task assignees if the md5 sum of the task text concatenated with the task assignees (but not with the task associated projects) is new. In other words, an email will go out whenever the task text is changed, task assignees are changed/reordered, or a new task is created. Note: clicking the Show Preview button when editing the page does not count as an assignment of a task.

Every user can also view their complete list of tasks. This extension will add a new user specific navigation link called My Tasks. When viewed with the MonoBook skin, this link will appear the upper right hand corner of every page. The same list can be accessed by going to Special:TaskList page. Note: to view the tasks of other users, simply go to Special:TaskList/username where username is the username of the user whose tasks you are trying to view. As of v0.7.4, it is now possible to view tasks for a list of users by simply going to Special:TaskList/username1,username2,etc. This is especially handy when a manager wants to monitor the assigned tasks for a whole team. This special page looks something like this


If project tracking is enabled (see Step 6), then there will be another wiki page entitled Special:TaskListByProject. This page can be used to view all tasks assigned to any user on a per-project basis. This special page looks something like this


Optional Improvements[edit]

Moving TODO tasks to INPROGRESS[edit]

Sometimes, it may be nice to know that tasks are not only assigned or done, but are actually being worked on. This can be easily accomplished with a few small additions/changes.

  1. Clone the {{todo}} template and call it {{InProgress}}.
  2. Clone the {{todo.dpl}} template and call it {{InProgress.dpl}}
  3. Edit SpecialTaskList_body.php. In function wfSpecialTaskList() find the section that says something like
$wgOut->addWikiText(sprintf(wfMsgTL('tasklistbyname'), $fullname));
$wgOut->addWikiText("<dpl> uses=Template:Todo\n include={Todo}.dpl\n includematch=/${fullname}/i\n </dpl>");
and add two more lines that look very similar
$wgOut->addWikiText(sprintf(wfMsgTL('tasklistbynameinprogress'), $fullname));
$wgOut->addWikiText("<dpl> uses=Template:InProgress\n include={InProgress}.dpl\n includematch=/${fullname}/i\n </dpl>");

and modify the SpecialTaskList.i18n.php file to contain the necessary translation for tasklistbynameinprogress. This way, whenever the user clicks on the "My Tasks" button in the upper right of every page, they will see not only all the TODO tasks assigned to them, but also all INPROGRESS tasks.


Well, that's just a big word for stating that this extension is capable of being displayed in multiple languages. However, it is very easy to add new translations to the extension. Take a look at the SpecialTaskList.i18n.php file and I think it will be obvious what needs to be done. Of course, if there are any questions, then feel free to post them on the discussion page. Also, when new translations become available, please let the developers know so that they can be added to the file for future users.

This extension is translatable trough translatewiki.net.


  • v0.10.0 - December 6, 2009 - implemented new magic word support (by [[User::Siebrand]])
  • v0.9.7 - April 27, 2009 - i18n changes from [[User::Siebrand]] and User:shinjiman
  • v0.9.6 - June 14, 2008 - Security vulnerability discussed here fixed by Tim Starling
  • v0.9.6 - January 27, 2008 - minor bug fix to not report an E_NOTICE error when a user does not have a two word user_realname
  • v0.9.5 - November 20, 2007 - bug fix. Don't load SpecialPage.php more than once.
  • v0.9.4 - November 18, 2007 - do more error checking.
    • Report an error when [[MediaWiki:TodoTasksValidProjects]] does not exist.
    • Report username instead of the fullname when fullname is not defined.
  • v0.9.3 - November 15, 2007 - minor feature release; when not logged in, do not display the "My Tasks" link.
  • v0.9.2 - November 14, 2007 - minor bug fix; code now generates proper HTML (closes the </FORM> tag)
  • v0.9.1 - November 8, 2007 - made the extension more compatible with Extension:User Contact Links
  • v0.9.0 - November 5, 2007 - made changes to support internationalization
  • v0.8.1 - October 16, 2007 - fixed a bug in post-processing of Saving A Page for tasks with project= assignments.
  • v0.8.0 - October 12, 2007 - added project tracking capability; properly report version information in Special:Version.
  • v0.7.4 - September 27, 2007 - added a new feature to allow managers to view task assignments to a whole team at once.
  • v0.7.3 - September 19, 2007 - fixed so that Special:Version page displays information correctly.
  • v0.7.2 - August 30, 2007 - properly exit out of hook function, so that other extensions can use the hook.
  • v0.7.1 - August 14, 2007 - fixed a bug which prohibited adding links with alternate text in the todo call.
  • v0.7 - Augist 14, 2007 - better handling of spaces around assignee names
  • v0.6 - August 14, 2007 - fixed a problem where if a todo task is assigned with something other than a username of a user_full_name (i.e. partial last name), the My Task List did not find that task. This now overwrites the text of the article where the task is assigned to change the assignee from the user specified text to the proper user_full_text.
  • v0.5 - August 8, 2007 - fixed a bug where the passed in text was being stripped of all wiki link syntax
  • v0.4 - August 4, 2007 - initial publication on MediaWiki website.