The original issue:
We had several jobs configured to post badges for UGS, but one badge was consistently not posting to Horde so it was not appearing in UGS. After a lengthy investigation in which we couldn’t identify the cause, we eventually traced it back to the showUgsBadges property not being inherited from the base template, unlike all the other properties which were inheriting correctly. Once we found that, it was a short time before we identified the root cause.
Horde’s inheritance mechanism in ConfigObject.MergeDefaults determines whether a property is “unset” by checking if its value is null. Since a non-nullable bool defaults to false rather than null, the merge logic always treats it as explicitly set and never copies the value from the base template.
This affected showUgsBadges and showUgsAlerts on TemplateRefConfig — both declared as bool. A child template that did not explicitly set these properties would always resolve to false, ignoring any value set on the base template.
Other inheritable properties such as notificationChannel are declared as string? (nullable) and work correctly because their “unset” state is genuinely null.
The proposed fix:
Changing showUgsBadges and showUgsAlerts from bool to bool? in TemplateRefConfig, so that an omitted value is represented as null and correctly picked up by the inheritance merge. Consumption points use ?? false as a fallback for root templates with no base.
We also note that several other bool properties in TemplateConfig (allowPreflights, updateIssues, promoteIssuesByDefault, notifyOnFirstSuccessOnly, and notifyOnStatusChangeOnly) appear to have the same issue and may warrant the same fix.
Can you please get back to me to let me know if any of these bool properties should not inherit from base template by design? I don’t think this was intentional but I would like to know if I am wrong.
Cheers, Daniel
[Attachment Removed]