Closed nscuro closed 3 months ago
Coverage variation | Diff coverage |
---|---|
Report missing for ff2d7ff4b8b265261846d8e6cbaa601a3fe6c248[^1] | :white_check_mark: 73.53% (target: 70.00%) |
Codacy will stop sending the deprecated coverage status from June 5th, 2024. Learn more [^1]: Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.
Description
Fixes broken global vulnerability audit view for MSSQL.
Tested with MSSQL, PostgreSQL, and H2.
Addressed Issue
Fixes #3692 Backports #3700
Additional Details
MSSQL does not support
DISTINCT
for columns of typeTEXT
, whichDESCRIPTION
andRECOMMENDATION
are.Because the database schema is controlled by DataNucleus, and DataNucleus doesn't allow us to customize column types for specific RDBMSes, changing the respective columns to
VARCHAR(MAX)
is not possible.DISTINCT
was needed because finding rows are joined with thePROJECT_ACCESS_TEAMS
table, to support portfolio ACLs. If a user is member of multiple teams, the query would yield a duplicate row for each permitted team the user is a member of.The need for
DISTINCT
is eliminated by converting the ACL check from aLEFT JOIN
to anEXISTS
subquery.Checklist