Course materials: ability to limit catalog search results to items on reserve / not on reserve

Bug #1895699 reported by Jane Sandberg
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Committed
Wishlist
Unassigned

Bug Description

Desired behavior: Once a user has done a catalog search in either the Angular Staff Catalog or the Bootstrap OPAC, they should have a way to narrow down the results to titles that are associated with a course (on reserve). Likewise, they should have a way to narrow down the results to titles *not* associated with a course.

Galen has some good suggestions on how to implement this in this comment: https://bugs.launchpad.net/evergreen/+bug/1849212/comments/18

Revision history for this message
Jane Sandberg (sandbergja) wrote :

Branch at user/sandbergja/lp1895699_course_materials_filter
Here's a link: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/sandbergja/lp1895699_course_materials_filter

A test using the concerto data set:
1) In the OPAC, run the following search at BR3: type
2) Note that you get 5 results
3) Run this search at BR3: type on_reserve(6)
4) Note that it's down to 2 results
5) Run this search at BR3: type -on_reserve(6)
6) Note that you get 3 results -- the 3 that were included in step 2 but
   not step 5.

Another test using concerto data set:
1) Ensure that your org is opted in to the Course Materials module,
   and that you don't have an old value of that library setting
   cached.
2) Use the advanced search screen to search for `graphic` at BR3
3) Check that the "Limit to course materials" checkbox works as
   expected.

Changed in evergreen:
importance: Undecided → Wishlist
milestone: none → 3.7-beta
tags: added: pullrequest
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Also, thanks to Galen for suggesting this approach! Much better than the facet shenanigans I tried originally.

Revision history for this message
Michele Morgan (mmorgan) wrote :

I've done some testing of this patch, and a lot of it is looking good!

It's great that the on_reserve filter can be appended to a search url, which provides a great tool for constructing urls to easily retrieve titles on reserve for one org unit, multiple org units, or all.

When circ.course_materials_opt_in is set to TRUE for the consortium the on_reserve filter works great.

If only some org units are opted in to the course module, however, I've found some of the results confusing.

I know the bug description states that the filter would apply after a search, but just a comment that it would be useful to have the "Limit to course materials" checkbox immediately available when I choose my search library.

I also don't see a way via that catalog to limit to titles that are NOT on reserve. Though the ability to craft a url that does that is useful.

One issue I see is that titles not on reserve at my search library can appear in the filtered list.

As an example, say BR1 and BR3 are the only org units that have circ.course_materials_opt_in set to TRUE.

Both BR1 and BR3 own copies of "Ready Player One", but only BR1 has added their copies to their course. When searching for "Ready Player One" in BR3, and applying the on_reserve limit via the checkbox in the catalog, "Ready Player One" appears in the filtered list for BR3 even though it is not on reserve at BR3. My expectation was that the results would include only titles that have BR3 copies on reserve.

Thanks for your work on this, Jane!

Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbej)
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thanks for your testing and helpful feedback, Michele. I'm going to make the changes you suggested -- I may not be in time for the 3.7 feature freeze, so I'm removing the 3.7 target.

Changed in evergreen:
milestone: 3.7-beta → none
Michele Morgan (mmorgan)
tags: added: needsrepatch
removed: pullrequest
tags: added: needswork
removed: needsrepatch
Changed in evergreen:
assignee: Jane Sandberg (sandbergja) → nobody
Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbergja)
Changed in evergreen:
assignee: Jane Sandberg (sandbergja) → nobody
tags: added: pullrequest
removed: needswork
Revision history for this message
Jane Sandberg (sandbergja) wrote :

I've made the following changes:

1. Squashed the commits
2. When a user searches at a particular org and adds the filter, only show items that are on reserve at the location they are currently searching
3. Updated the staff and OPAC searches to allow limiting to items not on reserve
4. Removed the classic OPAC changes, so as to concentrate on the Bootstrap OPAC changes
5. Added a few tests

Let me know what you think!

Changed in evergreen:
milestone: none → 3.10-beta
Michele Morgan (mmorgan)
Changed in evergreen:
assignee: nobody → Michele Morgan (mmorgan)
Revision history for this message
Jennifer Pringle (jpringle-u) wrote :

I really like the idea of this but I think the current behaviour is a little confusing when you have a record with both items attached to a course and items not attached to a course.

