Page MenuHomePhabricator

Corporate Gift selection for Engage instance
Closed, ResolvedPublic1 Estimated Story Points

Description

Hi All, as discussed today, could you look into giving the Engage instance access to selecting Corporate Gift as an option under Gift Data?

Thank you!

Event Timeline

@LeanneS Ok so I found a chunk of code that seems relevant. The key part is

$allowed_sources = array(
  'Combined Federal Campaign',
  'Benefactor Gift',
  'Community Gift',
  'Donor Advised Fund',
  'Matching Gift',
  'Payroll Deduction',
);

Does that look like the limitation that is problematic - and if so should we
a) add another type / types to the list or
b) remove the restriction altogher

// Gift Source (sic field named "Campaign") is limited.
$gift_source_field_name = wmf_civicrm_evil_get_custom_field_in_form('Campaign', $fields);
if ($gift_source_field_name) {
  $allowed_sources = array(
    'Combined Federal Campaign',
    'Benefactor Gift',
    'Community Gift',
    'Donor Advised Fund',
    'Matching Gift',
    'Payroll Deduction',
  );
  if (!in_array($fields[$gift_source_field_name], $allowed_sources)) {
    $errors[$gift_source_field_name] = t('Must choose a Gift Source from the following list: ') . implode(', ', $allowed_sources);
  }
}

That makes sense. Could we add in Corporate Gift to the code? I also don't think we really need the restriction.

@LeanneS I can remove it entirely if we don't need it

Change 456046 had a related patch set uploaded (by Eileen; owner: Eileen):
[wikimedia/fundraising/crm@master] Remove gift source restriction for Engage

https://gerrit.wikimedia.org/r/456046

Change 456046 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Remove gift source restriction for Engage

https://gerrit.wikimedia.org/r/456046