Bug 826772 - Project-wide Search returns wrong results in some cases
Project-wide Search returns wrong results in some cases
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-UI (Show other bugs)
1.6-SNAPSHOT
Unspecified Unspecified
medium Severity medium
: ---
: 1.6.1
Assigned To: David Mason
Ding-Yi Chen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-30 19:18 EDT by Carlos Munoz
Modified: 2012-07-03 01:27 EDT (History)
2 users (show)

See Also:
Fixed In Version: 1.6.1-SNAPSHOT
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-03 01:27:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Carlos Munoz 2012-05-30 19:18:47 EDT
Description of problem:
Project wide search might return incorrect results in some cases. Looks like it's a timing issue with two events being fired near simultaneously.


Version-Release number of selected component (if applicable):
1.6-SNAPSHOT


How reproducible:
Sometimes. Seems to be related to how fast the "case sensitive" checkbox is clicked.


Steps to Reproduce:
1. Go to search and replace for any project.
2. Do a case insensitive search for any word.
3. Change the case of a few letters in the search term and immediately click the "case sesitive" checkbox.
  
Actual results:
The included results are case insensitive.


Expected results:
Only case sensitive results should be included.
Comment 1 David Mason 2012-05-30 19:34:22 EDT
This is caused by a race condition between the blur event on the search text box and the check event on the checkbox.

Possible solutions:
 - provide an explicit 'search' button and don't run searches until it is clicked
 - check for new text in search box before firing a search on case sensitivity change.
Comment 2 David Mason 2012-06-05 04:09:16 EDT
Fixed in 1.6.1 by adding an explicit 'Search' button removing the automatic search update. A new search will now only run when the 'Search' button is pressed, or when Enter is pressed while the search text box has focus.

See https://github.com/zanata/zanata/commit/74da4821be2a5154255073556a64fcfcf2f0affa
Comment 3 Ding-Yi Chen 2012-06-07 00:59:43 EDT
Verified with Zanata version 1.6.1-SNAPSHOT (20120606-0019)

Note You need to log in before you can comment on or make changes to this bug.