View Full Version : automatic begin date for a new dependent task
01-06-04, 08:39 AM
Hello I'm trying to to make easier the way you register tasks. When a project have a lot of tasks it is easy to get confused with the dates.
I've looked to the code when yo create a new task, You have a combo-box that is this:
<select name="task_parent" class="text">
<option value="" selected="selected">None</option>
<option value="137">Tara 1</option>
And you have two elements that have the start task date
<input type="hidden" name="task_start_date" value="" />
<input type="text" name="start_date" value="" class="text" disabled="disabled" />
1) create some hiddens of the ending date of the tasks listed in the combobox.
2) put an onchange event that when you chosse one parent task you automaticly put the value of the date of the new task, and let the posibility for the user to change it with the calendar.
żIn which file do I have to make the changes?
02-06-04, 05:40 AM
The update/add task code is in...
this line near the top picks up the existing start date...
$start_date = intval( $obj->task_start_date ) ? new CDate( $obj->task_start_date ) : null;
But the project is read a few lines further down so things need moving around a bit.
There might be a patch for picking up task start date up from the project. It seems familiar.
well have fun.
ps. are you Spanish ? How do you get the inverted question mark from the keyboard ???
11-06-04, 01:10 AM
But Know I want that the aplication don´t take holidays, żIs there a table or a place where I can tell de aplications which days are
11-06-04, 09:23 AM
Not at the moment, although it would be relatively easy to implement. One concern is that holiday tables get out of date very quickly and there is no established "global" holiday regime. E.g. Queen's Birthday holiday in Australia occurs on different days in different states. Australia doesn't celebrate Lincoln's Birthday (why anyone would celebrate the birthday of an automobile I don't know ;), and only Australia and New Zealand celebrate ANZAC day. So the table would have to be maintained by the site admin. We probably couldn't even put in some "standard" dates like Christmas, without also putting in Ramadan and Yom Kippur (sorry if my spelling is wrong).
As long as the site admin was OK with this, and maintained it every year as dates do change, then it should be fine. I don't see a problem in providing the feature. The only comment I would make is that admins tend to set these things up once, then turn off the feature as they find the dates drift during successive years, and they can't be bothered maintaining them.
11-06-04, 03:14 PM
surely an automatic process can be done ... a google for free information on holidays and a good parser should do it no?
11-06-04, 03:34 PM
Don't know. If it is possible I'm sure a member of the community will figure it out.
19-06-04, 01:13 AM
:idea: Hey guys - I too would really like to have dotProject automatically calculate the start date of a dependent project...
What about posting your code with some instructions or creating a patch?
I'm sure I'm not the only one who would find this a great feature!
vBulletin® v3.6.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.