Nested tags and tag inheritance not working as I would expect in all cases

Can anyone explain this?

Before I can ask the question, I need to first provide a framework against which to compare the two results that I am seeing.

Background

I have a system that I use for bookkeeping that uses tags to categorize expenses that I feed into a number of home grown tools for report generation and tax preparation.

In this scenario, all my receipts are in a single group: “Ranch Receipts.” This is relevant for interpreting the info panels in the screenshots below.

A fully tagged receipt has 6 pairs of nested tags where each pair is of the form:

  • parent: tagType
  • child: tagType>tagValue

The child tag redundantly contains the name of the parent tag and a > so that it can be interpreted as a hierarchical tag in the excellent Ammonite app that is a very useful tool to slice and dice your data based on tags and dates that I rely on for some steps in my processing.

The Problem

So with that framework, I scanned a receipt back in 2019 on my Mac and processed it in DEVONthink to add the 12 tags that you see in the first screenshot.

That is actually from my iPad Pro but it contains the same information on my Mac. All of this is as expected with 12 tags and the single “Ranch Receipts” location as expected. It is also the same on my iPhone.

The second screenshot is from my iPad mini and in this case the information is different even though the item was simply synced between the four devices.

In the second case the information pane only lists 10 of the 12 tags and represents the other two tags somehow via the two additional locations which are the tag groups with the same name as the missing tags in the tag list.

Clue

I stumbled upon this when trying to debug a shortcut where I am trying to add the 6 child tags tagType>tagValue to a new item. I have recently learned that, through tag inheritance, this should automatically add the 6 parent tags if the child tag is already present in the parent tag group, as is the case here.

So, the expected result is that the new item will contain a total of 12 tags. However, that isn’t happening because, when I run the shortcut, some of the tags are created at the top level instead of within the parent tag, even though there is already a child tag with the same name in the parent group. In other words the tag inheritance seems to be failing and a new top level tag is being created.

This is what I see in the tag group in those cases:

  • tagType
  • tagType>tagValue

Instead of just

  • tagType

so now there are two tagType>tagValue groups - a new one at the top level and the original one inside the tagType group.

I think these issues are related because my shortcut development has been on the iPad mini (I’m traveling) and I think that my recent tag problems with the shortcuts have affected the earlier items from 2019, but only on my iPad mini.

Sorry for the late reply but I was on vacation and then a bit busy with Mac releases.

Question: Did this problem start manifesting with DEVONthink To Go 3.5.5? If yes, could you please check if the tag to which you want to add your tagType>tagValue tag is excluded from tagging? You can check by long-pressing it in the Tags group and choosing Info. If yes, we have fixed this problem for the very next maintenance update including an auto-repair function (which fixes the problem for all subtags created after the update but, unfortunately, not for those created since version 3.5.5 came out, September 9th).

Thanks for getting back to me @eboehnisch.

In response to your questions, I cannot say when this occurred. I normally work on the Mac and only recently started using DTTG more seriously. The problems have shown up during my development and, as I stated, the tag problem has now “infected” earlier items that haven’t been touched for years.

I have six top level tags and I just checked and none of them has “Exclude from Tagging” set.

I believe the issue is related to child tags being created at the root level instead of nested inside its parent?

The two tags that appear here as regular groups instead of tags, are they excluded from tagging? That would explain why they appear under Locations instead of as tags.

And did you process the receipt just recently or did the effect just happen now, imposed on this three years old document?

New information:

When I look at the tags, I now see that some (including the two I highlighted) are not tags but groups as reported in the info pane and indicated by the tag/group icons.

The six top level tags (including category) are tags as I would expect, however there is a problem at the next level - some of the child tags, like category>Contractor, are reported as groups instead of tags. Those groups are then tagged with the parent tag (category in this case).

When you open the Info panel for the tags that appear as groups as well for the enclosing group/tag of these tags, is Exclude Groups from Tagging enabled?

No

So neither the tags that appear as groups nor their parents are excluded from tagging? What about the database itself when you check the Info panel from the database’s top level?

Do you see the same issue with other databases?

I was on a plane most of yesterday, so just catching up now.

@eboehnisch - the database itself does have “Exclude from Tagging” enabled. In fact all my databases are set to “Exclude from Tagging”.

@BLUEFROG - I have stopped using DEVONthink for the most part since this problem occurred and the development that I was doing was only targeted at this one database. My other databases are used for different areas. So, I don’t have any information to share regarding other databases at this time.