Is It Possible To Set A Default Calendar For New Entries?

My main calendars are Nextcloud Calendars, sync’ed with the Nexcloud server via the standard Jolla Nextcloud account type.

I also have the on-device personal calendar which I believe is automatically created when Sailfish is installed. This on-device calendar obviously isn’t sync’ed with anything so I don’t use it as a result. I cannot delete the personal calendar from the device, so in ‘Manage Calendars’ in the calendar app I have de-selected it so that it is not displayed.

When I create a new calendar entry the on-device personal calendar is always the one that the new calendar entry goes into if I don’t specifically change the selected calendar to my Nextcloud one. This is even though it has been deselected in ‘Manage Calendars’. The result is of course that you now have an entry in the wrong calendar that is ‘hidden’, not displayed in the calendar views and, more importantly, not sync’ed.

Mostly I remember to deliberately select the Nextcloud calendar when I’m creating the entry, but sometimes I forget. Once this happens I have to reselect the on-device personal calendar in ‘Manage Calendars’ and delete the wrongly created entry. Sadly there is no way of editing the entry to change the calendar that the entry appears in to the Nextcloud calendar (the option is greyed out). Then I have to re-create the entry from scratch in the Nextcloud calendar and deselect the on-device personal calendar again.

I’ve scanned the forum looking for a way to (a) either set my chosen Nextcloud calendar to be the default calendar, or (b) edit an existing calendar entry to change the calendar the entry appears in, but I haven’t managed to find anything.

So, is it simply not possible to set a chosen default calendar in SFOS, or am I missing something? It seems a pretty basic function to have.

2 Likes

If you go into settings>accounts>your calendar and scroll to the bottom there is a button for standard calendar

I don’t have that option on the NextCloud account type. All I have is as shown below (note that the Nextcloud Personal calendar is different to the on-device personal calendar - two different calendars with the same name)

1 Like

1 Like

I see, apparently this only works for CalDav

Well, there are at least three account types that deal with calendars afaik: Nextcloud, Office365/Exchange and caldav. They all come together in the calendar app, so I was looking for a settings option in this app to make any calendar of any type the default. In fact just like there is a ‘Default account for sending’ option in the Jolla email app.

I always get my ‘Personal’ calendar on my Nextcloud account as default. Perhaps it’s because I turned off the ‘native’ ‘Personal’ calendar?

In any case, I had the impression that after I chose ‘Personal’ from nextcloud it just ‘stuck’. It’s my default for sure. But, as I said, I also have the ‘local’ version of ‘Personal’ disabled in ‘Manage calendars’.

I have exactly the same setup, but mine always defaults to the on-device personal calendar sadly, even though both that and the Nextcloud one are disabled.

I have a vague memory that setting the calendar when creating a new appointment makes it the default calendar. Could that work?

If that is so, it doesn’t make switching the default easy, however…

1 Like

That’s the impression I have. I simply made a new appointment, selected the nextcloud personal calendar, and since then it’s default.

What happens if you make a new event and chose ‘any’ nextcloud calendar? And then make another new event?

I use the calendar daily and have a few different ones like personal, work, family…
My experience is that it keep sthe last calendar used as in, if I made an entry for the family one it will keep this as default for the next entry I will make and I will have to change it work calendar if the new entry is supposed to be a work one. just my 2cts.
It’s ok like this but you really have to be aware of it as you can’t change the type of calendar entry once you created it which is a shame. You can’t copy entries either which is also a shame haha

I’ve been doing some more testing on this and, yes, you are correct, it does remember the last calendar that you created an event for.

What it doesn’t do, at least for my particular combination of calendars, is remember this following a reboot. Then it just goes back to the on-device personal calendar. And sadly, since I have to reboot often to get mobile data back for Android apps this is seems to be the cause of my frustrations.

I don’t know whether this is a bug, or a design decision. It still would be nice to have a specific choice of the default account like the email app though.

It remembers it, as long as there’s no reboot inbetween.

1 Like

I may suspect your calendar DB has stored somehow several default notebook. May you execute and report the output of the following commands:

$ devel-su -p
$ sqlite3 ~/.local/share/system/privileged/Calendar/mkcal/db
sqlite> select name, flags & 512 from calendars;

I personnaly get only one calendar with a non zero flag. What about you ?

PS: the database is storing the default status of a calendar with the 9th bit of the flag. So, when working properly, it should be able to survive a reboot.

2 Likes

I’m afraid all it says is bash: sqlite3 not found.

Did you try:

pkcon install sqlite
3 Likes

No, because that wasn’t in the instructions. I’m just a normal user, not a developer, so my knowledge of SFOS system internals is somewhat limited. But I can try that now.

you need devel-su… 20chr

I assumed that there is no need to reboot SailfishOS, restarting AlienDalvik is fully sufficient, e.g. by AlienDalvik restart / refresh, but unfortunately this does not hold true (see next post).

Well, by using SailfishOS you became a UNIX / Linux system administrator. These command line basics are rather UNIX user level than administrator. There is lots of documentation online accumulated in the past 30 years for that. But yes, it requires to be willing to step through a leaning curve, which will be helpful for using any UNIX / Linux machine.

Note that using the command line is completely unrelated to developing software or “SFOS system internals”.

1 Like