Bug 31775 - Show opac_info of single library
Summary: Show opac_info of single library
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords: rel_22_11_candidate
Depends on: 29144
Blocks:
  Show dependency treegraph
 
Reported: 2022-10-13 12:52 UTC by Marcel de Rooy
Modified: 2023-12-28 20:43 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Circulation function:


Attachments
Bug 31775: Show single library (1.81 KB, patch)
2022-10-13 14:21 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 31775: Template cleanup (6.54 KB, patch)
2022-10-13 14:21 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 31775: Show single library (1.82 KB, patch)
2022-10-14 10:20 UTC, David Nind
Details | Diff | Splinter Review
Bug 31775: Template cleanup (6.54 KB, patch)
2022-10-14 10:20 UTC, David Nind
Details | Diff | Splinter Review
Bug 31775: Show single library (1.88 KB, patch)
2022-10-15 20:49 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31775: Template cleanup (6.60 KB, patch)
2022-10-15 20:49 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2022-10-13 12:52:45 UTC
When there is only one library, the library list is skipped, but since opac-main does not pass a branch code, you won't see branch info.
Comment 1 Marcel de Rooy 2022-10-13 14:21:46 UTC
Created attachment 141824 [details] [review]
Bug 31775: Show single library

Test plan:
Check both cases: one library (public accessible) and more
libraries (public accessible). In the latter case click on
one of these libraries too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2022-10-13 14:21:50 UTC
Created attachment 141825 [details] [review]
Bug 31775: Template cleanup

Removing unused parts.

Test plan:
See first test plan. Confirm that it still works.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 David Nind 2022-10-13 20:29:49 UTC
I had a go at testing, but struggled to notice any difference - except that for a single library, the library name is linked. No additional information is displayed on the linked page (even if all the library information fields are filling in).

If this is what is expected, I'm happy to sign off.

Testing notes (using koha-testing-docker):

- Needed to batch modify patrons to change their library to the one kept (possibly could have just deleted all patrons).

- Needed to batch modify items for all libraries not kept so that their home library and current library changed to the library kept.

- Not sure how to make a library not publicly accessible, is there some other system preference to change?
  . Changing an existing library: get message "An error occurred when updating this library. Perhaps it already exists."
  . Creating a new library - even if you change public to "No", it saves as public with "Yes".
Comment 4 Marcel de Rooy 2022-10-14 06:02:48 UTC
(In reply to David Nind from comment #3)
> I had a go at testing, but struggled to notice any difference - except that
> for a single library, the library name is linked. No additional information
> is displayed on the linked page (even if all the library information fields
> are filling in).
> 
> If this is what is expected, I'm happy to sign off.

Thx for testing, David. You are correct: my test plan could be more detailed. What we need to do also, is add the opac_info information for a branch via Additional Contents, html cust., OpacLibraryInfo location.
For one library you should see the full info page at once. For more libraries you should see the list first.

Deleting a library should not be needed. Just hiding it via the public flag. I will check if you found a bug there too..

Will comment on a few other points still.
Comment 5 Marcel de Rooy 2022-10-14 07:19:40 UTC
(In reply to David Nind from comment #3)
> Testing notes (using koha-testing-docker):
> 
> - Needed to batch modify patrons to change their library to the one kept
> (possibly could have just deleted all patrons).
Should not be needed when you hide a branch.

> - Needed to batch modify items for all libraries not kept so that their home
> library and current library changed to the library kept.
Same. Not really needed.

> - Not sure how to make a library not publicly accessible, is there some
> other system preference to change?
Go to Admin. Libraries. Edit library. Change public.

>   . Changing an existing library: get message "An error occurred when
> updating this library. Perhaps it already exists."
Cannot reproduce this one. I toggle various libraries from Yes to No and vv.

>   . Creating a new library - even if you change public to "No", it saves as
> public with "Yes".
Yes, good catch. Editing existing libraries works here. But adding a library does not respect the public flag! Opening a new report.
Comment 6 Marcel de Rooy 2022-10-14 07:20:32 UTC
When you have a lot of branches, use SQL:
update branches set public=0;
And set one branch back to Yes.
Comment 7 Marcel de Rooy 2022-10-14 07:50:39 UTC
(In reply to Marcel de Rooy from comment #5)
> >   . Creating a new library - even if you change public to "No", it saves as
> > public with "Yes".
> Yes, good catch. Editing existing libraries works here. But adding a library
> does not respect the public flag! Opening a new report.

Fixed on bug 31785 now.
Comment 8 David Nind 2022-10-14 10:20:27 UTC
Created attachment 141871 [details] [review]
Bug 31775: Show single library

Test plan:
Check both cases: one library (public accessible) and more
libraries (public accessible). In the latter case click on
one of these libraries too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 David Nind 2022-10-14 10:20:32 UTC
Created attachment 141872 [details] [review]
Bug 31775: Template cleanup

Removing unused parts.

Test plan:
See first test plan. Confirm that it still works.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 10 David Nind 2022-10-14 10:25:31 UTC
Testing notes (using koha-testing-docker).

1. I applied bug 31785 (so can toggle Public to No) (Alternative is to use SQL: update branches set public=0; and then set two libraries back to Yes.)

2. Add some additional information to the OPAC page for a library (for example, Centerville) at Tools > Additional tools > HTML customisations > New entry > select OpacLibraryInfo

3. Check the OPAC page for the library to make sure this is visible: OPAC Home > Libraries > [List of Libraries] > click link for Centerville:
- Note that for the list of libraries, each library is linked to an individual page
- On the list of libraries page, the information entered in the Libraries Administration area is displayed
- Note that for the individual library page it includes the information on the listing page, as well as any info entered in step 2

4. Make all other libraries except Centerville not public: Administration > Basic parameters > Libraries:
- Change public to no for all libraries except Centerville (see step 1 for the SQL way to make this change)

5. Visit the OPAC page for the list of libraries: http://127.0.0.1:8080/cgi-bin/koha/opac-library.pl
   . Note that there is no link to the individual Centerville page
   . Note that only the basic library information entered in Administration > Basic parameters > Libraries is displayed
   
6. Apply the patch and refresh the list of libraries page:
   - Note that Centerville is now linked
   - On the individual library page for Centerville you now have the basic information and the information from step 2
Comment 11 Katrin Fischer 2022-10-15 20:49:05 UTC
Created attachment 141933 [details] [review]
Bug 31775: Show single library

Test plan:
Check both cases: one library (public accessible) and more
libraries (public accessible). In the latter case click on
one of these libraries too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2022-10-15 20:49:10 UTC
Created attachment 141934 [details] [review]
Bug 31775: Template cleanup

Removing unused parts.

Test plan:
See first test plan. Confirm that it still works.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Tomás Cohen Arazi (tcohen) 2022-10-17 11:29:02 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!