I have a strange situation with synchronizing tags in a multi-install context.
This is a bit long but I wanted to clearly pinpoint what I think may be a bug in synchronization.
My setup is
- a Windows desktop Joplin (
Joplin 1.0.201 (prod, win32)
) - a CLI in a docker container (
joplin 1.0.163 (prod)
→ interestingly enough, I installed that today vianpm
so I am not sure why the versions differ) - a NextCloud installation to which both instances synchronize
To simplify things, I copied database.sqlite
from my desktop installation to the docker (CLI).
The ultimate goal of this is to use the API in the docker to automatically modify tags in notes based on #hashtags (something I will open source someday as it may be useful to others)
What works:
- creating a note and add tags on the desktop + synchronization to NextCloud
- creating a note and add tags via the CLI + synchronization to NextCloud
- in both environments I see the notes created by the other instance
What does not work:
I added, in the container, via some code (= calling the API) tags to notes. To take a specific example, I added the tag dockerhashtag
to note notefromdocker
. Here is how it is seen on the commandline:
root@00f5832d94a3:/# joplin tag list dockerhashtag
notefromdocker
root@00f5832d94a3:/# joplin tag notetags notefromdocker
dockerhashtag
So it looks good. After joplin sync
I expected to see that tag on the desktop (after also synchronizing it). The tag does not show up.
To be absolutely sure, I added some text from the CLI (joplin edit notefromdocker
), synchronized and behold, the text is visible on the desktop (again, after synchronizing it as well).
So why doesn't the tag synchronize?
Then I did another test: to add, via the CLI, a tag (tagfromcli
) to that note. I now have:
root@00f5832d94a3:/# joplin tag notetags notefromdocker
dockerhashtag
tagfromcli
So both are visible and after a sync ... only tagfromcli
is visible on the desktop!
I am at loss here.
Last test: to add a tag (tagfromdesktop
) to that note from the desktop. Synchronization and then
root@00f5832d94a3:/# joplin sync
Synchronisation target: Nextcloud (5)
Starting synchronisation...
Fetched items: 1/17.
Downloading resources...
Created local items: 2. Fetched items: 17/17. Completed: 2020-05-10 12:13
root@00f5832d94a3:/# joplin tag notetags notefromdocker
dockerhashtag
tagfromdesktop
tagfromcli
Only the tags added either by the CLI or the desktop app are synchronized. The one via the API is not.
Help!