Backend merge requests milestone facet: introduce new document field
Introduce new field and populate for new or updated data
field name pulled from &9937 (closed)
- introduce an Advanced search migration to add a new field to the merge requests mappings named
milestone_idwith type ofinteger. - In
MergeRequestInstanceProxypopulatemilestone_idand bump theschema_version(format isYY_MM)
- Note: the
milestone_idfield should only be populated once the migration above is complete. You can use::Elastic::DataMigrationService.migration_has_finished?to check
-
add
milestonetopreload_indexing_datainMergeRequestClassProxy -
update the
'does not have N+1 queries for merge_requests'spec for merge request indexing to add different milestones to the merge requests created for testing N+1 in indexing -
update the spec for testing
as_indexed_json.
- add
milestone_idto the main'returns json with all needed elements'test - add a spec to make sure
milestone_idis not populated if the migration is not complete (example spec)
Edited by Terri Chu