task plugin by Gina Häußge, Michael Klier
Integrates a simple task management tool into your wiki. (previous authors: Esther Brunner)
Last updated on 2009-04-27. Provides Syntax, Helper, Action.
Compatible with DokuWiki 2009-04-14, 2008-05-05.
Requires feed, pagelist.
Similar to gtd.
| Download | plugin-task.tgz |
|---|
~~TASK:[user]?[due date][priority]~~
| [user] | person responsible for this task – either user or full name | optional; default is unassigned |
|---|---|---|
| [due date] | date the task should be completed in YYYY-MM-DD form; if only year or year and month are given, the last day is assumed | optional; default is without due date |
| [priority] | low, medium !, high !! or critical !!! expressed with 0 to 3 exclamation marks | optional; default is low priority |
Place ~~TASK~~ on any page to mark it as a task. The title (first heading) is considered to be the summary of the task, the contents its description.
If a task is unassigned, any registered user of the wiki can accept it. Once a task is taken, the user to whom it is assigned to can change the status of the task to one of these values:
If the task is done, other users can verify whether it's really done. If yes, the status can be set to verified.
The priority is reflected by the intensity of the orange shade of the task box.
Next to the title of the task box is an icon. It links to download an .ics file for the task. That can be imported by almost any calendar application that understands the VTODO component of the iCalendar standard.
{{tasks>[namespace]?[view]&[flags]}}
| [namespace] | the namespace to look for tasks | required |
|---|---|---|
| [view] | one of the views, see here | optional; default is open |
| [flags] | pagelist flags delimited by &, see flags | optional |
Views
all | all tasks |
|---|---|
open | all task that are new, not yet done (or rejected) if assigned to me or not yet verified if assigned to someone else |
my | only my open tasks |
new | new tasks not yet assigned to anybody |
done | completed but not yet verified tasks |
due | all open tasks with a due date of today |
overdue | all open tasks with a due date in the past |
Flags
noform | Don't show the new task form |
|---|
Try this plugin at here
Please report bugs or feature requests at the Bug tracker.
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.'<fieldset>'.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.'<tr>'.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.
DOKU_TAB.'</tr>'.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.
DOKU_TAB.'</tr>'.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.DOKU_TAB.'</select>'.DOKU_LF.
DOKU_TAB.DOKU_TAB.'</td>'.DOKU_LF.
DOKU_TAB.'</tr>'.DOKU_LF.
'</table>'.DOKU_LF.
DOKU_TAB.DOKU_TAB.'<input class="button" type="submit" value="'.$lang['btn_create'].'" tabindex="5" />'.DOKU_LF.
DOKU_TAB.'</fieldset>'.DOKU_LF.
'</form>'.DOKU_LF.
'</div>'.DOKU_LF;
return $ret;
}
— Cosmo 2009-04-16 15:58
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');
to:
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'");
to
header("Content-Disposition: attachment; filename=\"$filename\"");
and
Line 36:
header("Content-Type: text/Calendar; name='$filename'");
to
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'){
to
if ($filter != 'all' and $filter != 'done'){
and line 130 :
if (($filter == 'done') && ($responsible || ($task['status'] != 3))) continue;
to
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:04I 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.taskmeta 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
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 :
{{tasks>[projet_annuaire]?[all]&[flags]}}
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 usefull 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
It would be great to have more views (or call it filters if you like):
Thanks! Arnd
It would be great to have the possibility to combine two filters:
Many Thanks! Arnd
It would be great to have the possibility to change task progress:
Task 01 2008/06/11 00:00 70% Michael Klier new
Loads of Thanks! TiFFolk