Akonadi Console Tag editing

Erik Quaeghebeur mail.kde.org at e3q.eu
Thu Mar 31 09:43:52 BST 2022


Dear Sid,


> Using the Console (version 5.16.2), there appears to be no way to save
> edits to the tags, available (apparently) only under the Browser tab.

This is possible (I have 5.18.3, but I think the functionality was there before). The pitfall is that the tag name is not the tag code that you should add and save there.

Please have a look at the attachment edit_tags.png first. There you see the interface for adding tags to a pimitem. The steps are to type the tag's *gid* in the textbox above the taglist box (like the ‘test’ I put there), press ‘+ Add’ (my interface is not in English, sorry) and then press the ‘Save’ button below. Now, the tag *gid* is generally not its name, but a uuid (like the string starting with 495b in the screenshot). 

Now, to get at your tags' gids, you need to combine information from the TagTable and TagAttributeTable in the Akonadi database. For that, look at the two other screenshots. There you see that a tag's id/tagId links information about one tag, including its name to its gid.

So you may notice that I have a tag with gid ‘test’, which is not a uuid. I did this by editing the TagTable. This does not cause any problems because it is the tagId that links all the information. (‘Verjaardag’=‘Birthday’ is a somewhat built-in tag, so for that things appear to be done differently.)

I have opinions about the design of the tag system, but do not know the reasons for why the developers chose this design. But just because your question creates an opportunity to voice those opinions, here they are: ;-)

* My impression is that only a single tag type could suffice (and therefore only one TagTable); differences in properties can be encoded in the attribute list (I have no clue actually what the TagRemoteIdResourceRelationTable is for)

* The restriction to using a uuid for the gid complicates possible tag usage in some synchronization context, e.g., if one were to sync a certain set of user-chosen IMAP flags with Akonadi tags (my attempts towards that goal are what prompted me to dive into this and replace the uuid with ‘test’ for the ‘Test’ tag); the only requirement is that it is unique and this can be exposed in the tag editing interface.


Best,

Erik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: edit_tags.png
Type: image/png
Size: 13266 bytes
Desc: View of tag editor in akonadiconsole
URL: <http://mail.kde.org/pipermail/kdepim-users/attachments/20220331/8e754e98/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tags.png
Type: image/png
Size: 7453 bytes
Desc: List of tags
URL: <http://mail.kde.org/pipermail/kdepim-users/attachments/20220331/8e754e98/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tagattributes.png
Type: image/png
Size: 10274 bytes
Desc: List of tag attributes
URL: <http://mail.kde.org/pipermail/kdepim-users/attachments/20220331/8e754e98/attachment-0002.png>


More information about the kdepim-users mailing list