Fix 'sleeper-bug' in api.
It turns out that the Activity.create BAO
- deletes the existing source contact for an activity if the param 'source_contact_id' is set
- deletes existing assignee contacts for an activity if the param 'assignee_contact_id' is empty
- deletes existing target contacts for an activity if the param 'target_contact_id' is empty
The v3 api provides some fairly convoluted wrapping to effectively convert is empty
to isset (via 2 params deleteActivityAssignment, deleteActivityTarget which would only
be anything other than true if the relevant value key is not set or we are operating from
the one place in universe that passes in this param (well actually it's true then too
https://github.com/eileenmcnaughton/civicrm_entity/commit/
bd779c19bbf82ca22260615b4f7667d02eee1200
)
The v4 api does no handling and we can expect that on update activity contact records are
likely being lost - ditto with direct BAO calls that were probably QAd at some point but
may have changed over time.
This changes the BAO to treat the assignee & target params the same way as source
- ie do nothing if not set, but empty means to delete them
Remove support for api param deleteActivityAssignment, deleteActivityTarget
I did a universe search & it was only called from one place which
I fixed
https://github.com/eileenmcnaughton/civicrm_entity/commit/
bd779c19bbf82ca22260615b4f7667d02eee1200
- it's never been a tested param so technically not supported
This is part of my effort to fix redundant queries in Activity.create regarding
activity contacts