mirror of
https://codeberg.org/artfulrobot/contactcats.git
synced 2025-06-25 12:58:05 +02:00
Add category changes to activity custom fields
This commit is contained in:
parent
69d4c6b2e8
commit
96a1483976
1 changed files with 3 additions and 1 deletions
|
@ -22,7 +22,7 @@ class Processor {
|
||||||
|
|
||||||
$this->categories = ContactCategoryDefinition::get(FALSE)
|
$this->categories = ContactCategoryDefinition::get(FALSE)
|
||||||
->addOrderBy('execution_order')
|
->addOrderBy('execution_order')
|
||||||
->execute()->getArrayCopy();
|
->execute()->indexBy('id')->getArrayCopy();
|
||||||
|
|
||||||
// Check the last item is the 'default' one.
|
// Check the last item is the 'default' one.
|
||||||
if ((end($this->categories)['search_type'] ?? '') !== 'default') {
|
if ((end($this->categories)['search_type'] ?? '') !== 'default') {
|
||||||
|
@ -133,6 +133,8 @@ class Processor {
|
||||||
->addValue('source_contact_id', $domainContactID)
|
->addValue('source_contact_id', $domainContactID)
|
||||||
->addValue('status_id:name', 'Completed')
|
->addValue('status_id:name', 'Completed')
|
||||||
->addValue('subject', $subject)
|
->addValue('subject', $subject)
|
||||||
|
->addValue('Category_changes.previous_category_id', $oldCategoryId)
|
||||||
|
->addValue('Category_changes.new_category_id', $newCategoryId)
|
||||||
->execute()->first();
|
->execute()->first();
|
||||||
$activityID = (int) $a['id'];
|
$activityID = (int) $a['id'];
|
||||||
// Join activity to all relevant contacts
|
// Join activity to all relevant contacts
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue