Skip to content

Commit

Permalink
Update analyses/report/dependencies Labels query
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
aufi committed Nov 19, 2024
1 parent a4c11db commit 24aaef1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api/analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 24aaef1

Please sign in to comment.