Refactor project traversal_ids as sql
Summary
The code that turns the traversal IDs of a project into an SQL array is repeated, and it should be shared.
traversal_ids_as_sql = "'{#{project.namespace.traversal_ids.join(',')}}'"`
Improvements
This improves code readability.
Risks
None
Involved components
ee/app/services/security/ingestion/tasks/ingest_vulnerability_statistics.rbee/app/services/vulnerabilities/statistics/adjustment_service.rbee/app/services/vulnerabilities/statistics/update_service.rb
Optional: Intended side effects
None
Optional: Missing test coverage
None
Implementation plan
Add a new method to the Project class, and use it in the aforementioned involved components.
/cc @arpitgogia
Edited by Fabien Catteau