Skip to content

Drupal Private Task List

  1. Install the Drupal Tasks module.

  2. Edit tasks.module

Search for the test ‘Get the list of tasks to display’ The next line will be this SQL statement:

$result = dbquery("SELECT n.nid, u.name AS assignedname, u.data FROM {node } n INNER JOIN {tasks} t ON t.nid = n.nid LEFT JOIN {users} u ON u.uid = t.assig nedto WHERE n.status = 1 AND n.type='tasks' AND t.taskparent = %d %s ORDER BY %s", $node->nid, $complete, $orderby); Remove n.status = 1 AND That is, replace is with: $result = dbquery("SELECT n.nid, u.name AS assignedname, u.data FROM {node } n INNER JOIN {tasks} t ON t.nid = n.nid LEFT JOIN {users} u ON u.uid = t.assig nedto WHERE n.type='tasks' AND t.taskparent = %d %s ORDER BY %s", $node->nid, $complete, $orderby);

This causes the list of tasks to display all tasks, including ones that are ‘unpublished’.

  1. Enable the Tasks Module through the ‘Administer’ web interface.

  2. In ‘Administer’ – ‘content types’, Edit that ‘Task’ content type. Under ‘Publishing Options’, un-check ‘Published’.

  3. Now you have a private task list hidden from the outside world.