Permalink
Browse files

only allow active tasks as a parent

Changed the task parent box to only display active/inactive tasks based
on the current view state. Eg. If you’re only viewing Active tasks, you
won’t see Inactive in the list.

Resolves: https://bugs.web2project.net/view.php?id=1744
  • Loading branch information...
caseysoftware committed Nov 24, 2017
1 parent 367f1ab commit b01d60b750d3a2bc65b9e4dd7ec89555b0fd0466
Showing with 4 additions and 2 deletions.
  1. +4 −2 modules/projectdesigner/vw_actions.php
@@ -5,7 +5,7 @@
// @todo convert to template
// @todo remove database query
global $task_access, $task_priority, $project_id;
global $task_access, $task_priority, $project_id, $statuscode;
$type = w2Pgetsysval('TaskType');
$stype = array('' => '('.$AppUI->_('Type').')') + $type;
@@ -52,9 +52,11 @@
}
$task_parent_options = '';
$root_tasks = $obj->getRootTasks((int) $task_project);
foreach ($root_tasks as $root_task) {
if ($statuscode != 9999 && $root_task['task_status'] != $statuscode) {
continue;
}
build_date_list($projTasksWithEndDates, $root_task);
if ($root_task['task_id'] != $task_id) {
$task_parent_options .= buildTaskTree($root_task, 0, array(), $all_tasks, $parents, 0, $task_id);

0 comments on commit b01d60b

Please sign in to comment.