[Koha-bugs] [Bug 18433] Allow to select results to export in item search
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Apr 18 09:19:15 CEST 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18433
--- Comment #5 from Julian Maurice <julian.maurice at biblibre.com> ---
(In reply to Jonathan Druart from comment #3)
> Something sounds wrong here, I'd suggest that GetCategoryByKohaField should
> be replaced with Koha::AuthorisedValues->search_by_koha_field->categories,
> do not you think?
I'm not sure, what would be the return value of
Koha::AuthorisedValues->search_by_koha_field('items.barcode') for example ? A
list of the authorised values of the category linked to items.barcode ?
What I want is a single AV category, so for me it makes sense to have a
Koha::AVCategories->findBy... method.
>
> Failing QA because of CamelCase for GetCategoryByKohaField and lack of tests.
>
All Koha::Template::Plugin::* methods are in CamelCase. I think you meant
findByKohaField, right ?
> Note: I did not test but I'd expect
> my @items = Koha::Items->search({ itemnumber => { -in => \@itemnumbers } });
>
> to be faster and easier to read than:
>
> my @items;
> foreach my $itemnumber (@itemnumbers) {
> my $item = Koha::Items->find($itemnumber);
> if ($item) {
> push @items, $item;
> }
> }
Probably, I'm not familiar with the search() parameters yet, that's why I dit
it that way.
(In reply to Jonathan Druart from comment #4)
> You should also use Text::CSV to build the CSV content.
It's not really CSV, just a simple text file with one barcode per line, so
what's the benefit of using Text::CSV ?
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list