Bug 882770

Summary: RFE: Filter translation units by multiple fields in the editor.
Product: [Retired] Zanata Reporter: Einav Cohen <ecohen>
Component: WebSiteAssignee: Patrick Huang <pahuang>
Status: CLOSED CURRENTRELEASE QA Contact: Damian Jansen <djansen>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.0CC: camunoz, damason, dchen, djansen, mkim, sflaniga, ykatabam, ykaul, zanata-bugs
Target Milestone: ---Keywords: FutureFeature
Target Release: 3.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.4.0-SNAPSHOT (git-server-3.3.1-340-g5c34892) Doc Type: Enhancement
Doc Text:
Story Points: 13
Clone Of: Environment:
Last Closed: 2014-07-17 06:39:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Einav Cohen 2012-12-03 05:00:42 UTC
Description of problem:
When you are within a certain project -> version -> document within Zanata, and you would like to filter the page so it will display only part of the strings, you cannot filter according to the resource-ID of the strings that you would like to see - only according to the value (English strings).

Please add an ability to search string(s) within a document according to resource-ID.

Version-Release number of selected component (if applicable):
Zanata version 2.0.2 (20121030-2357)

Comment 1 Yuko Katabami 2012-12-03 05:14:38 UTC
Please add this option also to project-wide S&R.
Search by resource ID is particularly useful in software translation.
Without this, I have to look into each string, which takes too long.

Comment 10 David Mason 2014-02-26 03:25:24 UTC
# Filter text flows by resid, date and other metadata

Filtering multiple fields with autocomplete, similar to how gmail and zimbra search work.

e.g.

 - focus on empty search field
 - dropdown shows all the available search fields (see "fields" under "Scope:" below)
 - type "last"
 - dropdown shows ["last-modified-after:", "last-modified-before:", "last-modified-by:"], the first is highlighted
 - type <down><down>
   - "last-modified-by:" is highlighted in dropdown
 - type <Enter>
   - search field has "last-modified-by: " and cursor is at the end of the field
 - type a username and press <Enter>
   - editor shows only text flows that were last edited by the specified user, or a message that the username is not recognized (possibly showing similar usernames that will run a search for last-modified-by that username when they are clicked)


## Scope

 - this is just filtering text flows in the editor
 - number of fields that a user can choose from to search: multiple
 - number of fields that a user can search by in a single query: multiple
 - autocomplete: tags (e.g. "last-modified-by:")
 - field names hyphenated (no spaces)
 - text that comes before any field names is treated as source-or-target content
 - fields:
      text: (source or target content, same as we search now)
      resource-id: (exact resource id)
      last-modified-by: (exact username)
      last-modified-before:
      last-modified-after:
      source-comment:
      translation-comment:
      msgctxt:

## Technical notes

 - Want to keep it being backed by database search to avoid adding a lot of hibernate search indexing.
 - Criteria queries could probably be used to deal with the complexity of backend queries that can have an arbitrary number of fields.

Comment 12 Carlos Munoz 2014-03-19 05:09:11 UTC
Secondary: damason@redhat.com

Comment 13 Patrick Huang 2014-05-02 04:48:00 UTC
https://github.com/zanata/zanata-server/pull/426

Comment 14 Ding-Yi Chen 2014-05-05 01:34:06 UTC
Tested with Zanata 3.4.0-SNAPSHOT (git-server-3.3.1-287-gfefe620)
The results are given in https://github.com/zanata/zanata-server/pull/426

Comment 15 Damian Jansen 2014-05-12 06:35:35 UTC
Verified!

Comment 16 Patrick Huang 2014-05-22 00:32:31 UTC
Date format should be ISO 8601 i.e. yyyy-mm-dd