Bug 27360 - Libraries should be able to pick which branches display on the public 'Libraries' page
Summary: Libraries should be able to pick which branches display on the public 'Librar...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
: 26834 29479 (view as bug list)
Depends on: 13388
Blocks:
  Show dependency treegraph
 
Reported: 2021-01-07 16:59 UTC by Martin Renvoize
Modified: 2021-12-06 09:01 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This patch adds a new field, `Public` to the definable library information. When enabled, the library details will be displayed in the libraries page on the OPAC.
Version(s) released in:
21.11.00


Attachments
Bug 27360: Add public field to branches table (2.03 KB, patch)
2021-10-27 14:03 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27360: DBIC Build (1.50 KB, patch)
2021-10-27 14:03 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27360: Use 'public' to filter libraries for opac display (5.24 KB, patch)
2021-10-27 14:03 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27360: Use 'public' to filter libraries for opac display (5.89 KB, patch)
2021-10-27 14:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27360: Add public field to branches table (2.09 KB, patch)
2021-10-27 15:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 27360: DBIC Build (1.56 KB, patch)
2021-10-27 15:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 27360: Use 'public' to filter libraries for opac display (5.95 KB, patch)
2021-10-27 15:05 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 27360: Add public field to branches table (2.15 KB, patch)
2021-10-27 15:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 27360: DBIC Build (1.62 KB, patch)
2021-10-27 15:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 27360: Use 'public' to filter libraries for opac display (6.01 KB, patch)
2021-10-27 15:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 27360: Add public field to branches table (2.15 KB, patch)
2021-11-01 08:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27360: DBIC Build (1.62 KB, patch)
2021-11-01 08:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27360: Use 'public' to filter libraries for opac display (6.01 KB, patch)
2021-11-01 08:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27360: (follow-up) Mark public as boolean (824 bytes, patch)
2021-11-01 08:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27360: (follow-up) Add hint (980 bytes, patch)
2021-11-01 11:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27360: Add public field to branches table (2.21 KB, patch)
2021-11-01 11:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27360: DBIC Build (1.67 KB, patch)
2021-11-01 11:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27360: Use 'public' to filter libraries for opac display (6.08 KB, patch)
2021-11-01 11:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27360: (follow-up) Mark public as boolean (881 bytes, patch)
2021-11-01 11:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27360: Add hint to input field (1.04 KB, patch)
2021-11-01 11:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27360: Prevent crash if branchcode does not exist (807 bytes, patch)
2021-11-03 13:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27360: (follow-up) DBRev 21.06.00.041 (914 bytes, patch)
2021-11-15 10:49 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2021-01-07 16:59:23 UTC
With bug 13388 we added a page with details for each library.. problem is, they don't always want to display all the information we display.. or display the libraries page at all.

We should put the display of the whole thing under a system preference, and when enabled we should allow the individual elements for display to be picked optionally.
Comment 1 Martin Renvoize 2021-01-07 17:14:50 UTC
I think we should add a 'public' field to the libraries table.. so you can hide/show whole libraries in this interface.. then perhaps a checkbox for exposing/hiding email address... 

Not so sure about any of the other fields.. to me it wouldn't really make much sense to display a library but hide it's address..
Comment 2 Fridolin Somers 2021-08-04 18:48:08 UTC
+1

Some customers ask to hide some libraries that are not a "real" place.
A "public" or "show in OPAC" flag would be great.
Comment 3 Christopher Brannon 2021-10-21 21:43:23 UTC
+1
Comment 4 Martin Renvoize 2021-10-27 14:03:20 UTC
Created attachment 126997 [details] [review]
Bug 27360: Add public field to branches table
Comment 5 Martin Renvoize 2021-10-27 14:03:24 UTC
Created attachment 126998 [details] [review]
Bug 27360: DBIC Build
Comment 6 Martin Renvoize 2021-10-27 14:03:28 UTC
Created attachment 126999 [details] [review]
Bug 27360: Use 'public' to filter libraries for opac display

This patch adds the ability to set a library as 'public' or not; this
allows librarians to hide back office library branches from the opac.