Currently a search with Reserves materials set to "Items not attached to a course" will not return results for records that have an item attached to a course, even if there is also an item that is not attached to the course. I think this is the intended behaviour but I wonder if there's a way to word the drop down option differently to make it more clear, maybe "No items attached to a course".

I also wonder if the Reserves material option in the staff catalogue should be controlled by the Search Preferences when a library has the course module turned on. I'm assuming not all staff need to interact with the course materials.

Changed in evergreen:
milestone: 3.10-beta → 3.next
Revision history for this message
Blake GH (bmagic) wrote :

Bugsquash week: merge conflict with two files. I'm going to try my hand at resolving the conflicts.

Revision history for this message
Jane Sandberg (sandbergja) wrote (last edit ):

I just pushed a rebased branch. Thanks for the feedback, Jennifer! I'll plan to put this behind a search preference as you suggested.

For the wording question, I wonder if "Works attached to a course" and "Works not attached to a course" (or "Titles attached to a course") would be clearer in describing the current functionality. I'm also fine with "No items attached to a course".

Michele, I stole this bug back from you to work on the above. :-). Please let me know what you think about the wording options!

Changed in evergreen:
assignee: Michele Morgan (mmorgan) → Jane Sandberg (sandbergja)
Revision history for this message
Jane Sandberg (sandbergja) wrote :

I updated my branch to incorporate Jennifer's recommendations. Thanks, all -- it should be ready for some more review.

Changed in evergreen:
assignee: Jane Sandberg (sandbergja) → nobody
Changed in evergreen:
milestone: 3.next → 3.11-beta
Changed in evergreen:
milestone: 3.11-beta → 3.12-beta
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Rebased this for easier review

Revision history for this message
Terran McCanna (tmccanna) wrote :

Testing notes:

1) In the staff catalog search the new "Reserves materials" isn't aligned nicely with the other elements in that row.

2) In the Bootstrap OPAC the search results page does not indicate that the course results filter is enabled. It would be good to add an indicator (probably along with the "Limit to Available Items" etc. section) for consistency.

Revision history for this message
Terran McCanna (tmccanna) wrote :

3) The new limiter doesn't appear to be playing nicely with the Limit to Available limiter in the staff client.

tags: added: needswork
removed: pullrequest
Changed in evergreen:
status: New → Confirmed
Revision history for this message
Stephanie Leary (stephanieleary) wrote :

Jane, here's a follow-up commit that fixes the form label alignment. However, in fixing that I found that the whole row was overflowing its column and running too close to the basket link, so I've fixed that as well, which necessitated a cascade of other minor class changes. The result is that the Reserves Materials filter is likely to wrap down to another row unless your screen is very large... but it doesn't bump into the basket now.

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/sleary/lp1895699_course_materials_filter_classes

Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbergja)
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thanks, Stephanie -- I really appreciate it! I signed off on your commit, and also made this play nicer with the "Limit to Available" limit in the staff catalog. I will take a look at adding a filter indicator to the bootstrap opac results page tomorrow.

Branch here: user/sandbergja/lp1895699_course_materials_filter_2

Revision history for this message
Jane Sandberg (sandbergja) wrote :

Indicator added to the OPAC search results. I think this is ready for some more review.

Changed in evergreen:
assignee: Jane Sandberg (sandbergja) → nobody
tags: added: pullrequest
removed: needswork
Revision history for this message
Jane Sandberg (sandbergja) wrote :

I should have mentioned: I needed to restart memcache and opensrf to get the indicator to show in the OPAC.

Andrea Neiman (aneiman)
Changed in evergreen:
assignee: nobody → Andrea Neiman (aneiman)
Revision history for this message
Andrea Neiman (aneiman) wrote :

Tested on terran-testbox.gapines.org with various search variables, and it's returning the expected results vis-a-vis courses.

I have tested this code and consent to sign off on it with my name, Andrea Buntz Neiman, and my email <email address hidden>.

tags: added: signedoff
Changed in evergreen:
assignee: Andrea Neiman (aneiman) → nobody
Changed in evergreen:
assignee: nobody → Terran McCanna (tmccanna)
Revision history for this message
Terran McCanna (tmccanna) wrote :

Thanks Jane and Andrea! Fix committed to main for inclusion in 3.12.

Changed in evergreen:
status: Confirmed → Fix Committed
assignee: Terran McCanna (tmccanna) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.