Bug 24364

Summary: Display item holding library in opac issues
Product: Koha Reporter: Matthias Meusburger <matthias.meusburger>
Component: OPACAssignee: Matthias Meusburger <matthias.meusburger>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, katrin.fischer, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 24364: Display item holding library in opac issues
Nice enchancement, thanks Matts!
Bug 24364: Display item holding library in opac issues
Bug 24364: Display item holding library in opac issues

Description Matthias Meusburger 2020-01-07 13:53:59 UTC
Be able to display the item's holding library in OPAC issues.
Comment 1 Matthias Meusburger 2020-01-07 14:01:30 UTC
Created attachment 96894 [details] [review]
Bug 24364: Display item holding library in opac issues

Test plan:

 1) Create a SHOW_LIB patron attribute type, with YES_NO as authorized value category.
    (Administration -> Patron attribute types -> New patron attribute type)
    Check 'Display in OPAC' and 'Editable in OPAC' if you want users to be able to
    toggle library display themselves.

 2) Set the SHOW_LIB attribute to yes for a given patron.

 3) Check that the library is displayed in this patron's opac issues.
    ('Your summary' -> 'Checked out' and 'Overdue' tabs)
Comment 2 Lucas Gass 2020-01-09 23:43:32 UTC
Created attachment 97145 [details] [review]
Nice enchancement, thanks Matts!

Bug 24364: Display item holding library in opac issues

Test plan:

 1) Create a SHOW_LIB patron attribute type, with YES_NO as authorized value category.
    (Administration -> Patron attribute types -> New patron attribute type)
    Check 'Display in OPAC' and 'Editable in OPAC' if you want users to be able to
    toggle library display themselves.

 2) Set the SHOW_LIB attribute to yes for a given patron.

 3) Check that the library is displayed in this patron's opac issues.
    ('Your summary' -> 'Checked out' and 'Overdue' tabs)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 3 Jonathan Druart 2020-01-13 16:34:22 UTC
Should not this be added to the .sql installer files?
Comment 4 Katrin Fischer 2020-01-14 07:20:02 UTC
I wonder if this should really be a per patron setting or not be using column configuration on the table that the library can decide on? Adding this might make it harder to convert later.
Comment 5 Matthias Meusburger 2020-01-14 10:12:21 UTC
This development uses SHOW_LIB in the same manner that Bug 4157 uses SHOW_BCODE.

So I think SHOW_LIB should be added in patron_attributes.sql and patron_attributes.txt but not in installer.sql
What is your opinion on this Jonathan ?

Katrin, I made this dev in a way that is consistant with a similar setting, that is SHOW_BCODE from Bug 4157, but I'm open-minded about how it should be configured.
When you say "[..] using column configuration on the table", can you be more explicit? What are you exactly referring to? Are there other settings already using what you are referring to?
Comment 6 Katrin Fischer 2020-01-14 10:29:58 UTC
(In reply to Matthias Meusburger from comment #5)
> This development uses SHOW_LIB in the same manner that Bug 4157 uses
> SHOW_BCODE.
> 
> So I think SHOW_LIB should be added in patron_attributes.sql and
> patron_attributes.txt but not in installer.sql
> What is your opinion on this Jonathan ?
> 
> Katrin, I made this dev in a way that is consistant with a similar setting,
> that is SHOW_BCODE from Bug 4157, but I'm open-minded about how it should be
> configured.
> When you say "[..] using column configuration on the table", can you be more
> explicit? What are you exactly referring to? Are there other settings
> already using what you are referring to?

Hi Matthias, I know about SHOW_BCODE, but always get the impression that it's confusing to people and not so helpful. For example you can't really set a default for patron attributes, so you'd have to turn it on for every single one, if a library wants this as a general default. I don't think putting it on the patron is ideal and they won't expect it on the details page. When SHOW_BCODE was added, it was not even possible yet for a patron to change these settings in the OPAC. It feels like these features are not well suited to work on top of the patron attributes system. It feels a bit hacky.
Comment 7 Jonathan Druart 2020-01-14 10:42:22 UTC
As we have bug 18348, I think Katrin is correct.
Comment 8 Matthias Meusburger 2020-01-14 14:44:20 UTC
So you're suggesting a proper column in the borrowers table and in the categories table, in order for this setting to be editable at both category-level and user-level, is that right?
Comment 9 Katrin Fischer 2020-01-14 21:06:29 UTC
Actually my suggesting would be to check if this is needed on patron level or could be a global setting - and then throw a colvis table configuration at that table :)
Comment 10 Owen Leonard 2020-01-15 13:33:20 UTC
(In reply to Katrin Fischer from comment #9)
> or could be a global setting - and then throw a colvis table configuration
> at that table :)

I agree that this change could be made without any patron-level limitations. I don't even think the column configuration is necessary.
Comment 11 Matthias Meusburger 2020-01-15 14:08:11 UTC
Okay, I'll submit an update with an on-off syspref then. Thanks for the feedback.
Comment 12 Owen Leonard 2020-01-15 17:14:09 UTC
(In reply to Matthias Meusburger from comment #11)
> Okay, I'll submit an update with an on-off syspref then. Thanks for the
> feedback.

I don't even think this needs a syspref. In my opinion it's relevant information to show.
Comment 13 Matthias Meusburger 2020-01-16 08:28:32 UTC
Created attachment 97431 [details] [review]
Bug 24364: Display item holding library in opac issues

Test plan:

 Check that the library is displayed in patrons opac issues.
 ('Your summary' -> 'Checked out' and 'Overdue' tabs)
Comment 14 Owen Leonard 2020-01-16 13:14:37 UTC
Created attachment 97440 [details] [review]
Bug 24364: Display item holding library in opac issues

Test plan:

 Check that the library is displayed in patrons opac issues.
 ('Your summary' -> 'Checked out' and 'Overdue' tabs)


Current status: Signed Off
Comment 15 Katrin Fischer 2020-01-19 21:53:02 UTC
(In reply to Owen Leonard from comment #14)
> Created attachment 97440 [details] [review] [review]
> Bug 24364: Display item holding library in opac issues
> 
> Test plan:
> 
>  Check that the library is displayed in patrons opac issues.
>  ('Your summary' -> 'Checked out' and 'Overdue' tabs)
> 
> 
> Current status: Signed Off

Hi Owen, the patch is missing your sign-off line - did something go wrong here?
Comment 16 Jonathan Druart 2020-02-05 11:39:52 UTC
Please use the Branches TT plugin instead (Branches.GetName).
Comment 17 Jonathan Druart 2020-02-05 11:41:30 UTC
Also I bet that this column does not make sense if IndependentBranches or singleBranchMode is set.
Comment 18 Katrin Fischer 2020-02-05 13:27:48 UTC
It would be really nice if it could be hidden automatically for single branches or using the column configuration settings. We have similar checks for single branches in multiple places. I don't think IndependentBranches is a problem - you could still check otu items from different branches or get them via holds.