Test plan
1/ Set a library as public from `admin > libraries`.
2/ Navigate to the `Libraries` page in the OPAC
3/ Note that only `public` libraries are displayed.
Comment 7 Martin Renvoize 2021-10-27 14:10:40 UTC
Created attachment 127000 [details] [review]
Bug 27360: Use 'public' to filter libraries for opac display

This patch adds the ability to set a library as 'public' or not; this
allows librarians to hide back office library branches from the opac.

Test plan
1/ Set a library as public from `admin > libraries`.
2/ Navigate to the `Libraries` page in the OPAC
3/ Note that only `public` libraries are displayed.
Comment 8 Kyle M Hall 2021-10-27 15:04:53 UTC
Created attachment 127007 [details] [review]
Bug 27360: Add public field to branches table

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 9 Kyle M Hall 2021-10-27 15:04:57 UTC
Created attachment 127008 [details] [review]
Bug 27360: DBIC Build

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 10 Kyle M Hall 2021-10-27 15:05:00 UTC
Created attachment 127009 [details] [review]
Bug 27360: Use 'public' to filter libraries for opac display

This patch adds the ability to set a library as 'public' or not; this
allows librarians to hide back office library branches from the opac.

Test plan
1/ Set a library as public from `admin > libraries`.
2/ Navigate to the `Libraries` page in the OPAC
3/ Note that only `public` libraries are displayed.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 11 Kyle M Hall 2021-10-27 15:32:24 UTC
Created attachment 127011 [details] [review]
Bug 27360: Add public field to branches table

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Comment 12 Kyle M Hall 2021-10-27 15:32:38 UTC
Created attachment 127012 [details] [review]
Bug 27360: DBIC Build

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Comment 13 Kyle M Hall 2021-10-27 15:32:53 UTC
Created attachment 127013 [details] [review]
Bug 27360: Use 'public' to filter libraries for opac display

This patch adds the ability to set a library as 'public' or not; this
allows librarians to hide back office library branches from the opac.

Test plan
1/ Set a library as public from `admin > libraries`.
2/ Navigate to the `Libraries` page in the OPAC
3/ Note that only `public` libraries are displayed.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Comment 14 Christopher Brannon 2021-10-27 15:35:47 UTC
(In reply to Martin Renvoize from comment #1)
> I think we should add a 'public' field to the libraries table.. so you can
> hide/show whole libraries in this interface.. then perhaps a checkbox for
> exposing/hiding email address... 

E-mail does not seem to be revealed in general.  Nothing in this patch touches e-mail addresses as an option to hide OR reveal.
Comment 15 Martin Renvoize 2021-10-27 15:40:08 UTC
Blimey.. I wasn't expecting that one to move so quickly!

I kept it simple to start with by just adding the proposed 'public' flag.  Do you think email is the only field that would need to be optionally hidden on top of this?
Comment 16 Christopher Brannon 2021-10-27 15:48:23 UTC
As far as I can see, e-mails don't even show.  I checked our production server on 20.05, and I don't see it in master.  Since it was mentioned in the original description to be able to allow individual elements, and another comment mentioning the e-mail specifically, I thought it would be wise to address.  I like the patch as is.  I think if someone wants to reveal the e-mail address, it could be addressed in another patch.  I would just state that individual elements are not going to be addressed in this bug.
Comment 17 Katrin Fischer 2021-10-31 01:20:13 UTC
Some problems noted by the QA script, can you please fix?

 FAIL	installer/data/mysql/atomicupdate/bug_27360.pl
   OK	  critic
   FAIL	  file permissions
		File must have the exec flag
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  pod
   OK	  spelling
   OK	  valid

 FAIL	installer/data/mysql/kohastructure.sql
   OK	  boolean_vs_tinyint
   OK	  charset_collate
   OK	  git manipulation
   FAIL	  tinyint_has_boolean_flag
		The new column branches.public is using TINYINT(1) as type but is not defined as boolean in the schema file (Koha/Schema/Result/Branch.pm), see the SQL12 coding guideline
Comment 18 Martin Renvoize 2021-11-01 08:22:53 UTC
Created attachment 127144 [details] [review]
Bug 27360: Add public field to branches table

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Comment 19 Martin Renvoize 2021-11-01 08:22:57 UTC
Created attachment 127145 [details] [review]
Bug 27360: DBIC Build

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Comment 20 Martin Renvoize 2021-11-01 08:23:00 UTC
Created attachment 127146 [details] [review]
Bug 27360: Use 'public' to filter libraries for opac display

This patch adds the ability to set a library as 'public' or not; this
allows librarians to hide back office library branches from the opac.

Test plan
1/ Set a library as public from `admin > libraries`.
2/ Navigate to the `Libraries` page in the OPAC
3/ Note that only `public` libraries are displayed.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Comment 21 Martin Renvoize 2021-11-01 08:23:04 UTC
Created attachment 127147 [details] [review]
Bug 27360: (follow-up) Mark public as boolean
Comment 22 Martin Renvoize 2021-11-01 08:23:41 UTC
Thanks Kyle, all fixed :)

