forked from 2600hz/kazoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix duplication in search view, fix search_by_name missing variable e…
…rror (2600hz#4944) Fixing duplication result issue in search_by_name_and_number view. Previously it set name to pvt_alphanum_name and emit, and also emits another one if the doc.name is defined. Generalized name, first_name and last_name logic in both "search by name and number" and search by name view to do: If either first or last name is defined, sanitize and concatenate them, and store non sanitized one to set in the value part of the result (so UI can show this). If doc has pvt_alphanum_name key use that for name part of the result key. a. else if the name key defined sanitize it and use it for key, and use non sanitized for value b. if all failed and name (from concatenation of the first and last name is empty) is empty use the ID of document. set the value object of whatever found for name, first/last name (if any), or numbers (if any, in name_and_number view). search by name and number is emitting one result for name and for each numbers (if any). 4.2: 2600hz#4945 How To Test Using UI, use search box in account manager, account switch at top bar, use search in advanced callflow. Check the search result using Web Developer tools, the result should not be duplicated.
- Loading branch information
1 parent
dd9b786
commit 4c34944
Showing
2 changed files
with
45 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters