Bug 803538 - Search remains "active" after opening new file
Search remains "active" after opening new file
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-UI (Show other bugs)
1.5
Unspecified Linux
unspecified Severity medium
: ---
: 1.6-beta-1
Assigned To: David Mason
Joyce Chang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-14 19:40 EDT by Hedda Peters
Modified: 2013-03-03 22:19 EST (History)
5 users (show)

See Also:
Fixed In Version: Zanata version 1.6.0-beta-2-SNAPSHOT (20120518-0026).
Doc Type: Bug Fix
Doc Text:
Cause "Source and Target" searches within a document are stored in the history token. When a new document is loaded, the search in the history token was not updated. Consequence Searches within one document remain active when a new document is loaded. If the search returns no results in the new document, this can interact with a known issue in which the search box is hidden when loading a new document to make clearing of the search impossible without manipulating the URL. Fix "Source and Target" searches are now cleared from the history token when loading a different document. Result No "Source and Target" search will be active when loading a new document.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-21 20:58:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Showing file B, missing search box (FF 3.1) (181.83 KB, image/png)
2012-03-14 19:42 EDT, Hedda Peters
no flags Details

  None (edit)
Description Hedda Peters 2012-03-14 19:40:56 EDT
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1

The search criteria entered into the search box in the workspace of a file does not get cleared automatically when leaving this file and opening a new one. The new file therefore also only shows messages matching the search criteria entered in the old file. 

Reproducible: Always

Steps to Reproduce:
1. Open file A
2. Type in a word "something" in search box, hit enter. 
3. Go back to document list
4. Open file B
Actual Results:  
The search for word "something" is still active when opening file B, hence only showing messages that contain a match for this search criteria.

Expected Results:  
All messages should be displayed in file B. The search should have been cleared automatically when leaving file A.

Francesco (using FF 3.1) also reported that in file B the search box is not even displayed any more (see screenshot). Hence he had no way of clearing the search criteria.
For myself (using FF 9.0.1) the search box in file B is displayed fine, showing the search criteria I entered in file A. I think the search criteria should not be carried through to the next file though.
Comment 1 Hedda Peters 2012-03-14 19:42:44 EDT
Created attachment 570135 [details]
Showing file B, missing search box (FF 3.1)
Comment 2 David Mason 2012-05-17 04:04:10 EDT
Source-and-target search is now cleared when a new document is selected.

See: https://github.com/zanata/zanata/commit/875c83df0894b426c91be35436fe05efaadd8387
Comment 3 Joyce Chang 2012-05-17 22:57:53 EDT
verified with Zanata version 1.6.0-beta-2-SNAPSHOT (20120518-0026).
Comment 4 David Mason 2012-06-05 22:45:57 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
"Source and Target" searches within a document are stored in the history token. When a new document is loaded, the search in the history token was not updated.

Consequence
Searches within one document remain active when a new document is loaded. If the search returns no results in the new document, this can interact with a known issue in which the search box is hidden when loading a new document to make clearing of the search impossible without manipulating the URL.

Fix
"Source and Target" searches are now cleared from the history token when loading a different document.

Result
No "Source and Target" search will be active when loading a new document.

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