Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-21808 Install custom group for Contribution or ContributioRecur s… #11726

Merged
merged 1 commit into from
Jun 9, 2018

Conversation

scardinius
Copy link
Contributor

@scardinius scardinius commented Feb 27, 2018

…ubtypes based on XML file
https://issues.civicrm.org/jira/browse/CRM-21808

Overview

It will be useful to create custom group by XML file also for subtypes of Contribution or ContributionRecur entities.

Before

It's not possible to properly install custom group for Contribution or ContributionRecur entity with particular subtype (financial type)

After

There is a possibility to create custom group for Contribution or ContributionRecur by *install.xml file or during upgrade step of extension by executeCustomDataFileByAbsPath(./my_contrib_custom.xml).

Technical Details

Add to CustomGroup XML element those options:

<extends_entity_column_value_option_group >FinancialType</extends_entity_column_value_option_group>
<extends_entity_column_value>Donation</extends_entity_column_value> 

@seamuslee001
Copy link
Contributor

pinging @eileenmcnaughton i think you have been doing some custom stuff lately

@eileenmcnaughton
Copy link
Contributor

Hmm this is different to what I was working on - I don't know this code & in particular whether it is a way we are currently encouraging people to set up custom groups - @totten might know!

@eileenmcnaughton
Copy link
Contributor

If we ARE still developing this code then the way to get a list of supported entities rather than to hard-code is

  $nonGenericEntities = array('Contact', 'Individual', 'Household', 'Organization');

  $customFieldEntities = array_diff_key(CRM_Core_SelectValues::customGroupExtends(), array_fill_keys($nonGenericEntities, 1));

@eileenmcnaughton
Copy link
Contributor

I think this code is so marginally supported /used that I either need to say

a) no, we are not accepting changes to it or
b) erm Ok- if you say this helps I'll merge it, taking your word for it.

I'll go with b

@eileenmcnaughton eileenmcnaughton merged commit b344fd6 into civicrm:master Jun 9, 2018
@JoeMurray
Copy link
Contributor

@Monish could you review briefly for any expected impact problems, given @Eileen's reason for merging and lack of substantive review endorsements from others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants