Skip to content

Commit

Permalink
only allow active tasks as a parent
Browse files Browse the repository at this point in the history
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 b01d60b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/projectdesigner/vw_actions.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b01d60b

Please sign in to comment.