Bug 27239

Summary: FRBRizeEditions is broken
Product: Koha Reporter: Didier Gautheron <didier.gautheron>
Component: TemplatesAssignee: Didier Gautheron <didier.gautheron>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: black23, claire.hernandez, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 27239: Detail templates remove redundant tests
Bug 27239: Detail templates remove redundant test
Bug 27239: Detail templates remove redundant test

Description Didier Gautheron 2020-12-15 10:59:08 UTC
Hi
Even if FRBRizeEditions and OPACFRBRizeEditions are set Editions tab isn't displayed in staff and Opac notices detail.


Test plan:
1 - Set Sysprefs ThingISBN, FRBRizeEditions and OPACFRBRizeEditions
2 - Search for a notice with multiple ISBN in ThingISBN and with some of these
ISBNs in Koha.
Example:
http://www.librarything.com/api/thingISBN/0452254264
In koha imported from LOC ISBN:
0452254264
0198185219
3 - Select one notice
4 - Edition tab is not there.
5 - Apply patch
6 - Redo 2
6 - QED, Edition tab is there.
Comment 1 Didier Gautheron 2020-12-15 11:10:46 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2021-04-15 11:55:43 UTC
Created attachment 119618 [details] [review]
Bug 27239: Detail templates remove redundant test

Template variables FRBRizeEditions and OPACFRBRizeEditions aren't
assigned with syspref values and are redundant anyway. If syspref
FRBRizeEditions or OPACFRBRizeEditions aren't set XISBN is empty.

Test plan:
1 - Set Sysprefs ThingISBN, FRBRizeEditions and OPACFRBRizeEditions
2 - Search for a notice with multiple ISBN in ThingISBN and with some of
    these ISBNs in Koha.
    Example:
    http://www.librarything.com/api/thingISBN/0452254264
    In koha imported from LOC ISBN:
    0452254264
    0198185219
3 - Select one notice
4 - Edition tab is not there.
5 - Apply patch
6 - Redo 2
7 - Edition tab is there.
8 - Unset FRBRizeEditions and OPACFRBRizeEditions
9 - Edition tab isn't there.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Katrin Fischer 2021-04-17 23:32:34 UTC
Created attachment 119806 [details] [review]
Bug 27239: Detail templates remove redundant test

Template variables FRBRizeEditions and OPACFRBRizeEditions aren't
assigned with syspref values and are redundant anyway. If syspref
FRBRizeEditions or OPACFRBRizeEditions aren't set XISBN is empty.

Test plan:
1 - Set Sysprefs ThingISBN, FRBRizeEditions and OPACFRBRizeEditions
2 - Search for a notice with multiple ISBN in ThingISBN and with some of
    these ISBNs in Koha.
    Example:
    http://www.librarything.com/api/thingISBN/0452254264
    In koha imported from LOC ISBN:
    0452254264
    0198185219
3 - Select one notice
4 - Edition tab is not there.
5 - Apply patch
6 - Redo 2
7 - Edition tab is there.
8 - Unset FRBRizeEditions and OPACFRBRizeEditions
9 - Edition tab isn't there.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Jonathan Druart 2021-04-21 08:14:52 UTC
I don't recreate the problem without the patch.
1. Edit biblionumber=1
2. 020 => 0452254264
=> Detail pages (both staff and OPAC) have the "Editions" tab

The sysprefs are passed from C4::Auth
% grep FRBRizeEditions C4/Auth.pm
            FRBRizeEditions                                                            => C4::Context->preference("FRBRizeEditions"),
            OPACFRBRizeEditions                   => C4::Context->preference("OPACFRBRizeEditions"),


Please provide more infos