Closed cairocoder01 closed 1 month ago
When using a magic link template for Listing Sub-assigned contacts, the code (https://github.com/DiscipleTools/disciple-tools-bulk-magic-link-sender/blob/280b3a640fceb46b3767343daf0c0cfc525da2fd/magic-link/magic-link-templates.php#L1352-L1360) seems to indicate that it should also return contacts that are assigned to the given user/contact. However, when assigning a contact to a user and then looking at the user's magic link with that template, the contact is not being returned.
I think it's probably because the assigned_to field is actually using the user ID instead of the contact ID, so that needs to be mapped over before creating the query.
assigned_to
That does look like an issue. One should be the user id The other should be the contact id
When using a magic link template for Listing Sub-assigned contacts, the code (https://github.com/DiscipleTools/disciple-tools-bulk-magic-link-sender/blob/280b3a640fceb46b3767343daf0c0cfc525da2fd/magic-link/magic-link-templates.php#L1352-L1360) seems to indicate that it should also return contacts that are assigned to the given user/contact. However, when assigning a contact to a user and then looking at the user's magic link with that template, the contact is not being returned.
I think it's probably because the
assigned_to
field is actually using the user ID instead of the contact ID, so that needs to be mapped over before creating the query.