Page 1 of 1

it is possible to add Split a task by assigning a start and end date

Posted: Fri Mar 01, 2019 1:31 am
by Jean
Hi,

Please can you tell me how I can add tasks.
In this case :
1.- I selected a task
2.- I show my form
3 .- I add 3 objects with the following formats:
{
     "Id"        : 1,
     "StartDate" : "2017-01-17",
     "EndDate" : "2017-01-19" 
     "Duration"  : 2
},
{
     "Id"        : 2,
     "StartDate" : "2017-01-20",
     "EndDate" : "2017-01-22" 
     "Duration"  : 2
}
4.- When I click on the SAVE button, the list of segments applies to the TASK.

Is there an event or method?



Different from this method :
    splitTask: function() {
        var a = this,
            e = a.grid.getSchedulingView(),
            d = e.getDateFromX(a.triggerEventXY[0]),
            c = e.timeAxis;
        var b = {
            task: a.rec,
            pos: a.triggerEventXY,
            date: d,
            timeAxis: c,
            tick: c.getAt(Math.floor(c.getTickFromDate(d)))
        };
        b.task.split(a.getSplitDate(b), a.getSplitDuration(b), a.getSplitDurationUnit(b))
    }
Or

Can you tell me how to configure the method to add many segments?


attached image.

thanks.

Re: it is possible to add Split a task by assigning a start and end date

Posted: Fri Mar 01, 2019 7:30 pm
by mats
You can probably implement this yourself, by using our Splittable API. https://www.bryntum.com/docs/gantt-for- ... Splittable

Note the 'split' API method: https://www.bryntum.com/docs/gantt-for- ... thod-split