Skip to content

Delete issue contacts if project root changed

Lee Tickett requested to merge 350327-project-move-handle-crm into master

What does this MR do and why?

Related to #350327 (closed)

Issue contacts can only come from an issues root group. This MR ensures that moving a project to a new root group will delete all issue contacts.

At a later stage we will look to see if we can copy the contacts to the new root group, but we need to tackle things like duplication.

Screenshots or screen recordings

crm_handle_move_project

How to set up and validate locally

0. Enable :customer_relations feature flag via the rails console
1. Visit a group settings page (e.g. http://gdk.test:3000/groups/flightjs/-/edit
2. Expand "Permissions and group features"
3. At the very bottom, select "Enable customer relations"
4. Select "Save changes"
5. Repeat for another group
7. Create some contacts in both groups (customer relations -> contacts) *if you've recently setup GDK or reseeded your database, there should already be some setup!
8. Add some contacts to a few issues in a project using the "/add_contacts email@example.org email2@example" quick action
9. Move the project to subgroup of the current project group
10. Check the contacts are still attached to the issues
11. Move the project to a new parent group
12. Check the contacts are no longer attached to the issues

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 Mayra Cabrera

Merge request reports

Loading