It's better when it's simple

User Tools

Site Tools


Plugin Task - Hacks/Mods & Discussions



I'm testing a Release rc2013-11-18 «Binky RC2»

If set ACL then [namespace] only works for the user from the group admin


displays an empty result to the user from the other group.

what can be done?

Valery 2013-11-29

Width of Task Lists Too Dang Small

The width of the task list is extremely small. Here's a patch that will make it much more readable. It expands the table from a calulated 50% to a defined %70. The file is under <webroot>/lib/plugins/task .

--- style.css	2012-04-13 19:20:10.000000000 +0000
+++ style.css.bak	2012-04-13 19:06:47.000000000 +0000
@@ -42,10 +42,6 @@
   background-color: transparent;
-div.dokuwiki div.level2 table.pagelist {
-  width: 70%;
 div.dokuwiki div.newtask_form table.blind td,
 div.dokuwiki div.vcalendar table.blind td {
   width: 50%;

Mark 2012-04-13 15:25 EDT

Priority not in task overview

Related to the DokuWiki release “Anteater” I have the following problem:

A new task, created via the new task form will show up in the tasks list (after implementing the hack below ;-)), but will not be colored and sorted by its priority. Do you have another hack for this? By the way, is probably a new release (task plugin) coming up in the near future?

Caroline 2010-11-28 23:23

I have the same problem as described by Caroline above.

Bart 2010-12-10 20:52

I have the same problem.

Tina 2010-12-22 15:27

Can't confirm it. When I create a new task with priority unequal low then the task is displayed with orange background on task overview. — lupo49Matthias Schulte

2010/12/30 18:12

Task not in overview after creation

Related to the DokuWiki release “Busy Wednesday” the following problem's was reported several times in forum and bug tracker:

a) A new task, created via the new task form will not be displayed in the tasks list until you change the status. This happens due to the lack of the appropriate meta data. To workaround the problem, you could change the code in plugins/task/action.php, function _newTask() as follows:

$TEXT = $this->_pageTemplate($data); // <-- existing code at line 107

