Bug 36166 - Disable select to add to list if opacuserlogin is disabled
Summary: Disable select to add to list if opacuserlogin is disabled
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Matthias Le Gac
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on: 36207
Blocks: 36557
  Show dependency treegraph
 
Reported: 2024-02-26 17:22 UTC by Caroline Cyr La Rose
Modified: 2024-07-25 11:15 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the OPAC search results header to remove the "Add to list" option when system preference opacuserlogin is set to "Don't allow". Previously, if you clicked on Add to list > New list, you would get a message saying you needed to be logged in - but you can't.
Version(s) released in:
24.11.00,24.05.02
Circulation function:


Attachments
Bug 36166: Disable select to add to list if opacuserlogin is disabled (3.44 KB, patch)
2024-03-05 20:56 UTC, Matthias Le Gac
Details | Diff | Splinter Review
Bug 36166: Disable select to add to list if opacuserlogin is disabled (3.49 KB, patch)
2024-03-05 22:20 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 36166: Disable select to add to list if opacuserlogin is disabled (3.56 KB, patch)
2024-06-04 12:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Screenshot - Showing empty line with a border for the lists dropdown in the OPAC (119.06 KB, image/png)
2024-07-11 03:46 UTC, David Nind
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2024-02-26 17:22:54 UTC
It seems adding to list is disabled pretty much everywhere in the OPAC when opacuserlogin is disabled. However, there is still the [New list] option in the drop-down in the search results.

To recreate:

1. Disable opacuserlogin
   1.1. Go to Administration > System preferences
   1.2. Search for opacuserlogin
   1.3. Switch to Don't allow
   1.4. Click on Save all OPAC preferences

