diff --git a/.changeset/stupid-ants-change.md b/.changeset/stupid-ants-change.md new file mode 100644 index 0000000000..c78c5e4250 --- /dev/null +++ b/.changeset/stupid-ants-change.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-tech-insights-backend-module-jsonfc': patch +--- + +Handle extracting facts from 'not' conditions too diff --git a/plugins/tech-insights-backend-module-jsonfc/src/service/JsonRulesEngineFactChecker.ts b/plugins/tech-insights-backend-module-jsonfc/src/service/JsonRulesEngineFactChecker.ts index 721c9b3c62..6c1c559fc4 100644 --- a/plugins/tech-insights-backend-module-jsonfc/src/service/JsonRulesEngineFactChecker.ts +++ b/plugins/tech-insights-backend-module-jsonfc/src/service/JsonRulesEngineFactChecker.ts @@ -222,6 +222,12 @@ export class JsonRulesEngineFactChecker this.retrieveIndividualFactReferences(con), ), ); + } else if ('not' in condition) { + results = results.concat( + this.retrieveIndividualFactReferences(condition.not), + ); + } else if ('condition' in condition) { + // ignore the ConditionReference type } else { results.push(condition.fact); }