// --- begin of hack ---
$meta = array(
    'user'   => $user,
    'date'   => $date,
    'status' => 0
p_set_metadata($ID, array('task' => $meta));
// --- end of hack ---

return 'preview'; // <-- existing code

Please, keep in mind, this is a hack only. Currently, I can not evaluate the code quality :-(.

Regarding Github issue:

Changing the naming pattern (pagename neq taskname)

The task plugin names the new pages for the tasks after their titles which can sometimes be very long. If you are using a template with a navigation bar such as Dokubook, the long titles do not look nice since they reach into the main text area. You can change the naming pattern from title to for example a date/time format by using PHP's date function. Just change line 72 in lib/plugins/task/action.php from

$ID    = ($ns ? $ns.':' : '').cleanID($title);


$date  = date("ymd-His");
$ID    = ($ns ? $ns.':' : '').$date;

This will name the pages like Year-Month-Day and Hour-Minute-Second. For more information about the possible patterns read

Boffi 2010-03-05 13:28

Instead of writing the username of the user the task shall be assigned to you can have a dropdown box containing all registered users.
Just replace the function _newTaskForm($ns) in the file ./syntax/tasks.php beginning at line 228 with the following modified version. The user currently logged in is preselected in the list.

function _newTaskForm($ns){
    global $ID, $lang, $INFO;
    $ret = '<div class="newtask_form">'.DOKU_LF.
        '<form id="task__newtask_form"  method="post" action="'.script().'" accept-charset="'.$lang['encoding'].'">'.DOKU_LF.
        DOKU_TAB.DOKU_TAB.'<legend> '.$this->getLang('newtask').': </legend>'.DOKU_LF.
        DOKU_TAB.DOKU_TAB.'<input type="hidden" name="id" value="'.$ID.'" />'.DOKU_LF.
        DOKU_TAB.DOKU_TAB.'<input type="hidden" name="do" value="newtask" />'.DOKU_LF.
        DOKU_TAB.DOKU_TAB.'<input type="hidden" name="ns" value="'.$ns.'" />'.DOKU_LF.
        DOKU_TAB.DOKU_TAB.'<input class="edit" type="text" name="title" id="task__newtask_title" size="40" tabindex="1" />'.DOKU_LF.
        '<table class="blind">'.DOKU_LF.
        DOKU_TAB.DOKU_TAB.'<th>'.$this->getLang('user').':</th><td><select name="user">'.DOKU_LF;
        //old way input field
        //<input type="text" name="user" value="'.hsc($INFO['userinfo']['name']).'" class="edit" tabindex="2" />
    global $auth;
    foreach ($auth->retrieveUsers() as $curr_user)
    	$ret .= DOKU_TAB.DOKU_TAB.DOKU_TAB.'<option' . ($curr_user['name'] == $INFO['userinfo']['name'] ? ' selected="selected"' : '') . '>' . $curr_user['name'] . '</option>'.DOKU_LF;
    $ret .= DOKU_TAB.DOKU_TAB.'</select></td>'.DOKU_LF.
    if ($this->getConf('datefield')){ // field for due date
        $ret .= DOKU_TAB.'<tr>'.DOKU_LF.
            DOKU_TAB.DOKU_TAB.'<th>'.$this->getLang('date').':</th><td><input type="text" name="date" value="'.date('Y-m-d').'" class="edit" tabindex="3" /></td>'.DOKU_LF.
    $ret .= DOKU_TAB.DOKU_TAB.'<th>'.$this->getLang('priority').':</th><td>'.DOKU_LF.
        DOKU_TAB.DOKU_TAB.DOKU_TAB.'<select name="priority" size="1" tabindex="4" class="edit">'.DOKU_LF.
        DOKU_TAB.DOKU_TAB.DOKU_TAB.DOKU_TAB.'<option value="" selected="selected">'.$this->getLang('low').'</option>'.DOKU_LF.
        DOKU_TAB.DOKU_TAB.DOKU_TAB.DOKU_TAB.'<option value="!">'.$this->getLang('medium').'</option>'.DOKU_LF.
        DOKU_TAB.DOKU_TAB.DOKU_TAB.DOKU_TAB.'<option value="!!">'.$this->getLang('high').'</option>'.DOKU_LF.
        DOKU_TAB.DOKU_TAB.DOKU_TAB.DOKU_TAB.'<option value="!!!">'.$this->getLang('critical').'</option>'.DOKU_LF.
        DOKU_TAB.DOKU_TAB.'<input class="button" type="submit" value="'.$lang['btn_create'].'" tabindex="5" />'.DOKU_LF.
    return $ret;

Cosmo 2009-04-16 15:58

I adopted the code into the current master branch of the task plugin, see feature request #32. @cosmo: thanks for the code. — LarsDW223LarsDW223

2017/02/19 12:04

If you're like me and have an organisationwiki for many purposes, your task site may not be for the visitors. So therefore you dont want any other users in the list than those who are actucally gonna use it. This mod shows only users from a specific group (possibly the only group that can see the page) to appear in that list.

Change this line…

    foreach ($auth->retrieveUsers() as $curr_user)

To these lines…

    foreach ($auth->retrieveUsers(0,0,$filter) as $curr_user)

Change admin to whatever group you like


2012/12/15 17:12

I adopted the code into the current master branch of the task plugin, see feature request #32. @fnadde42: thanks for the code. — LarsDW223LarsDW223

2017/02/19 12:06

Separate Task template for each namespace

Create a different task template for each namespace. I use it for creating unique templates for bugs, dev tasks and QA tasks.
Change this line in task/action.php:

Line 120 change:
  $tpl  = io_readFile(DOKU_PLUGIN.'task/_template.txt');
  if (@file_exists(DOKU_PLUGIN.'task/'.$data['ns'].'_template.txt')) {
    $tpl  = io_readFile(DOKU_PLUGIN.'task/'.$data['ns'].'_template.txt');
  } else {
    $tpl  = io_readFile(DOKU_PLUGIN.'task/_template.txt');

Now just create NAMESPACE_template.txt files in your task/ folder right next to your default _template.txt which would be used in case there's no template for the relevant namespace.

Saggi Malachi 2009-10-08 02:10


Delivery of .ics file doesn't work properly. The filename sent to the browser is enclosed in single quotes.
To fix this issue change these lines in Task/ics.php :

Line 33:
    header("Content-Disposition: attachment; filename='$filename'");
    header("Content-Disposition: attachment; filename=\"$filename\"");


Line 36:
    header("Content-Type: text/Calendar; name='$filename'");
    header("Content-Type: text/Calendar; name=\"$filename\"");

Cosmo 2009-04-16 15:56

“done” flag don't work. You can fix it by changing these lines in task/helper.php :

Line 118 :
      if ($filter != 'all'){
      if ($filter != 'all' and $filter != 'done'){

and line 130 :
      if (($filter == 'done') && ($responsible || ($task['status'] != 3))) continue;
      if (($filter == 'done') && ($task['status'] < 3 and $task['status'] != -1)) continue;

Jean-Michel 08/04/2008 16:05

could you please open a bug report at the Bug Tracker? — Michael Klier 2008/04/20 21:26
I couldn't reproduce this. Do you still have the problem? — Michael Klier 2008/05/05 18:04

I could reproduce this, and I opened a bug report (#31). — Andreas Schamanek 2008/05/24 01:28

Ok, I've just updated the plugin and really hope that I could finally fix all problems, please give it a go and tell me if everything is working as expected now! — Michael Klier 2008/05/25 00:43

Spent the last half hour trying to figure how to change the status of a task from accepted to done. Could someone clarify this? — abr 2008/05/25

I've added some screenshots which show the form to change tasks' statuses. Can you specify what exactly is not working? — Andreas Schamanek 2008/05/25 10:57
The form drop-down on the individual tasks appears to me as plain text. By my reading, that means it doesn't recognize my account as owning the ticket. A configurable ACL group or maybe namespace admin privilege is more than enough security on task status for me, I'll look into that. — abr 2008/05/25 20:27

It would be handy, if one could make tasks on the fly in ANY document. Making different tasks in the same document doesn't work for me. My purpose is to define certain list entries in a protocol as tasks related to users (and doing so without spoiling the formatting of the list. another syntax that is including the task-description into the task-declaration would solve the problem. — EUR 2008/06/22

It's not as easy as that. The plugin treats one page as one task and making the plugin behave like you want one would need to rewrite quite a lot of it. If you like different TODO items on one page have a look at the gtd plugin. Sorry, won't implement! — Michael Klier 2008/06/22 21:15
I would also really love to see the feature that EUR described (defining multiple tasks on one page). The rationale is very similar in that we want to be able to turn meetings from a minute into tasks and assign them to users but I can imagine other uses as well. Michael, if you aren't willing to implement this I would really like to try my hand on it. Do you think the current code could be used as a starting point or would there be more things changed than could be reused? Could you probably give me some pointers on where to start? Thanks!. — Georg Sorst 2008/07/08
Well, let me quote myself “It's not easy.”. You'd have to a) change the data structure and how the plugin handles it completely (at the moment it's one page ⇒ one task - every page, if used as task, gets it's .task meta file which contains a serialized PHP array) b) change the whole process of adding/removing/modifying tasks, and most important c) preferably stay compatible with the current used model (read “lots of extra code”). In other words, that's almost a complete rewrite of the plugin. I'd suggest you go an easier route, have a look at the plugin code, see how it handles all that stuff and then, start writing a new one, reusing parts of its code if you like/need. — Michael Klier 2008/07/08 10:33

How difficult would it be to introduce additional task-attributes, like severity, project name, customer name… and finally make filters available on those attributes as well ?. — Hakan Coker 2008/06/30

Hmmm, not all that difficult I think. Submit a detailed feature request at the bug tracker. — Michael Klier 2008/06/30 14:24

It is possible to link this Plugin to a BugTrackingSoftware , for example Mantis ? I think would be a nice idea. — white 2008/08/10

While creating an entry for users to reference on our syntax reference page, I found that tasks will not let you create a due date past 2038. We will probably not be using the wiki in 30 years, but I thought you should know. I haven't looked at your code yet, so I don't know if the bug is in your code or something in DokuWiki. — bfifield 2008/08/20

Well, this is not a really a bug with the plugin. In fact, 2038 is by many computer scientists considered as being the official end of the world, or maybe even the whole universe itself. Kidding aside, for further reference see year 2038 problem. — Michael Klier 2008/08/20 18:22
Just a question: How are the tasks sorted? Sometimes they need to be in an order, like “Make sign in page” comes before “Make log out page”, though they may have the same priority and be assigned to the same user and be in the same status, the first one needs to be done before the second. If they're sorted alphabetically, the wrong one will show up first in the list. — Sean McCleary 2008-10-19

Yes, sorting is real Bad at the Moment, I think it should be done by End Date, or it should give a flag for that! — muetze 2009-02-20

I was a little upset that the tasks aren't sorted by due date, so implemented a bad hack to do it. Define a function cmpDates($a,$b){return strnatcmp( $a['date'], $b['date'] );} right above the class definition in tasks.php, then down about line 85, insert usort( $pages, 'cmpDates' );, right above the if(!$pages) block. — Leaf 2010-03-12

Also: Would be real nice if, when viewing a task, there was a way to change who it was assigned to and what the priority is in the normal interface, without having to edit the wiki. Kind of like how there's a drop-down to change the status. Sean McCleary 2008-10-19

How do I delete tasks? I can't seem to get rid of tasks once they have been put in Kyle Conroy 2008-10-19

Close them? — Michael Klier 2008/10/20 12:11
Via what command?

Kyle Conroy 2008-10-19

See the first screenshot on this page. It's “done”. — Michael Klier 2008/10/22 11:29

— Hello. It seems I have a bigger problem with the display. No view or flag screen is working.
I have this on the page :


but I see only the open ones and the creation form. If I try to change it to any views, form/noform, it remains the same. Before I try to look into the code, is there anything to do in install/config to use the filters ?? Right now I really need to display done task and I can't. Thanks — AB 2009-11-30

> Remove the square brackets - this is standard documentation style to highlight options - but you don't have to actually use them in the syntax. — chi 2009/11/30 22:22

d…mn. too used to put brackets everywhere in the languages I know, I just copy-pasted it quickly and didn't even notice. Thanks a lot. — AB 2009-11-30

I'm using both task and gcalendar and it would really be useful to have something like a “Add to calendar” checkbox into the New task form (if the gcalendar plugin is detected). This is just an idea… any task/calendar integration would be nice. Cosmin L. Neagu 2009-01-08

It would also be nice to have recurring tasks… tasks that once “done” will automatically reopen in 1 month or 1 week. Cosmin L. Neagu 2009-01-08

Had to make a change to the “tag support” due minor bugs: Moved this line to the top since the order of the explodes was making the $refine go as a $flags so the function refine is never executed:

        list($match, $refine) = explode(' ', $match, 2);


        list($match, $refine) = explode(' ', $match, 2);
        list($match, $flags) = explode('&', $match, 2);
        $flags = explode('&', $flags);
        list($ns, $filter) = explode('?', $match, 2);
        if (($ns == '*') || ($ns == ':')) $ns = '';
        elseif ($ns == '.') $ns = getNS($ID);
        else $ns = cleanID($ns);

After the funtion Refine is executed had to fix (to use the sintax +tag:XXX and -tag:XXX instead of +XXX -XXX)(no needed to make it work):

$cleaned_tag = substr($tag, 1);


$cleaned_tag = substr($tag, 5);

Since it was comparing “tag:XXX” to “XXX” Then the support works excelent! Hope it helps Nicolas 2010-09-24

Feature Wishes

Name-choosing (Ajax)

  • A simple oder more complex name-choosing at the createtask-form would be great.
  • assigning a task to multi-users would be great too (Awen)

More Filters/ Views

It would be great to have more views (or call it filters if you like):

  • views according to priority, like ?critical, ?high, ?medium, ?low
  • only creating new task-form, either view: ?none, or an additional flag &formonly

Thanks! Arnd

only creating new task-form, either view: ?none, or an additional flag &formonly

⇒ Done, see

2017-02-18 20:05

Combination of Filters/ Views

It would be great to have the possibility to combine two filters:

  • e.g., combine ?overdue+open (means ?overdue AND ?open)
  • or, view of tasks with high priority AND due, like ?high+due

Many Thanks! Arnd

Task progress in %

It would be great to have the possibility to change task progress:

  • put % of progress near the due date:
Task 01   2008/06/11 00:00   70%   Michael Klier  	new

Loads of Thanks! TiFFolk

Change Resposibility

It would be great to have the possibility to change task resposibilty to another user: (by Marc 2010-03-26)

  • if you assign a task to user A and user A thinks “This is not for me” he can give the task to an other user. Instat of rejecting. (by Marc 2010-03-26)

Task History

It would be great to have an Task history: (by Marc 2010-03-26)

Changed Status **NEW** to **IN WORK** at Date/Time
Changed Assignment form **A** to **B** at Date/Time

For this adding somthing like this on the task page to display the history: (by Marc 2010-03-26)



It would be also great to see the priority in the pagelist and in tasks detail-view =) awesome plugin. thanks a lot.

winky 2010-07-30

Email reminder

It would be great to send an email to the user when due-date is reached and task is not closed.
deka 2010-12-19

Sort by date

Make it possible to sort tasks by date. — fnadde42fnadde42

2012/12/16 10:00

Change variables in task (and add own)

Be able to change “Assigned to” and “Due date” and make it possible to add own fields. — fnadde42fnadde42

2012/12/16 10:00

Some Suggestion

If the task plugin can't show task items, then do the following.

  • Install the following plugins: tag, pagelist, feed
plugin/task/hacks_discussions.txt · Last modified: 2017-02-19 12:06 by LarsDW223