2. Do a search in the OPAC and try to add to a list
   2.1. Go to the OPAC
   2.2. Enter a search term and press enter (or click the magnifying glass)
        --> Notice that in the search results, there is an option to Select titles to: [New list]
   2.3. Select a title by checking the box
   2.4. Choose With selected titles: [New list]
        --> Message saying you need to be logged in (but you can't)

I think it would be less confusing for patrons if the option wasn't there at all.

I just tried with an "open" list (public; changes from anyone seeing the list) and you still need to log in to add a title to the list. So adding to lists from the dropdown menu should be disabled completely when opacuserlogin is disabled.

To recreate:

1. Create a public list that anyone can change
   1.1. Go to Lists
   1.2. Click on New list
   1.3. Fill out the form:
        - Name: enter a name for the list
        - Public: Public
        - Allow changes to contents from: Anyone seeing this list
   1.4. Click Save

2. Do a search in the OPAC and try to add to the public list
   2.1. Go to the OPAC
   2.2. Enter a search term and press enter (or click the magnifying glass)
   2.3. Select a title by checking the box
   2.4. Choose With selected titles: Name of list
        --> Pop up window saying logging on to the catalog has not been enabled by the library.
Comment 1 Caroline Cyr La Rose 2024-02-26 17:24:49 UTC
I'll need to check once this is corrected if the "Select titles to" disappears completely if opacbookbag is also disabled. The option is not currently in the dropdown, but the dropdown becomes useless if both lists and carts are disabled.
Comment 2 Matthias Le Gac 2024-03-05 20:56:08 UTC
Created attachment 162789 [details] [review]
Bug 36166: Disable select to add to list if opacuserlogin is disabled

Test Plan :

For the [new list] option :
To recreate:
1. Disable opacuserlogin
   1.1. Go to Administration > System preferences
   1.2. Search for opacuserlogin
   1.3. Switch to Don't allow
   1.4. Click on Save all OPAC preferences

2. Do a search in the OPAC and try to add to a list
   2.1. Go to the OPAC
   2.2. Enter a search term and press enter (or click the magnifying glass)
        --> Notice that in the search results, there is an option to Select titles to: [New list]
   2.3. Select a title by checking the box
   2.4. Choose With selected titles: [New list]
        --> Message saying you need to be logged in (but you can't)

To add in a list :
To recreate:
1. Create a public list that anyone can change
   1.1. Go to Lists
   1.2. Click on New list
   1.3. Fill out the form:
        - Name: enter a name for the list
        - Public: Public
        - Allow changes to contents from: Anyone seeing this list
   1.4. Click Save

2. Do a search in the OPAC and try to add to the public list
   2.1. Go to the OPAC
   2.2. Enter a search term and press enter (or click the magnifying glass)
   2.3. Select a title by checking the box
   2.4. Choose With selected titles: Name of list
        --> Pop up window saying logging on to the catalog has not been enabled by the library.
        
1. Apply the patch	
   1.1. Go to the OPAC
   1.2. Enter a search term and press enter (or click the magnifying glass)
   1.3. now you don't see the lists option and [New list] option
   
For information : 
   - if the virtualshelves option is deactivated, this will also remove the display of the above options 
   - if opacbookbag and opacuserlogin are not allow this hide the selector, button and label.
Comment 3 Lucas Gass (lukeg) 2024-03-05 22:20:44 UTC
Created attachment 162794 [details] [review]
Bug 36166: Disable select to add to list if opacuserlogin is disabled

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Katrin Fischer 2024-05-06 09:08:36 UTC
Depends on a patch in PDA - moving to BLOCKED.
Comment 5 David Nind 2024-05-07 06:57:38 UTC
No longer blocked (as far as I can tell).

Patch applies on main.

Changed status back to Signed Off.
Comment 6 Martin Renvoize (ashimema) 2024-06-04 12:21:39 UTC
Created attachment 167395 [details] [review]
Bug 36166: Disable select to add to list if opacuserlogin is disabled

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize (ashimema) 2024-06-04 12:21:56 UTC
Sensible improvement.. Passing QA
Comment 8 Martin Renvoize (ashimema) 2024-06-11 10:56:19 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant
Comment 9 Lucas Gass (lukeg) 2024-07-10 16:53:11 UTC
Backported to 24.05.x for upcoming 24.05.02
Comment 10 David Nind 2024-07-11 03:46:35 UTC
Created attachment 168772 [details]
Screenshot - Showing empty line with a border for the lists dropdown in the OPAC

I think this may need a follow-up bug.

If there are no lists and opacuserlogin is set to "Don't allow":
- in the OPAC there is a Lists menu item in the header (this OK, as you may have public lists)
- when you click on the Lists dropdown, it shows an empty line with a border

I've added a screenshot.

I'm not sure if this is because of this bug, or bug 36557.

Testing
~~~~~~~

If there are no lists and opacuserlogin is set to "Allow":
- In the OPAC there is a Lists menu item in the header, clicking the dropdown shows 'Your lists' and 'Login to create your own lists'
- For search results, there is an 'Add to list' option in the search box, with 'New list' in the dropdown.

If there are no lists and opacuserlogin is set to "Don't allow":
- In the OPAC there is a Lists menu item in the header, clicking the dropdown shows an empty line with a border (not expected).
- For search results, there is no "Add to list" option (as expected).
Comment 11 Owen Leonard 2024-07-15 14:47:37 UTC
(In reply to David Nind from comment #10)
> If there are no lists and opacuserlogin is set to "Don't allow":
>
> - In the OPAC there is a Lists menu item in the header, clicking the
> dropdown shows an empty line with a border (not expected).

I have submitted a patch on Bug 37362 (I think this issue existed before Bug 36166 and Bug 36557)
Comment 12 David Nind 2024-07-16 19:05:37 UTC
(In reply to Owen Leonard from comment #11)
> (In reply to David Nind from comment #10)
> > If there are no lists and opacuserlogin is set to "Don't allow":
> >
> > - In the OPAC there is a Lists menu item in the header, clicking the
> > dropdown shows an empty line with a border (not expected).
> 
> I have submitted a patch on Bug 37362 (I think this issue existed before Bug
> 36166 and Bug 36557)

Thanks Owen! That does fix things.
Comment 13 Fridolin Somers 2024-07-17 14:03:57 UTC
Depends on Bug 36207 not in 23.11.x