Bug 14245 - RIS in unimarc flavour is still deficient
Summary: RIS in unimarc flavour is still deficient
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bernardo Gonzalez Kriegel
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-21 15:41 UTC by jvr
Modified: 2017-06-14 22:05 UTC (History)
4 users (show)

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


Attachments
Detail report (3) is what you get and (4) is what it should be (538.42 KB, image/png)
2015-05-21 15:41 UTC, jvr
Details
Bug 14245: Problems with RIS export in unimarc (2.12 KB, patch)
2015-05-21 17:16 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 14245: Problems with RIS export in unimarc (2.02 KB, patch)
2015-09-16 08:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14245: Problems with RIS export in unimarc (2.16 KB, patch)
2015-09-16 11:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14245: (QA followup) already global (721 bytes, patch)
2015-09-16 14:55 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 (tcohen) 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 (tcohen) 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