Bug Report : ignore_timeline extends task when dragging

I have found a very annoying bug in the scheduler system that is also on the samples page of the website.

docs.dhtmlx.com/scheduler/sample … hours.html

If you get an event that is say, 5 hours, and move it, so it overlapps to the next/previous week/day and then go to the next week in the view, it looks fine, if you move the event even by one hour, the even suddenly gets bigger by several hours / days. You can keep moving it while it is spanning multiple days.

This is down to the ignore_timeline property. Without this set, our script works fine, however, we need to hide weekends and only show 12pm to 5pm, when we add the relevant script, it all breaks when you start dragging over to multiple weeks/days. Just as a note, this is replicated in your sample on your website, just get a task, drag it so it spans over the weekend, and then keep shifting it by an hour at a time, and watch it expand more and more each time.

Just to update this topic, I’ve found a couple of other posts with the same issue, so this isn’t an issue on my end.

Any suggestions?

Hi,
thanks for the problem report!
It’s a known issue, the fix will be included in the next version of the scheduler.
You can try our latest development version of the extension.
dhtmlxscheduler_timeline.js_20140507.zip (11.2 KB)

Nope. Did a diff, there was only a handful of changes. Didn’t make any difference. When will the next version of the scheduler?

Woops, pressed submit too early.

  • When will the next version of the scheduler be released? Such an irritating bug!

We expect to have Scheduler 4.1 released till the end of May

Right, okay. Thanks for your help. I think we will have to look at other options for scheduling. Thanks anyway.

I can confirm, after testing 4.1, that this bug is still present. Anyone else getting the same results?

Still happening on the sample too, which looks like it is using 4.1

docs.dhtmlx.com/scheduler/sample … hours.html

Move one of the events to overlap to next week. Drop it. Then start dragging it again - the event goes really long.

Bump?

In MAY, this was a known issue. Is this going to be fixed, or can someone at least give me a response?

Hi,
sorry for a late answer, this issue is still present, that’s right. We are working on it. We had much to do for the scheduler 4.1, but some issues escaped. We hope it will be fixed with 4.1.1 release. When the fix will be available we will post it here. Thank you for the patience.

Please include this file on the page after
“dhtmlxscheduler.js”
“dhtmlxscheduler_timeline.js”
It should fix the issue.
dhtmlxscheduler_event_length_fix.js.zip (1.15 KB)

Thanks for the fix. This resolves the issue, kind of, but you might want to check this bug if you are showing more than one day. For example, I am showing 5 days, from 12pm to 5pm each say. If you put an event on the overlap between days, sometimes the start date is 12pm, sometimes it flicks to 5pm (the previous day). Then, sometimes, when dragged, it adds an hour to the length.

Could you please attach the configuration of the timeline?

//===============
//Configuration
//===============
var sections = <?php echo $json; ?>;
scheduler.locale.labels.timeline_tab = “Timeline”;
scheduler.config.multi_day = true;
scheduler.config.start_on_monday = true;
scheduler.config.preserve_length = true;
scheduler.config.limit_time_select = true;

        scheduler.attachEvent("onBeforeEventChanged", function(ev, e, is_new){
            //any custom logic here
            
            console.log(ev);
            
            return true;
        });

        scheduler.config.time_step = 30;

        scheduler.createTimelineView({
            name: "timeline",
            x_unit: "hour",
            x_date: "%H:%i",
            x_step: 1,
            x_size: 24*7,
            x_start: 0,
            x_length: 24*7,
            y_unit: sections,
            y_property: "staff",
            render: "tree",
            second_scale: {
                x_unit: "day", // unit which should be used for second scale
                x_date: "%F %d %D" // date format which should be used for second scale, "July 01"
            }
            
        });

        scheduler.ignore_timeline = function(date) {
            //non-working hours
            if (date.getHours() < 12 || date.getHours() > 17 || date.getDay() === 6 || date.getDay() === 0)
               return true;
        };

        scheduler.templates.tooltip_text = function(start, end, ev) {
            return "<b>Event:</b> " + ev.text + "<br/><b>Start date:</b> " +
                    scheduler.templates.tooltip_date_format(start) +
                    "<br/><b>End date:</b> " + scheduler.templates.tooltip_date_format(end);
        };

        scheduler.init('scheduler_here', new Date(), "timeline");

The start time flickering is kind of feature - if you start drag operation in last time cell of previous day - start date will be set to this time. If drag started in the first cell of new day - event will start from this date. We will improve this behavior in the next build.

I agree that this is a feature not a bug. However, I assume that the event length shouldn’t change.