Thanks for the quick testing everyone, glad the email field wasn't a blocker. :)
Comment 23 Katrin Fischer 2021-11-01 11:15:43 UTC
While I am testing this: I am not sure about using "Public" to describe this feature as it only affects the  libraries page in the OPAC right now. I think we should at least add a hint about what it really does to the input/edit form for libraries.
Comment 24 Martin Renvoize 2021-11-01 11:21:14 UTC
Created attachment 127158 [details] [review]
Bug 27360: (follow-up) Add hint
Comment 25 Katrin Fischer 2021-11-01 11:27:02 UTC
Created attachment 127159 [details] [review]
Bug 27360: Add public field to branches table

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 26 Katrin Fischer 2021-11-01 11:27:07 UTC
Created attachment 127160 [details] [review]
Bug 27360: DBIC Build

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 27 Katrin Fischer 2021-11-01 11:27:11 UTC
Created attachment 127161 [details] [review]
Bug 27360: Use 'public' to filter libraries for opac display

This patch adds the ability to set a library as 'public' or not; this
allows librarians to hide back office library branches from the opac.

Test plan
1/ Set a library as public from `admin > libraries`.
2/ Navigate to the `Libraries` page in the OPAC
3/ Note that only `public` libraries are displayed.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 28 Katrin Fischer 2021-11-01 11:27:15 UTC
Created attachment 127162 [details] [review]
Bug 27360: (follow-up) Mark public as boolean

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 29 Katrin Fischer 2021-11-01 11:27:19 UTC
Created attachment 127163 [details] [review]
Bug 27360: Add hint to input field

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 30 Jonathan Druart 2021-11-03 13:38:58 UTC
We could think it will hide them from Hea, but it won't!
Comment 31 Jonathan Druart 2021-11-03 13:39:34 UTC
Created attachment 127253 [details] [review]
Bug 27360: Prevent crash if branchcode does not exist
Comment 32 Martin Renvoize 2021-11-03 13:52:52 UTC
(In reply to Jonathan Druart from comment #30)
> We could think it will hide them from Hea, but it won't!

Does the hint not help enough with that?
Comment 33 Jonathan Druart 2021-11-03 14:13:30 UTC
(In reply to Martin Renvoize from comment #32)
> (In reply to Jonathan Druart from comment #30)
> > We could think it will hide them from Hea, but it won't!
> 
> Does the hint not help enough with that?

I guess it does. But a "non public library" could have their info shared with Hea.

I just wanted to highlight it, not requested something :)
Comment 34 Jonathan Druart 2021-11-03 14:30:24 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 35 Jonathan Druart 2021-11-15 10:48:06 UTC
*** Bug 29479 has been marked as a duplicate of this bug. ***
Comment 36 Jonathan Druart 2021-11-15 10:49:11 UTC
Created attachment 127629 [details] [review]
Bug 27360: (follow-up) DBRev 21.06.00.041
Comment 37 Jonathan Druart 2021-11-15 11:42:01 UTC
(In reply to Jonathan Druart from comment #36)
> Created attachment 127629 [details] [review] [review]
> Bug 27360: (follow-up) DBRev 21.06.00.041

Pushed to master.
Comment 38 Holly 2021-12-06 09:01:06 UTC
*** Bug 26834 has been marked as a duplicate of this bug. ***