Author Topic: Subtask should inherit parent's task properties  (Read 3104 times)

fernandog

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Subtask should inherit parent's task properties
« on: March 03, 2010, 04:30:50 pm »
I think I have mention this before in other posts but never created a separate topic.

I use tasks/subtasks alot and one of my major pain points with this is that when something changes in the parent task (ie, start/due dates), there is no way for the subtasks to inherit this.

We have option to "apply Workspace to subtask" and "apply milestone to subtask".

>> Could we add "apply start/due dates to subtask"?

I'd also like things like "description" and "linked objects" to be inhertied if possible. However start/due dates are the most important in my opinion.
I have tried for months hacking this in with little success :(

If anyone can do it or point me in the right direction that would be AWESOME!

Thanks!!

WiZaxx

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Subtask should inherit parent's task properties
« Reply #1 on: March 04, 2010, 12:37:35 am »
+1 here

fernandog

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Subtask should inherit parent's task properties
« Reply #2 on: March 05, 2010, 12:49:25 pm »
In case anyone with a better grasp of PHP than me is interested on pursuing this...this is as far as i've gotten, but it's not working and I dont know what im missing....

- taskController.class.php
line 258 and 1057 :

Code: [Select]
// apply values to subtasks
$subtasks = $task->getAllSubTasks();
$project = $task->getProject();
$milestone_id = $task->getMilestoneId();
$due_date = $task->getDueDate();
$apply_ws = array_var($task_data, 'apply_ws_subtasks', '') == "checked";
$apply_ms = array_var($task_data, 'apply_milestone_subtasks', '') == "checked";
$apply_dd = array_var($task_data, 'apply_duedate_subtasks', '') == "checked";
foreach ($subtasks as $sub) {
if (!$sub->getAssignedTo() instanceof ApplicationDataObject) {
$sub->setAssignedToCompanyId($company_id);
$sub->setAssignedToUserId($user_id);
}
if ($apply_ws) {
$sub->setProject($project);
}
if ($apply_ms) {
$sub->setMilestoneId($milestone_id);
$sub->save();
}
if ($apply_dd) {
$sub->setDueDate($due_date);
$sub->save();
}
}


- on add_task.php
line 200
Code: [Select]
<?php echo checkbox_field('task[apply_duedate_subtasks]'array_var($task_data'apply_duedate_subtasks'false), array("id" => "$genid-checkapplyws")) ?><label class="checkbox" for="<?php echo "$genid-checkapplydd" ?>"><?php echo lang('apply duedate to subtasks'?></label></div>

- On addTask.js

 line 167:

Code: [Select]
html += "<div id='ogTasksPanelATDuedate' style='padding-top:5px;" + (data.isEdit? '': 'display:none') + "'><table><tr><td><div id='ogTasksPanelDdSelector'></div></td>";
if (data.isEdit) html += "<td style=\"padding-left:15px\"><label for=\"ogTasksPanelApplyDD\"><input style=\"width:14px;\" type=\"checkbox\" name=\"task[apply_duedate_subtasks]\" id=\"ogTasksPanelApplyDD\" />&nbsp;" + lang('apply duedate to subtasks') + "</label></td>";
html += "</tr></table></div>";

line 367:

Code: [Select]
var applyDD = document.getElementById('ogTasksPanelApplyDD');
parameters["apply_duedate_subtasks"] = applyDD && applyDD.checked ? "checked" : "";



and also added 'apply duedate to subtasks' to languag folder.

ps: pardon my programming butchering  :-\

fernandog

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Subtask should inherit parent's task properties
« Reply #3 on: March 25, 2010, 05:50:32 pm »
Hello great people of OpenGoo ;)

I'm just wondering if there are any plans of this being implemented, or at least posted for sponsorship?

I've continued to try without success :(

unfortunatly because the dates in my team's roadmap change so often it looks like we'll have to stop using opengoo as it is too much of a painpoint having to change everyone's taks/subtasks dates constantly.

If there is *any* chance of this being considered for a future version, perhaps we could hang in there?

Thanks again for all your work!

cabeza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1004
    • View Profile
    • Feng Office
Re: Subtask should inherit parent's task properties
« Reply #4 on: March 29, 2010, 05:46:36 pm »
I am sending you an email on this issue today.

Best