Is there a possibility to create a summary task?
Please clarify how do you see the expected result, or attach some kind of mockup
I added show screenshots about a summary task. Maybe this helps to clearify our requirement.
What we want is some kind of hierarchy, to sort, group or filter.
Thanks in advance!
in terms of dhtmlxGantt, such kind of task are called “project”, check this article (images are broken, we’ll fix them in a nearest time)
docs.dhtmlx.com/gantt/desktop__t … ojecttasks
And the example (green tasks are ‘project’ or ‘summary tasks’)
docs.dhtmlx.com/gantt/samples/01 … tones.html
I have a question on Summary task’s start date and end date. When we add new tasks and if task type is “summary task” or “project” then we don’t have to pick start date and end date because it will be calculated based on child task’s start date and end date. However when we don’t have start date and end date it pick whatever is earliest start date in entire workplan. Is that any way we can set that to today’s date if that summary task doesn’t have any child?
When you create a new task, it receives the starting date of the first task in the chart or the starting date of the parent task it belongs. Projects ignore starting_date, ending_date and duration parameters so childless projects are always bound to the starting date of the first task or parent they belong. Each time you create, modify or delete a task all project dates are updated. So even if you are able to change projects dates somehow (although it might affect performance) their starting dates will update again.
Could you clarify why do you need that?
If you want to create just a task you can avoid that issue by adding this code:
var today = new Date();
task.start_date = today;
If you need a project that will later contain children, you can create a task, then add its children by clicking on the “+” button near it. If you delete tasks so the project or parent becomes childless you can convert it to the task.
Here is an example:
docs.dhtmlx.com/gantt/samples/0 … _type.html
Thank you for your quick response. The reason we need to put today’s start date and end date for project/summary task is to avoid any confusion to the end user. We do have little different input form, where we let user select the type of the task and if they select summary or project task, we don’t let them select start and end date, even if we let them select when gantt renders it doesn’t count entered start and end date rather calculate start and end date based on either child or first task.
What we were looking is, even user select summary task, doesn’t enters any dates and if it doesn’t have child, we want to show today’s date instead first task’s start date.
Thank you for the clarification.
As I said in the previous message, summary tasks ignore starting_date, ending_date and duration parameters so even if you specify those parameters they will be ignored. There is no easy way to make projects work differently.
But as a workaround we let the user choose the project type when the task is created. But the task won’t actually be a project. It will be a regular task that will look like a project. When the user adds child task into it, the task will become the project. The regular tasks will always have today as the starting date. Thus we avoid the confusion and implement the functionality you want.
Here is an example: