Author Topic: Ability to add start/due dates when creating a subtask  (Read 7099 times)

fernandog

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Ability to add start/due dates when creating a subtask
« on: December 15, 2009, 01:20:41 pm »
As it is now, when I open a task (the view where you see the task description, linked objects, etc), when I click on "add task", i can enter a task  name and asignee, but no start/due date. I have to create the task, then hit edit and it takes me to another screen.

It would be GREAT if those options were there, or at least a link to "more options" to allow for options such as start/due date, workspace, etc...like it is when creating a subtask directly in the tasklist view.

It would make for an easier workflow when creating subtasks that require start/due date, as well for consistency across the app. Ideally, a checkbox to inherit the parent's properties would be the best, but that would require more dev work and I already suggested it on another post  ;)



a2opinion

  • Full Member
  • ***
  • Posts: 177
  • Christian
    • View Profile
    • A Second Opinion
Re: Ability to add start/due dates when creating a subtask
« Reply #1 on: December 16, 2009, 06:33:32 pm »
After you have clicked on the plus to add a new task (or subtask) when looking at your list of tasks, in the bottom left of the new task form is "More Options..."

Clicking on that will give you the options you seek.  It then has a link in the bottom left that says "All Options..." which takes you over to the full add task page

Murz

  • Full Member
  • ***
  • Posts: 147
    • View Profile
Re: Ability to add start/due dates when creating a subtask
« Reply #2 on: December 16, 2009, 07:10:13 pm »
When I add subtask from a task page via click "Add sub task" link, I have no "More Options..." link, only "Name" and "Assign to:"

a2opinion

  • Full Member
  • ***
  • Posts: 177
  • Christian
    • View Profile
    • A Second Opinion
Re: Ability to add start/due dates when creating a subtask
« Reply #3 on: December 18, 2009, 12:32:06 pm »
I understand what you're saying now.. when you click on the task and you're looking at the single task view (purple background) and you click on 'Add Subtask' on the left, then you get no options. Are you opening the individual task from an email or something and want to add a subtask from there?

I thought you meant from the task/Milestone overview:

fernandog

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Ability to add start/due dates when creating a subtask
« Reply #4 on: January 08, 2010, 02:54:26 pm »
Yes, the single task view does not give you "more options". I am opening the task from the email notifications.

After much trial and error, I managed to put the fields for start/due dates in that screen

In application/views/task/task_list.php, I just added the following piece of code to line 102

    <div style="padding-top:4px">   
       <?php /*echo label_tag(lang('dates'))*/ ?>
       <table><tbody><tr><td style="padding-right: 10px">
       <?php echo label_tag(lang('start date')) ?>            
       </td><td>
      <?php echo pick_date_widget2('task_start_date', array_var($task_data, 'start_date'),$genid, 60) ?>
      </td></tr><tr><td style="padding-right: 10px">
      <?php echo label_tag(lang('due date')) ?>
       </td><td>
      <?php echo pick_date_widget2('task_due_date', array_var($task_data, 'due_date'),$genid, 70) ?>
      </td></tr></tbody></table>
      </div>

Now when i hit "add subtask" the options for start/due dates are right there.

Murz

  • Full Member
  • ***
  • Posts: 147
    • View Profile
Re: Ability to add start/due dates when creating a subtask
« Reply #5 on: January 12, 2010, 06:23:33 am »
Thank's for the example, it works for me successfully!
But I add some improvements to your code:
- Convert title field from textarea to input
- Add description field.

Patch is attached to post. You can apply it by saving to fengoffice root and type "patch -p0 < ./add_subtask_1.patch" in console.

fernandog

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Ability to add start/due dates when creating a subtask
« Reply #6 on: January 15, 2010, 11:50:50 am »
Great. Now have you got any idea how could we have these fields populate by default with the parent task's start/due dates? (that is, user still able to change them if they wish but by default they should be the same..)

fernandog

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Ability to add start/due dates when creating a subtask
« Reply #7 on: June 15, 2010, 05:13:37 pm »
Got this figured out as well...
In case anyone would like the start/due dates for subtasks pre-populated to be the same as the parent task (though they can be changed)
 <div style="padding-top:4px">   
       <?php /*echo label_tag(lang('dates'))*/ ?>
       <table><tbody><tr><td style="padding-right: 10px">
       <?php echo label_tag(lang('start date')) ?>           
       </td><td>
      <?php echo pick_date_widget2('task_start_date', $task_list->getStartDate(), array_var($task_data, 'start_date'),$genid, 60) ?>
      </td></tr><tr><td style="padding-right: 10px">
      <?php echo label_tag(lang('due date')) ?>
       </td><td>
      <?php echo pick_date_widget2('task_due_date', $task_list->getDueDate(), array_var($task_data, 'due_date'),$genid, 70) ?>
     </td></tr></tbody></table>
      </div>

cabeza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1004
    • View Profile
    • Feng Office
Re: Ability to add start/due dates when creating a subtask
« Reply #8 on: June 22, 2010, 09:48:14 am »
Thanks fernandog!