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/99) Search builder doesn't retain selected (boolean) option after searching #12076

Merged
merged 1 commit into from
May 6, 2018

Conversation

monishdeb
Copy link
Member

@monishdeb monishdeb commented May 3, 2018

Overview

Steps to replicate:

  1. Go to Search Builder
  2. Choose Contact >> Do not email (or any other Boolean field) >> = >> Select Yes
  3. Submit
    See the BEFORE screencast where the select field is replaced by text field with value 1

Before

test-multiple-before

After

test-multiple-after

Technical Details

There was a miss at this condition 3eb318a#diff-5d8eb408e278accc357ed18642ecfc94R246 where we also need to lookup for what value it holds as there might be two kinds of values for CRM.searchBuilder.fieldOptions[field] which is either yesno or entity value like membership, group_contact etc. So we need to ensure that it always a entity string which is used in getoptions API to fetch options for a search field. The patch adds an extra condition for the same reason.

@monishdeb
Copy link
Member Author

ping @lcdservices @colemanw

Copy link
Contributor

@jitendrapurohit jitendrapurohit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and confirmed that the patch fixes the issue on search builder and displays the input correctly after results are displayed.

@seamuslee001
Copy link
Contributor

(CiviCRM Review Template WORD-1.1)

@seamuslee001 seamuslee001 merged commit f62fff1 into civicrm:master May 6, 2018
@monishdeb monishdeb deleted the dev_core_99 branch May 7, 2018 19:22
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