Regression: MakeLiteral GameplayTagContainer fails to match GameplayTag queries involving parent tags in 4.17.2 vs. 4.16.3

I have identical “Has Tag” queries in 4.16.3 and 4.17.2 that return different values. I do not have the easy ability to compare 4.17.1 to these two versions. I have minimal repro projects for these two versions.

Repro case:

Project setup:

  • Make a new First Person Shooter project, no content.

  • Make a new DataTable based on the GameplayTag structure.

  • Add the tags to the table:

– Character.NPC

– Character.PC

  • Add the table to the tags list in Project Settings->GameplayTags

  • Make a new blueprint derived from Actor called TestTag.

In TestTag, in event graph:

  • Key Step: Make a literal GameplayTagContainer, with tag Character.NPC, Connect it to a call to HasTag with a GameplayTag of Character, with “Exact Match” set to false. PrintString the value. It should return true, but will unexpectedly return false.

Next in the event graph, to confirm the error:

  • Make a blueprint variable of type GameplayTagContainer called GTC

  • On begin play, do GTC->AddGameplayTag(Character.NPC)

  • Print the result of GTC->HasTag(Character) with “Exact Match” set to false. It will return (as expected) true.

In 4.16.3, a similar project had both cases return the expected value of true.

This is really fundamental to tags! So much so that I’m surprised to not see anything on this - thus a pretty rigorous testing setup. In my main project, it looks to be even stranger - for instance, when I used the Tag AssetInterface calls, I got spurious results that seemed to sometimes be true or false in between loads without a Make Literal involved. No minimal repro case on that, but FYI to whomever fixes this that there were some other apparent instabilities in results. I’d suspect that the call on gameplay tag containers that populates the parent tags isn’t happening properly on MakeLiteral and/or some other cases.

If a repro project is needed, let me know-
-jg

Any followup on this? It causes a variety of subtle bugs when using Gameplay Tags; we’re hoping it is fixed in 4.18. Thanks!

I see this exact same problem, but only when using MakeLiteralGameplayTagContainer