Skip to content

[BE] Framework source stored on creation of framework

What does this MR do and why?

Adds the ability to store the source_id which will be used in subsequent MRs when creating frameworks from the CSP Group.

How to set up and validate locally

Create a framework with a source id:

ComplianceManagement::Frameworks::CreateService.new(
  namespace: Group.find(YOUR_GROUP_ID), 
  params: {name: "Testing123", description: "Description", color: "#000000", source_id: "1234"}, 
  current_user: YOUR_USER).execute

Query your newly created framework ComplianceManagement::Framework.last, which should look like:

=> #<ComplianceManagement::Framework:0x00000001203e8fc0
 id: 191,
 name: "Testing123",
 description: "[FILTERED]",
 color: "#000000",
 namespace_id: 24,
 pipeline_configuration_full_path: nil,
 created_at: Wed, 02 Jul 2025 04:33:44.015385000 UTC +00:00,
 updated_at: Wed, 02 Jul 2025 04:33:44.015385000 UTC +00:00,
 source_id: 1234>

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #546244 (closed)

Edited by Jean van der Walt

Merge request reports

Loading