Expose imported status for relevant entities
What does this MR do and why
This exposes the imported
state and imported_from
value for Designs, Epics, Events, Issues, Merge Requests, Notes, and Snippets as a boolean.
This follows MR !151782 (merged) which added an imported_from
column to each resource.
Models, api entities, concerns, graphql queries and types have all been updated where necessary.
A HasImportSource
concern class has been added with methods to:
- set enum attribute that uses a defined hash, and a prefix;
- return a boolean.
This work is part of Issue #424454 (closed) which will allow these resources to have a visual indicator in the UI to show they have been imported.
A follow-up MR to update each importer to add the enum value to the imported
DB column will follow this MR.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
REST API request results
Discussions
Epics
Events
![events](/uploads/4c77bssues](/uploads/333fec83f30b12cc4a161c2e4e8cdad4/issues.png)
Issues
Merge Requests
Notes
Snipetts
GraphQL request results
Snippets
Designs
How to set up and validate locally
- Make requests to the endpoints/queries shown in the screenshots above
Numbered steps to set up and validate the change are strongly suggested.
Related to #424454 (closed)