Any idea to check event collision on server side?

Hi Team,

I used Connector_Java mode could detect event collision on client side now, but if there were multi-users to use the scheduler at the same, I couldn’t detect the event collision in real time, so was there a idea to check the collision on server side?

This was my big problem in my currently work. I’ll appreciate if I can get some comments from you.

Best wishes,

Jundong

In case of non-recurring events - it can be solved by single sql query, which can be attached to some of server side events.

In case of recurring events situation is more complex - there is a helper class for php , which can calculate collisions, but so far there is no sample for java.

Hi Stanislav

Thanks for your reply.

How can I use the sql to do this with non-reccuring mode?

Is there any example or the main steps to implement this function?

I’m online and waiting for your comments.

Best wishes,

Judo

If next query will return any records - it means that there are some events for the same time

SELECT * FROM {table}
WHERE start_date<={end_date}
AND end_date>={start_date}

You can use beforeProcessing event

docs.dhtmlx.com/doku.php?id=dhtm … processing
docs.dhtmlx.com/doku.php?id=dhtm … foreupdate

and call
data.error();
from it to prevent DB operation

Hi Stanislav

According to your reply, I did some work, but how could I deal with the time-zone problem?

It seem also a complex work.

Do you have any idea on this?

Thanks,

Best wishes,

Judo

You can use server_utc property:
docs.dhtmlx.com/doku.php?id=dhtm … fig#others