Bug 1317766

Summary: Can't remember "component" and "sort result by" search options as the default search options
Product: [Community] Bugzilla Reporter: Hui Wang <huiwang>
Component: Query/Bug ListAssignee: Jeff Fearn 🐞 <jfearn>
Status: CLOSED NEXTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: huiwang, jmcdonal, mtahir, mtyson, qgong
Target Milestone: 5.0   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-16 01:24:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
cache_storage none

Description Hui Wang 2016-03-15 07:12:34 UTC
Description of problem:
Choose some options in advance search page and check the box of "and remember these as my default search options". When I enter the advance search page next time, I found the default search lost "sort result by" and "component" options that I set.

Version-Release number of selected component (if applicable):
version 5.0.2.rh2

How reproducible:
100%

Steps to Reproduce:
1. Enter advance search page
2. Set the conditions(set component, and choose one options of  "sort result by") for your search 
3. Check the box "and remember these as my default search options"

Actual results:
Can't remember "component" and "sort result by" search options as the default search options 

Expected results:
should remember "component" and "sort result by" search options as the default search options 

Additional info:

Comment 1 Hui Wang 2016-04-19 04:01:41 UTC
Verified this issue.
version 5.0.2.rh4

It can remember "component"  but still can't remember "sort result by" search option as the default search options.

Comment 2 Jeff Fearn 🐞 2016-04-19 04:23:15 UTC
(In reply to Hui Wang from comment #1)
> Verified this issue.
> version 5.0.2.rh4
> 
> It can remember "component"  but still can't remember "sort result by"
> search option as the default search options.

hmm DataTables is storing the last sort order you used on the table [1] and post sorting it, so they might conflict.

Can you clear anything out of the html5 storage [2] with a scope of the BZ server you are testing on and refresh the list to see if the order changes to what is expected?

1: https://datatables.net/reference/option/stateSave
2: https://addons.mozilla.org/en-US/firefox/addon/firestorage-plus/

Comment 3 Hui Wang 2016-04-19 08:42:36 UTC
If I clear browsing data, the "sort result by" options is the default option that I set.


One scenario:
A user stored "Bug Number" value for "sort result by" as "my default search options".

In one search, the user changed the search option from "Bug Number" to "Assignee" of "sort result by", but the user didn't saved this as default search options. After this search, the user perform another search. The expected buglist should be sorted by "Bug Number" and not be sorted by "Reuse same sort of last time"("Assignee").

If user want to use the default options of "sort result by", the user have to clear browsing data or reset the "sort result by" to get the expected result.

It's a little unreasonable. So is there any other resolution? 

How about we provide a tip to let users know to keep "sort result by" out of default search options?

Comment 4 Hui Wang 2016-05-04 07:18:56 UTC
Verified the issue.
version 5.0.2.rh5
"Reuse same sort of last time" still always works.

Comment 5 Jeff Fearn 🐞 2016-05-04 22:45:15 UTC
(In reply to Hui Wang from comment #4)
> Verified the issue.
> version 5.0.2.rh5
> "Reuse same sort of last time" still always works.

> Status: ON_DEV → ASSIGNED

Should this be VERIFIED?

Comment 6 Hui Wang 2016-05-05 02:03:08 UTC
(In reply to Jeff Fearn from comment #5)
> (In reply to Hui Wang from comment #4)
> > Verified the issue.
> > version 5.0.2.rh5
> > "Reuse same sort of last time" still always works.
> 
> > Status: ON_DEV → ASSIGNED
> 
> Should this be VERIFIED?

Hi Jeff,

I mean the "Reuse same sort of last time" still works even though I choose the other options in "sort result by" as the default search options.  The "sort result by" still can't associate with the right option as the default search option.

Comment 7 Jeff Fearn 🐞 2016-05-05 02:11:07 UTC
(In reply to Hui Wang from comment #6)
> (In reply to Jeff Fearn from comment #5)
> > (In reply to Hui Wang from comment #4)
> > > Verified the issue.
> > > version 5.0.2.rh5
> > > "Reuse same sort of last time" still always works.
> > 
> > > Status: ON_DEV → ASSIGNED
> > 
> > Should this be VERIFIED?
> 
> Hi Jeff,
> 
> I mean the "Reuse same sort of last time" still works even though I choose
> the other options in "sort result by" as the default search options.  The
> "sort result by" still can't associate with the right option as the default
> search option.

Did you clean out your browser cache and html5 storage?

Comment 8 Hui Wang 2016-05-05 04:05:31 UTC
Created attachment 1154089 [details]
cache_storage

I am not sure I cleaned the cache and storage correctly. Any comment, pls.

Comment 9 Jeff Fearn 🐞 2016-05-05 06:14:44 UTC
Options->Advanced->Network->Cached Web Content "Clear Now"

Install plugin from #2, display firebug, select "FireStorage Plus! tab, delete any data.

Comment 10 Hui Wang 2016-05-05 07:53:06 UTC
(In reply to Jeff Fearn from comment #9)
> Options->Advanced->Network->Cached Web Content "Clear Now"
> 
> Install plugin from #2, display firebug, select "FireStorage Plus! tab,
> delete any data.

1. Set "Bug Number" of "sort result by" as the default search option
2. Options->Advanced->Network->Cached Web Content "Clear Now"
3. Clear local&sessionstorage for current scope in FireStorage Plus! tab of firebug 
4. Go to advance search page

The "Reuse same sort of last time" is still as the default "sort result by" option.


As I said in comment#2, it's a bit unreasonable if the end user needs to do other actions to keep the default option. If we want to keep the "sort result by" in the default option, we should not require end user to do any other actions except to choose one in "sort result by". If we don't want to keep the "sort result by" in default option, it's ok to give some tips/help to let end user know.

The tips like that:

Sort result by:[Reuse same sort of last time]
(This will not as one condition of the default search option, it will be reset to "Reuse same sort of last time")

Comment 11 Jeff Fearn 🐞 2016-05-05 22:13:35 UTC
(In reply to Hui Wang from comment #10)
> (In reply to Jeff Fearn from comment #9)
> > Options->Advanced->Network->Cached Web Content "Clear Now"
> > 
> > Install plugin from #2, display firebug, select "FireStorage Plus! tab,
> > delete any data.
> 
> 1. Set "Bug Number" of "sort result by" as the default search option
> 2. Options->Advanced->Network->Cached Web Content "Clear Now"
> 3. Clear local&sessionstorage for current scope in FireStorage Plus! tab of
> firebug 
> 4. Go to advance search page
> 
> The "Reuse same sort of last time" is still as the default "sort result by"
> option.

Yeah that's how it works in production, it's only a bug if you do another search with "Reuse same sort of last time" and it isn't ordered by what you picked in Step 1.

> 
> As I said in comment#2, it's a bit unreasonable if the end user needs to do
> other actions to keep the default option. If we want to keep the "sort
> result by" in the default option, we should not require end user to do any
> other actions except to choose one in "sort result by". If we don't want to
> keep the "sort result by" in default option, it's ok to give some tips/help
> to let end user know.
> 
> The tips like that:
> 
> Sort result by:[Reuse same sort of last time]
> (This will not as one condition of the default search option, it will be
> reset to "Reuse same sort of last time")

We removed the option so it won't cache the table sort, but since you had loaded the page when it was being cached the cache may have still been there.

Comment 12 Hui Wang 2016-05-12 07:06:45 UTC
I have expressed QE point of view in comment #10. 
But if you just want to keep it same with prod and won't fix the issue at that moment, I can move that to VERIFIED. What's your thought, Mahanmmad?

Comment 13 Muhammad Tahir 2016-05-13 00:28:33 UTC
(In reply to Hui Wang from comment #12)
> I have expressed QE point of view in comment #10. 
> But if you just want to keep it same with prod and won't fix the issue at
> that moment, I can move that to VERIFIED. What's your thought, Mahanmmad?
Move it to verified. Thanks.