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#2488 - When setting default optionValue, limit query to specified domain #19970

Merged
merged 1 commit into from
Apr 6, 2021

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Apr 5, 2021

Overview

Fixes issue https://lab.civicrm.org/dev/core/-/issues/2488 by constraining query by domain when bulk-updating the default optionValue in an optionGroup.

@civibot
Copy link

civibot bot commented Apr 5, 2021

(Standard links)

@civibot civibot bot added the master label Apr 5, 2021
@colemanw
Copy link
Member Author

colemanw commented Apr 6, 2021

Testing from martin.w on gitlab:

I've merged your changes to my CRM/Core/BAO/OptionValue.php and tried a couple manual tests which passed:

  • OptionValue.create option_group_id=from_email_address is_default=1 ... for a specific domain ==> adds a new option_value record which becomes the default for the specified domain only. All other domain is_default values are unchanged.
  • OptionValue.create id={prior_record_ID} is_default=1 for the same domain ==> The record with id={prior_record_ID} becomes the is_default = 1 record for the specified domain. All other domain is_default values are unchanged.

Looks all good to go to me. Incidentally, I tested with cv api (i.e. APIv3) since that's what I had previously scripted.

@eileenmcnaughton
Copy link
Contributor

Merging based on gitlab feedback

@eileenmcnaughton eileenmcnaughton merged commit a615bf3 into civicrm:master Apr 6, 2021
@eileenmcnaughton eileenmcnaughton deleted the optionValueDomain branch April 6, 2021 21:26
colemanw added a commit to colemanw/civicrm-core that referenced this pull request Nov 18, 2021
colemanw added a commit to colemanw/civicrm-core that referenced this pull request Nov 18, 2021
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