Copy crm contacts widget data with the new work item move
What does this MR do and why?
Create a callback to copy the crm contacts widget data from the current work item to a the new one. This call back should be called from the work item move service, after creation of the new work item.
In case we can not copy the crm contacts to the new work item, we will create a system note that the contacts were removed in the new work item.
issue: #500066 (closed)
Database
For the raw database queries, as i could not find the ids in order to perform the queries in https://console.postgres.ai/. I run them in localhost and i copy paste the results in explain.dalibo.com as it is explained in this document: https://docs.gitlab.com/ee/development/database_review.html#query-plans
For inserting 100 records into issue_customer_relations_contacts
For deleting 100 records from issue_customer_relations_contacts
Before we delete the record the each_batch method need to find the correct ids in order to batch the records. In order to find those ids it runs those queries:
- To find the first id
- To find the last id for the first look
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
| Before | After |
|---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.