Bug 598625

Summary: suggestion selection fails when performing mid-token expression replacement
Product: [Other] RHQ Project Reporter: Joseph Marques <jmarques>
Component: Core UIAssignee: Joseph Marques <jmarques>
Status: CLOSED CURRENTRELEASE QA Contact: Sunil Kondkar <skondkar>
Severity: medium Docs Contact:
Priority: low    
Version: 3.0.0CC: cwelton
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-12 16:50:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joseph Marques 2010-06-01 18:19:51 UTC
Description of problem:

A search expression is made up of several search tokens.  Frequently, a user will be asking for completions with the cursor naturally positioned at the end of a token.  However, sometimes a user will reposition the cursor in the middle of a token and ask for suggestions from that point on.  If the user selects one of the suggestions, it should replace the entire token properly, not just the part before the cursor.

How reproducible:

Every time.

Steps to Reproduce:
1. Enter "cod" into the SearchBar for resources
2. Suggestion should be "Code Cache"
3. Use the mouse to position the cursor between 'o' and 'd'
4. You'll see suggestions like configuration, connection, agent plugin container, etc etc
5. Select "connection["
  
Actual results:

The expression is replaced as "connection[d"

Expected results:

The expression should be replaced as "connection["

Additional info:

Comment 1 Joseph Marques 2010-06-01 18:36:30 UTC
commit fc9d0ea7d906573a6529c57dceb26c950fe5cbbd
Author: Joseph Marques <joseph>
Date:   Tue Jun 1 14:30:27 2010 -0400

BZ-598625: properly replace entire current search token with provided suggestion

Comment 2 Corey Welton 2010-06-07 12:34:53 UTC
Grabbing this bz since I was actually making use of search functionality this AM.  That said, we should still have a test case for this if we don't already -- i.e., it should exist in a test run.

QA Verified - when relocating cursor to middle of string, the suggestion appears correctly and when selected, the appropriate information is chosen for search box.

Comment 3 Corey Welton 2010-08-12 16:50:07 UTC
Mass-closure of verified bugs against JON.