Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Rose on Jan 09, 2010 09:34
open dhtmlx forum
Scheduler - Units View - deleting occurence of recurring event

Hi there,
I am experiencing a problem when deleting a particular occurrence of a recurring event.
A new record of type 'none' is inserted into the database, with everything correct, except for the column I use to identify the units. It always uses the same identifier, instead of the correct identifier for the one I am deleting.

For example the [[23]] in row below is incorrect.

insert into `events_rec`(`event_id`,`start_date`,`end_date`,`text`,`rec_type`,`event_pid`,`event_length`,`resource_id`,`order_item_id`,`status`,`booked_by`) values (196,'2010-01-13 13:00:00','2010-01-13 14:00:00','','none',90,1263387600,[[23]],0,null,null);


I had a look and saw that these values are posted and already at that stage the unit identifier is incorrect.
Am not sure where the $_POST values are being set and how I can control it.

I hope you can assist me.

thank you,
Rose
Answer posted by Stanislav (support) on Jan 12, 2010 04:06
The scheduler takes the value of master sequence on moment of deletion. So if you have some key for the recurring event, deleted element will use the same key. If key of recurring event will be changed in future, deleted event will NOT be updated with new value, but it must not cause any problems. The key values for event are event_pid and event_length, exact value of key for deleted record is not important. You can just ignore key value in such scenario. 
Answer posted by Rose on Jan 12, 2010 05:53

Hi Stanislav,

Then it sounds as though something is going wrong on my end. I am not changing the unit_Id key afterwards, it is already wrong at initial insertion into the database.

I am integrating your scheduler into a PHP application and also checking events through PHP code and going direct to the database. even though not having the unit key set correctly does not afffect the scheduler functionality on the front end it will make my queries much more inefficient on the backend without using that id...

What is the master sequence you are referring to? Are there any common ways I could've misconfigured the scheduler for it to be passing the wrong value?

thank you for your kind support!

regards,

Rose

 

 

 

Answer posted by Stanislav (support) on Jan 12, 2010 06:00
I will check the logic of recurring events, maybe it really has some problems with extra fields.

>>it will make my queries much more inefficient on the backend without using that id
You can join the same table by event_pid = event_id to get the recurring event from which instance was deleted and get the actual value of unit key

Answer posted by Rose on Jan 19, 2010 11:22

Hi Stanislav,

 did you get a chance to check the logic yet? Do you have some feedback for me?

thank you,

Rose

Answer posted by Stanislav (support) on Jan 20, 2010 09:00
Update existing ext/dhtmlxscheduler_recurring.js with http://support.dhtmlx.com/x-files/scheduler_2_1/dhtmlxscheduler_recurring_100120.zip - it must resolve the problem. 
Answer posted by Rose on Jan 22, 2010 05:11

Hi Stanislav,

thank you so much for the fix! I've tried it and it works. Much appreciated!

regards,

Rose