Skip to content

Sync description to work_item_description record

What does this MR do and why?

Sync description to work_item_description record

This upserts the description and the other attributes to the work_item_description record.

It's part of an effort to split the issues table and move out the description: &18643

The reason why I choose to sync this in application logic, instead of using a trigger:

  • At some point, the work_item_description record will be the source of truth for reading
  • Then we want to stop writing to the issues table
  • At this point, we need to replace all changes to issues.description to work_item_description in the application logic
  • However, we can at this point not be 100% sure that we catch all places in the application logic, because the trigger takes over that syncing work

So I rather put syncing into the application logic now, instead of later, to catch potential syncing bugs early.

References

#556921

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Create or update a work item
  2. Go into the rails console and check if it got the right content on the work_item_description record:
work_item = WorkItem.find(WORK_ITEM_ID)
work_item.work_item_description

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.

Edited by Nicolas Dular

Merge request reports

Loading