Recurring event edition

Hi,

I’m having trouble using recurring events.

I’ve seen in documention :

If I understand, when editing a recurring event I lost every ‘single’ modification ? Is there a way to avoid this ?

What I wan’t to do is :
-create a recurring event
-update a single event in the series
-update the recurring event, and keep all the single change

Thanks for your help !

If you are updating time of recurring type of recurring event - all event occurrences need to be recalculated ( because they may occur in different time ) and it is too complicated to decide, which old occurrences related to new occurrences.

Hi Stanislav,
Thanks for the answer !

I have an other problem, still with recurring events.

I add these two events :

[code] var event = {
start_date : new Date(2011, 07, 25, 15, 00, 00),
end_date : new Date(9999,01,01),
id : 1,
event_length : 9000,
rec_pattern : “day_1___”,
rec_type : “day_1___”,
};

	var subEvent = {
		start_date : new Date(2011,07,26, 10,00,00),
		end_date : new Date(2011,07,26, 13,00,00),
		event_pid : 1,
		id : 2,
		rec_pattern : "",
		rec_type : ""
	};
	
	scheduler.addEvent(event);
	scheduler.addEvent(subEvent); [/code]

What I want, is having a event with a daily repetition from 15 to 17.30 with an exception for the 2011-08-26.

When adding these events, 2 events appeared for 2011-08-26, one at 15 and the other one at 10

I guess that something is missing in one of my events, but I don’t know what …

Could you help me ? :slight_smile:

Maybe the problem come from subEvent.event_length ?
I try to add a time in subEvent.event_length, but it doesn’t solve the problem.

Hello, Khatzu.

Indeed you need event_length property:

[code] var event = {
start_date : new Date(2011, 07, 25, 15, 00, 00),
end_date : new Date(9999, 01, 01),
id : 1,
event_length : 9000,
rec_pattern : “day_1___”,
rec_type : “day_1___#no”,
text: “Task A-12458”
};

    var subEvent = {
        start_date : new Date(2011, 7, 26, 10, 00, 00),
        end_date : new Date(2011, 7, 26, 13, 00, 00),
        event_pid : 1,
        id : 2,
        rec_type : "",
        rec_pattern: "",
        event_length: 1314360000,
        _pid_time: 1314360000000,
        text: "Task A-89411"
    };[/code]

And I thank you for this question as indeed there was bug in addEvent function for modified recurring events.
You can either use scheduler.parse method or later on I can send you updated files where this issue is resolved.

Kind regards,
Ilya

Hi Ilya,

First of all, thanks for your answer.

I’ve just tried the parse method as you suggest, but I have the same problem.

[code] var event = {
start_date : ‘2011-08-25 15:00:00’,
end_date : ‘9999-01-01’,
id : 1,
event_length : 9000,
rec_pattern : “day_1___”,
rec_type : “day_1___#no”,
text: “Task A-12458”
};

    var subEvent = {
        start_date : '2011-08-26 10:00:00',
        end_date :'2011-08-26 13:00:00',
        event_pid : 1,
        id : 2,
        rec_type : "",
        rec_pattern: "",
        event_length: 1314360000,
        _pid_time: 1314350000000,
        text: "Task A-89411"
    };
	
	scheduler.parse([event, subEvent], "json");[/code]

I’ve added a zip file containing a simple html page, maybe the problem come from a configuration or something like this.

About ‘event_length’ and ‘_pid_time’ in subEvent, I suppose ‘_pid_time’ must be before ‘event_lenght’ is that right ?
scheduler_test.zip (261 KB)

Hello,

hello,
It is possible to update my recurring event description (recurring pattern and dates stay the same), and keep all the single event change?

Thanks for your help !

It is problematic.

on server side

  • you can’t use default server side logic, as it deletes all related single events.
    on client side
  • if you change record through existing UI it will delete all related events as well

while it possible to change description through API on client side ( scheduler.getEvent(id).text = some; ) you will not be able to save data on server anyway.

As far as I can see the only way is to use custom ui and custom logic on server which will update necessary record on server.