Bug 14245

Summary: RIS in unimarc flavour is still deficient
Product: Koha Reporter: jvr <jvr>
Component: OPACAssignee: Bernardo Gonzalez Kriegel <bgkriegel>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: bgkriegel, jonathan.druart, liz, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14832
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14971
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Detail report (3) is what you get and (4) is what it should be
Bug 14245: Problems with RIS export in unimarc
Bug 14245: Problems with RIS export in unimarc
Bug 14245: Problems with RIS export in unimarc
Bug 14245: (QA followup) already global

Description jvr 2015-05-21 15:41:34 UTC
Created attachment 39360 [details]
Detail report (3) is what you get  and (4) is what it should be

File in cause is:
/usr/share/koha/lib/C4/Ris.pm

RIS in unimarc flavour is still deficient, because the variable $intype is out of scope outside --> sub marc2ris { } , so every other code that references to it render useless in an unimarc flavour where you need to join several fields to output correct information for AU, PY or PB.

In attached image (3) is what you get in the export file, but (4) is what it should be to be totally correct...


For live example data goto:

https://opac.fct.unl.pt/cgi-bin/koha/opac-detail.pl?biblionumber=20049&query_desc=kw%252Cwrdl%253A%252020049

Thank you in antecipation for an early reply.

Victor do Rosário
Especialista de Informática
Divisão de Documentação e Cultura
FCT/UNL
Comment 1 Bernardo Gonzalez Kriegel 2015-05-21 17:16:20 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2015-09-15 16:51:31 UTC
Victor, any chance to get your signoff on this patch?
Comment 3 jvr 2015-09-15 17:06:07 UTC
I already tested it and it works OK!
Comment 4 Jonathan Druart 2015-09-16 08:38:53 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2015-09-16 11:08:31 UTC
Created attachment 42586 [details] [review]
Bug 14245: Problems with RIS export in unimarc

Variable $itype is used an all C4/Ris.pm to switch
between marc falvors, but is local and not passed along
as argument.

As a quick solution, is defined as global

To test:
1) On UNIMARC setup, export a record as RIS,
check that author (and other fields) are displayed
incorrectly

2) Apply the patch

3) Export again, improved results

4) Run t/Ris.t

There are other problems in this script, needs maintenance
(e.g. no Modern::Perl friendly)

Signed-off-by: Victor do Rosário <jvr@fct.unl.pt>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Tomás Cohen Arazi 2015-09-16 14:55:23 UTC
Created attachment 42608 [details] [review]
Bug 14245: (QA followup)  already global

The original patch correctly unmasks the global variable (by
removing the 'my' on the marc2ris function, but wrongly introduces
a new global variable.

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Comment 7 Tomás Cohen Arazi 2015-09-18 15:08:12 UTC
Patch pushed to master.

Thanks Bernardo!
Comment 8 Liz Rea 2015-09-23 01:03:57 UTC
pushed to 3.18.x, will be in 3.18.11.

Also looks like it was pushed to 3.20.x, and included in 3.20.04