Skip to content

Backfill resource_link_events

euko requested to merge 407289-backfill-resource-link-events into master

What does this MR do and why?

Related to #407289 (closed)

When work items or issues are related as parent/child, system notes are created using Note (notes table) and SystemNoteMetadata (system_note_metdata table).

To see such notes in action, see this demo (not strictly necessary for this MR.)
  1. Create an issue (which is a work item) and add a new task.

DEMO

Near the end of the demo, you can see a system note that reads "Administrator added #11 (closed) as a child task just now."

The information in the note is stored in system_note_metadata table

It's useful to have the exact information on the relate/linking events in a more parseable and queryable format and WorkItems::ResourceLinkEvent (resource_link_events table) was created for the purpose of recording the information.

Using the existing system_note_metadata records, we are going to retroactively create / backfill resource_link_events.

DB review

The estimate time needed to complete the batched background migration is discussed in !118605 (comment 1377568268). Tldr; we only need to batch through ~242182 records and it should not take long.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by euko

Merge request reports