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

dev/core#3675 Fix Permissioned Relationship pseudoconstant #23865

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

colemanw
Copy link
Member

Overview

Fixes dev/core#3675 Permissioned Relationship no longer set up for "On Behalf of Organization" Membership Contribution Form submissions.

Replaces #23863

Before

Pseudoconstant callback used ambiguous flat array which caused several problems.

After

Unambiguous, works in every context.

Technical Details

See notes in #22730 for why this change is needed.

Fixes dev/core#3675 Permissioned Relationship no longer set up
for "On Behalf of Organization" Membership Contribution Form submissions
@civibot
Copy link

civibot bot commented Jun 22, 2022

(Standard links)

@civibot civibot bot added the 5.51 label Jun 22, 2022
@eileenmcnaughton
Copy link
Contributor

This DOES fix it - but is it the ONLY one with the same issue? - or rather - is it one of two?

  public static function emailOnHoldOptions() {
    return [
      '0' => ts('No'),
      '1' => ts('On Hold Bounce'),
      '2' => ts('On Hold Opt Out'),
    ];
  }

@colemanw
Copy link
Member Author

@eileenmcnaughton that other one would be trickier to convert because it's used all over the place:

image

The process of conversion when a callback function is getting called directly is typically to duplicate the function and rename the one being converted and update the name in the xml/DAO.

However, as I mentioned in https://github.com/civicrm/civicrm-core/pull/23863/files/6a76247c80ac66a15bf212a60dea7ca4e7aad5d4#r903460775 I think the fact that the array has a key of 0 is a red-herring. The pseudoconsant code should handle that correctly. The real change has to do with the fact that it no longer treats labels and names as interchangeable, as of #22730.

@eileenmcnaughton
Copy link
Contributor

Ok - I'm still not convinced this won't hit us with other callback-pseudoconstant - but this IS the best fix for this specific pseudoconstant I think so merging

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.

2 participants