Bug 18348 - SHOW_BCODE should be a column of the borrowers table
Summary: SHOW_BCODE should be a column of the borrowers table
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on: 4157
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-29 20:51 UTC by Jonathan Druart
Modified: 2023-09-10 21:12 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2017-03-29 20:51:54 UTC
The SHOW_BCODE is a hidden feature, not translatable and does not exist for all languages.
It sounds like it should be a column of the borrowers table
Comment 1 Katrin Fischer 2020-01-14 10:52:03 UTC
Or maybe it should be deprecated in favor of settings on the category type or a column configuration setting? Not sure hwo granular display stuff like this needs to be.
Comment 2 Caroline Cyr La Rose 2023-03-01 14:46:43 UTC
(In reply to Katrin Fischer from comment #1)
> Or maybe it should be deprecated in favor of settings on the category type
> or a column configuration setting? Not sure hwo granular display stuff like
> this needs to be.

I was leaning in the direction of something in the column settings, but right now, it seems to be set on a individual basis. If we transfer it somewhere, it probably should be somewhere in the patron categories, so as not to change the feature too much for libraries already using it?
Comment 3 Katrin Fischer 2023-04-16 01:49:12 UTC
It would be really interesting to get feedback on this from libraries using it. I think it was introduced with the extended patron attributes, maybe as some kind of example? But I never quite understood the use case.

Maybe we could even do without?
Comment 4 Katrin Fischer 2023-09-10 21:07:32 UTC
I really feel like it is overkill as a per person setting. 

I wonder who is using it?
Comment 5 Katrin Fischer 2023-09-10 21:12:26 UTC
It only seems to affect the items table in the OPAC? Maybe.

opac/opac-user.pl:

use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';

my $show_barcode = Koha::Patron::Attribute::Types->search( # FIXME we should not need this search
    { code => ATTRIBUTE_SHOW_BARCODE } )->count;
if ($show_barcode) {
    my $patron_show_barcode = $patron->get_extended_attribute(ATTRIBUTE_SHOW_BARCODE);
    undef $show_barcode if $patron_show_barcode and not $patron_show_barcode->attribute;
}
$template->param( show_barcode => 1 ) if $show_barcode;