Hi ,
I created a recurring event. And then disabled the recurring option and made it as single event. Even after converting to single event, event_length field is still saved as 1800 (30 mins) in db. event_length should be 0 for single event right?
Recurring event is stored in Postgres as : time is in UTC
start_date:2024-04-25 04:00:00.000000,
end_date: 2024-04-28 04:00:00.000000,
rec_type: day_1___#3,
event_pid: 0,
event_length: 1800,
name: RECUR
After converting to single event, it got updated as:
start_date:2024-04-25 04:00:00.000000,
end_date: 2024-04-25 04:30:00.000000,
rec_type: '',
event_pid: 0,
event_length: 1800,
name: RECUR
Hello @rajeswarij,
after converting to single event, event_length field is still saved as 1800 (30 mins) in db. event_length should be 0 for single event right?
Technically, you are correct, but as it’s a single event - this property won’t affect its duration(as the event will use the start/end
dates). You can remove this data while sending an event to the backend they don’t fit your project requirement, but mostly they are shows that it was part of a recurring series, even when now it’s a single occurrence.
To remove the event_length in this scenario, how can I know that this particular event is converted from recurring to single event?
Hello @rajeswarij ,
Maybe I didn’t fully understand the question, but as you already converted it to single event, you already know that it’s a single event, am I right?
Maybe it will be helpful if you reproduce the current scenario in our snippet tool:
https://snippet.dhtmlx.com/cqiob77s
(open the snippet => reproduce your config => click the “Save” button => post here the new link)
And provide the current behavior(and steps that I should provide to reproduce it) and the expected behavior and requirements?
No worries. I think I figured it out. In my scenario, when I convert recurring to single event, update event is triggered. So duringthat event, I am checking for rec_type value to decide whether its a single or recurring event.
If rec_type is empty, saving event_length as 0 (meaning single event)
If rec_type is not empty then saving event_length as it is. (meaning recurring event)
1 Like