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#2139 fix defaulting for multi-select custom fields #18907

Merged
merged 1 commit into from Nov 4, 2020

Conversation

alifrumin
Copy link
Contributor

Overview

Fixes editing defaults for multi-select custom fields so that:

  1. One can select multiple options to be defaulted
  2. The default shows up on backend forms correctly (before there was a bug where on backend forms where edited multi-select custom fields were not displaying the defaults)

See https://lab.civicrm.org/dev/core/-/issues/2139 for more details.

Before

  1. Create a new Multi-Select Field
    Screenshot from 2020-11-02 13-04-47
  2. enter a few options and set one to be the default.
  3. Save the new field
  4. Edit the field options for this field to have a different default.
  5. Go to a form that displays that field on the backend (ex: if the field is on individuals, go to the "New Individual" Form).

EXPECTED RESULT
The field will not show anything defaulted.

After

The default should show correctly (and the user should be able to select multiple options to be defaults)

@civibot
Copy link

civibot bot commented Nov 2, 2020

(Standard links)

@civibot civibot bot added the master label Nov 2, 2020
@colemanw
Copy link
Member

colemanw commented Nov 4, 2020

Thank you so much for the fix @alifrumin!
I reproduced the bug & agree it is a regression.
I've tested this with both single & multi-select fields and both are working correctly thanks to your patch!

@colemanw colemanw merged commit 129e7e2 into civicrm:master Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants