From 24aaef1b8e0d739bef2d746e55a10c13dbcd8aaa Mon Sep 17 00:00:00 2001 From: Marek Aufart Date: Tue, 19 Nov 2024 17:01:41 +0100 Subject: [PATCH] Update analyses/report/dependencies Labels query Updating SQL query for getting TechDependencies to include also dependencies with empty labels (that were not returned before). Related to https://issues.redhat.com/browse/MTA-4169 Signed-off-by: Marek Aufart --- api/analysis.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/analysis.go b/api/analysis.go index ed885c08..b28561c4 100644 --- a/api/analysis.go +++ b/api/analysis.go @@ -1692,10 +1692,9 @@ func (h AnalysisHandler) DepReports(ctx *gin.Context) { q = q.Select( "d.Provider", "d.Name", - "json_group_array(distinct j.value) Labels", + "d.Labels", "COUNT(distinct d.AnalysisID) Applications") q = q.Table("TechDependency d") - q = q.Joins(",json_each(Labels) j") q = q.Where("d.AnalysisID IN (?)", h.analysisIDs(ctx, filter)) q = q.Where("d.ID IN (?)", h.depIDs(ctx, filter)) q = q.Group("d.Provider, d.Name")