Use a LIKE test instead of equality
Fixes the ability to search for CVE (as well as other reference types) with a non-exact match [SeeRM #7989]unstable
parent
e7a1f06fbc
commit
12f0448bb4
|
@ -666,11 +666,11 @@ class DBManager
|
|||
formatted_values = value_set.collect { |value|
|
||||
prefix = keyword.upcase
|
||||
|
||||
"#{prefix}-#{value}"
|
||||
"#{prefix}-%#{value}%"
|
||||
}
|
||||
|
||||
query = query.includes(:refs)
|
||||
union_conditions << Mdm::Module::Ref.arel_table[:name].eq_any(formatted_values)
|
||||
union_conditions << Mdm::Module::Ref.arel_table[:name].matches_any(formatted_values)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue