Web client: set default view not sticky

Bug #1724348 reported by Elaine Hardy on 2017-10-17
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
Undecided
Unassigned
3.1
Undecided
Unassigned
3.2
Undecided
Unassigned

Bug Description

For Web client 3.0 Firefox browser 56.0.1 (64-bit)

When views other than OPAC view are set as default view, the selection does not retain in subsequent searches or in subsequent sessions.

Revision history for this message
Kathy Lussier (klussier) wrote :

Confirmed in both Firefox and Chrome.

eg.cat.default_record_tab is being properly set in local storage.

When retrieving a record from the search results screen, it defaults to the OPAC view no matter which view is set as the default. However, if you then refresh the record page, the record is retrieved in the default view as expected. If I retrieve a bib record by ID or click on a title in the client to retrieve the record, the default view is used as expected.

I'm fairly sure this was working as expected when I was testing bug 1708951 last month.

tags: added: regression webstaffclient
Changed in evergreen:
status: New → Confirmed
Revision history for this message
Elaine Hardy (ehardy) wrote :

It was working as expected when I was testing functionality last month as well. (When you refresh a record from a search list, it disassociates from the results -- which is another bug I will be filing)

Revision history for this message
Andrea Neiman (aneiman) wrote :

I went back to a 2.12 test system and confirmed that set-default is working as expected on 2.12.

On a 3.0.0 system, I see the same behavior Kathy notes (including the correct setting in eg.cat.default_record_tab).

Revision history for this message
Andrea Neiman (aneiman) wrote :

(tested on 2.12.1 and 2.12.5, for the record)

Revision history for this message
Elaine Hardy (ehardy) wrote :

Set default view is not sticky in 3.0.2 either but as Kathy and Andrea note, the correct setting is in eg.cat.default_record_tab. Refreshing the record does display it in default view

Revision history for this message
a. bellenir (abellenir) wrote :

what would be correct behavior if i:

* set "holdings view" as the default view
* open a record
* switch to "marc view"
* go back to search results
* and open a new record?

should it load the holdings view (because that's my default) or should it load the marc view (because that's the last tab i had open)?

Revision history for this message
Kathy Lussier (klussier) wrote :

If we're looking at feature parity with the xul client, it looks like it would load in marc view because that's the last view that was used.

In my testing in the xul client, it defaulted to the last view if you stayed in a specific search session. If you go back to search results or even click the Advanced Search link to conduct a new search with totally new results, it would default to the last view.

Once you pick a new action from a client menu (for example, select Search the Catalog from the Search menu instead of using one of the tpac catalog links), the view then falls back to the default that was set by the user. In this example, that would be holdings view.

Revision history for this message
a. bellenir (abellenir) wrote :
tags: added: pullrequest
Revision history for this message
Jennifer Pringle (jpringle-u) wrote :

Tested this on 3.1 and it matches the behaviour we used to see in the xul client.

I have tested this code and consent to signing off on it with my name, Jennifer Pringle, and my email address, <email address hidden>.

tags: added: signedoff
Changed in evergreen:
milestone: none → 3.1.4
Changed in evergreen:
milestone: 3.1.4 → 3.1.5
Changed in evergreen:
milestone: 3.1.5 → 3.1.6
Changed in evergreen:
milestone: 3.1.6 → 3.2.1
Revision history for this message
Dan Wells (dbw2) wrote :

I plan to review this in light of recent changes to bug #1797923 and #1731272, and see if this branch still makes sense, and what else might need to be pulled in from the branch in #1731272, if anything.

Changed in evergreen:
assignee: nobody → Dan Wells (dbw2)
Revision history for this message
Dan Wells (dbw2) wrote :

Here is a minimal branch for the bug as stated:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbwells/lp1724348_honor_default_tab_from_catalog_search

working/user/dbwells/lp1724348_honor_default_tab_from_catalog_search

There are still a few small quirks, but I didn't want those to distract from the fundamental issue, and will open separate bugs for those.

From the commit message:

The default tab selection was not being honored from catalog searches, as the search had already set $scope.record_tab, and we were honoring that value in all cases.

Instead, let's honor that value in cases where the OPAC load doesn't change our current record, which should only happen if we load the record directly to a non-opac tab, then go to the OPAC view.

To test:
1) Set any tab other than "OPAC View" as your default view in record
details.
2) Do a catalog search.
3) Select a record, and notice your default view is not set.
4) Apply patch, do the same steps, and notice the default view is now selected.

To test regression of bug #1708951:
1) In Firefox, load a record directly (e.g. /eg/opac/staff/cat/catalog/record/123).
2) Note the default view loaded.
3) Click "OPAC View".
4) Note the view does not return to your default view, but stays on the OPAC.

Changed in evergreen:
assignee: Dan Wells (dbw2) → nobody
tags: removed: signedoff
Changed in evergreen:
milestone: 3.2.1 → 3.2.2
Revision history for this message
Jason Boyer (jboyer) wrote :

I've checked out Dan's branch above and everything looks good. Signoff is here: http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/jboyer/lp1724348_honor_default_tab_signoff working/user/jboyer/lp1724348_honor_default_tab_signoff

tags: added: signedoff
Dan Wells (dbw2) on 2018-11-07
Changed in evergreen:
milestone: 3.2.2 → 3.3-beta1
assignee: nobody → Dan Wells (dbw2)
assignee: Dan Wells (dbw2) → nobody
status: Confirmed → Fix Committed
Revision history for this message
Dan Wells (dbw2) wrote :

Pushed to master, rel_3_2, and rel_3_1. Thanks for testing, Jason!

Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers