$this->addTask('Add Index to civicrm_contribution.total_amount', 'addIndexContributionAmount');
}
+ /**
+ * Upgrade function.
+ *
+ * @param string $rev
+ */
+ public function upgrade_4_7_4($rev) {
+ $this->addTask('Add Contact Deleted by Merge Activity Type', 'addDeletedByMergeActivityType');
+ }
+
/**
* CRM-16354
*
return TRUE;
}
+ /**
+ * CRM-18124 Add index to civicrm_contribution.total_amount.
+ *
+ * Note that I made this a combined index with receive_date because the issue included
+ * both criteria and they seemed likely to be used in conjunction to me in other cases.
+ *
+ * @param \CRM_Queue_TaskContext $ctx
+ *
+ * @return bool
+ */
+ public function addDeletedByMergeActivityType(CRM_Queue_TaskContext $ctx) {
+ CRM_Core_BAO_OptionValue::ensureOptionValueExists(array(
+ 'option_group_id' => 'activity_type',
+ 'name' => 'Contact Deleted by Merge',
+ 'label' => ts('Contact Deleted by Merge'),
+ 'description' => ts('Contact was merged into another contact'),
+ 'is_active' => TRUE,
+ ));
+ return TRUE;
+ }
+
}
-- for manual contact merge
(@option_group_id_act, '{ts escape="sql"}Contact Merged{/ts}', 51, 'Contact Merged', NULL, 1, NULL, 51, '{ts escape="sql"}Contact Merged{/ts}',0, 1, 1, NULL, NULL),
+ (@option_group_id_act, '{ts escape="sql"}Contact Deleted by Merge{/ts}', 52, 'Contact Deleted by Merge', NULL, 1, NULL, 52, '{ts escape="sql"}Contact was merged into another contact{/ts}',0, 1, 1, NULL, NULL),
-- Activity Type for failed payment
- (@option_group_id_act, 'Failed Payment', 52, 'Failed Payment', NULL, 1, 0, 43, 'Failed Payment', 0, 1, 1, @contributeCompId, NULL),
+ (@option_group_id_act, 'Failed Payment', 53, 'Failed Payment', NULL, 1, 0, 53, 'Failed Payment', 0, 1, 1, @contributeCompId, NULL),
(@option_group_id_gender, '{ts escape="sql"}Female{/ts}', 1, 'Female', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL),
(@option_group_id_gender, '{ts escape="sql"}Male{/ts}', 2, 'Male', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, NULL),