3

I have just upgraded from 4.4 to 4.7.19 and can't seem to identify a certain group of contacts now that the "In honour of" functionality has been subsumed into Soft credits.

When admin processes a membership, if the box "Record Payment from a Different Contact?" is ticked you can record that the payment for the membership was made by someone other than the member and send the receipt to the "other" rather than the member.

This results in the actual contribution being recorded against the "other" contact and a soft credit being recorded for the member.

I need to create a smart group of all the "paid for someone else" contacts for a certain soft credit type.

In Advanced Search with results displayed as contacts, when defining contribution search criteria the options for the Contributions OR Soft Credits? field are:

  • Contributions only
  • Soft credits only
  • Soft credits with related Hard credit
  • Both

(With the last three options a box that lets you specify soft credit type appears.)

Based on the names of the options, my plan was to create groups of contacts from "Soft credits only" and "Soft credits with related Hard credit** searches and use the include/exclude custom search to create the "related hard credit contacts" group. But it doesn't work.

I would have thought Soft credits with related Hard credit should have given me a list of both the contacts getting a soft credit and the contacts who made the contributions that lead to the soft credits. However the results for Soft credits with related Hard credit are the same as the results for Soft credits only AND the results for Both are also the same.

This is true whether I am displaying results as contacts or as contributions.

So, I am not sure how the last three options differ from each other and I am no closer to being able to identify those people/organisations who paid for someone else's membership.

I did look at Search Builder also, but it does not seem to recognize any of the soft credit fields.

Does anyone have any suggestions?

4
  • I spent some time playing with this and to me it's a bug. I dug into the code a bit and see that it creates a temp table that includes both. It looks like the where clause for the query against the temp table should also return contact id's for both; though, of course those built up sql queries can end up with all sorts of things in them.
    – Paul-Tahoe
    Commented May 26, 2017 at 18:08
  • 1
    I have worked out that "Soft credits with related Hard credit" and "Both" searches work as the terms suggest if you don't specify the Soft credit type. Once you specify the soft creidt type they revert to displaying the same results as for "soft Credit only" searches. This is bug IMO. I will create an issue for it. I will post back the issue link when that is done.
    – JoAnne
    Commented May 27, 2017 at 6:38
  • I reopened @JoAnne issue at lab.civicrm.org/dev/core/issues/1055 Commented Jun 18, 2019 at 14:32

2 Answers 2

2

I just published an extension called Soft Credit Custom Fields. As a side effect of what it does, it also allows you to search for soft credit type even when returning hard contributions, which should solve this issue.

0

Note that with SearchKit you can avoid Advanced Search malfunction.

[
  [
    "SavedSearch",
    "save",
    {
      "records": [
        {
          "name": "Fundraisers_P2P",
          "label": "Fundraisers P2P",
          "api_entity": "Contact",
          "api_params": {
            "version": 4,
            "select": [
              "id",
              "sort_name",
              "contact_type:label",
              "contact_sub_type:label",
              "GROUP_CONCAT(DISTINCT Contact_ContributionSoft_contact_id_01.soft_credit_type_id:label) AS GROUP_CONCAT_Contact_ContributionSoft_contact_id_01_soft_credit_type_id_label"
            ],
            "orderBy": [],
            "where": [
              [
                "Contact_ContributionSoft_contact_id_01.soft_credit_type_id:name",
                "=",
                "pcp"
              ]
            ],
            "groupBy": [
              "id"
            ],
            "join": [
              [
                "ContributionSoft AS Contact_ContributionSoft_contact_id_01",
                "INNER",
                [
                  "id",
                  "=",
                  "Contact_ContributionSoft_contact_id_01.contact_id"
                ]
              ]
            ],
            "having": []
          }
        }
      ],
      "match": [
        "name"
      ]
    }
  ]
]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.