We have moved to a new Sailfish OS Forum. Please start new discussions there.
1

[BUG?] Manual removing calendar entries, but Event notification still came at a time of Event... [answered]

asked 2016-10-01 03:05:55 +0300

Schturman gravatar image

updated 2016-10-04 03:36:31 +0300

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...

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by Schturman
close date 2016-10-04 03:36:13.164107

Comments

What I think happens here (but cannot be sure);

  1. You create the calendar and add entries to it
  2. A daemon (timed/buteo/something) sees that you have events and adds them to the timer database
  3. You remove the entries and calendar
  4. There is no trigger for the daemon to do anything, so entries are left in timer database

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 )edit
1

If 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 )edit

Yes, because it is a bug :)

juiceme ( 2016-10-04 15:31:37 +0300 )edit
1

haaa... 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 )edit

Ah 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

1 Answer

Sort by » oldest newest most voted
1

answered 2016-10-04 03:35:46 +0300

Schturman gravatar image

Problem solved, see EDIT in first post...

edit flag offensive delete publish link more

Question tools

Follow
1 follower

Stats

Asked: 2016-10-01 03:05:55 +0300

Seen: 179 times

Last updated: Oct 04 '16