Do not create requirements with deprecated attributes
What does this MR do and why?
This is part of stage IV of the plan to deprecate old requirements.
Now that all requirements are work items and only acts as a proxy to keep API endpoints and iids backward
compatible, we can stop saving values to not used columns on the requirements table. To do that we can remove
RequirementsManagement::CreateRequirementService
and replace it with Issues::CreateService
where we also
create the proxy requirement object inside a transaction. There are a couple of places that were still using
CreateRequirementService
, both should be deprecated soon but we still need them because of our deprecation policy:
- Graphql mutation
CreateRequirement
RequirementsManagement::ImportCsvService
Minor changes were needed to specs because the current behavior did not change.
related to #361990 (closed)
How to set up and validate locally
Testing the old Graphql endpoint
- Make sure you have EE ultimate license on your localhost
- Create a requirement using the old GraphQL endpoint, for example:
mutation OldCreateRequirement {
createRequirement(input: {
projectPath: "flightjs/Flight",
title: "Created from old endpoint",
description:"any description"
}) {
requirement {
title
description
}
}
}
- Open rails console and check if
RequirementsManagement::Requirement.last
does not have title and description saved in database
Testing the CSV import
- Go to requirements page
- Create some requirements and export them as CSV
- Import that same file from previous step in a new project
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.