[BUG?] Manual removing calendar entries, but Event notification still came at a time of Event... [answered]
Hi to all...
I noticed about a strange problem. As we know we can import calendar entries from .ics file, this is what I did. But After removing all this entries and also calendar itself, the Event notification still came at a time of Event...
The full process:
1. Create manually a custom calendar, as example (as ROOT):
sqlite3 /home/nemo/.local/share/system/privileged/Calendar/mkcal/db "insert into Calendars values('11112222-1111-1111-2222-111122223333','Custom calendar','Haifa','#FFFF00',668,0,'mycal','',-1,1475279260,'','',1475279260,'','');"
2. Now import any .ics file to your Calendar. For example you can try this one (Jewish holidays with candle lighting times): https://dl.dropboxusercontent.com/u/17706605/Jolla_C/jewish_cal_with_candle_Haifa_2016-2019.ics
3. Now remove All entries from this calendar (as ROOT):
sqlite3 /home/nemo/.local/share/system/privileged/Calendar/mkcal/db "DELETE FROM Components WHERE Notebook='11112222-1111-1111-2222-111122223333';"
4. Now remove this calendar (as ROOT):
sqlite3 /home/nemo/.local/share/system/privileged/Calendar/mkcal/db "DELETE FROM Calendars WHERE CalendarId='11112222-1111-1111-2222-111122223333';"
5. When first event will came it will show notification on event screen...
I can't understand why ? It stored also in some other place except "db" file ? Something like timedqt5 ?
Someone know how to fix it ?
Thanks
P.S. I played with this a few times on Jolla C (import, removing entries, removing calendars), maybe here is a problem, but still don't understand why. On Jolla1 and Tablet, for now all looks ok...
EDIT (04.10.16):
Finally I figured out what was the problem...
Like I suspected, the timed entries also stored inside timedclient-qt5 and if we delete entries from Calendar app by long press on event -> delete, the entries also will be deleted from timedclient-qt5. But if we delete entries from sqlite3 command (see above), they disappear from Calendar app, but timed events still stored inside timedclient-qt5 and we need to remove them manually:
timedclient-qt5 --cancel-event=<cookie number>
I updated my patch and now it remove entries like it should.
But I still don't understand why timed entries not deleted automatically from timedclient-qt5 when entries deleted from Calendar via sqlite3 command...
What I think happens here (but cannot be sure);
Probably when entries are removed via the calendar GUI it triggers the purge on timer database at the same time.
juiceme ( 2016-10-04 14:47:36 +0300 )editIf you say that daemon periodically check if new timed entries added to calendar and this daemon add this entries to timedclient-qt5, why when I remove entries/calendar on the next checking this daemon will not see this entries, why it not remove them from timedclient-qt5 ?
Schturman ( 2016-10-04 15:29:19 +0300 )editYes, because it is a bug :)
juiceme ( 2016-10-04 15:31:37 +0300 )edithaaa... or we think wrong and daemon not check it periodically, but just insert it immediately to timedclient-qt5. And if we delete timed entries from calendar via sqlite3 command, we also need to remove entries from timedclient-qt5... ;)
Schturman ( 2016-10-04 16:09:18 +0300 )editAh yes, now I understand.
You do not create the calendar entry manually to the sql database, instead you import it with some GUI tool, right? Of course that is what happens in the import, the timer is set at thet time.
Later, when you remove the entry manually from database, of course the timer is still there! :)
juiceme ( 2016-10-04 16:43:47 +0300 )edit