Bug 13904 - unimarc_field_4XX plugin - Add display of volume info and link to biblio record
Summary: unimarc_field_4XX plugin - Add display of volume info and link to biblio record
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Frédéric Demians
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-25 12:39 UTC by Frédéric Demians
Modified: 2016-06-21 21:39 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:


Attachments
Bug 13904 unimarc_field_4XX plugin doesn't display volume info, neither link to biblio (2.96 KB, patch)
2015-03-25 12:47 UTC, Frédéric Demians
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13904: unimarc_field_4XX plugin doesn't display volume info, neither link to biblio (3.30 KB, patch)
2015-05-16 18:33 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 13904: Make unimarc_field_4XX displays usefull 200 subfield data (5.00 KB, patch)
2015-05-26 16:26 UTC, Frédéric Demians
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13904: Make unimarc_field_4XX displays usefull 200 subfield data (5.14 KB, patch)
2015-06-02 15:05 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 13904: Make unimarc_field_4XX displays usefull 200 subfield data (4.04 KB, patch)
2015-06-18 09:51 UTC, Frédéric Demians
Details | Diff | Splinter Review
Bug 13904: Make unimarc_field_4XX displays usefull 200 subfield data (4.11 KB, patch)
2015-06-18 14:57 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Demians 2015-03-25 12:39:26 UTC
When searching for multivolumes titles, UNIMARC 4xx field plugin displays the title of the biblios (200$a), without giving info about volumes (200 $h $i).

The displayed title is supposed to link to a biblio record view (MARC / normal). It doesn't work.
Comment 1 Frédéric Demians 2015-03-25 12:47:19 UTC Comment hidden (obsolete)
Comment 2 Bernardo Gonzalez Kriegel 2015-05-16 18:33:25 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-05-26 11:50:18 UTC
Frédéric,
I get the link, but not 200$h$i
Could you please detail where volume is mapped with them?
Comment 4 Frédéric Demians 2015-05-26 14:25:48 UTC
(In reply to Jonathan Druart from comment #3)
> Frédéric,
> I get the link, but not 200$h$i
> Could you please detail where volume is mapped with them?

It isn't... And, as you know, it can't be mapped to 2 distinct biblio record subfields. With this patch, biblioitems.volume is displayed after title. The goal is to disambiguate search results. By default, biblioitems.volume is mapped to 200$e (complément du titre). But in some installations, it can be mapped to $h or $i at convenience. If you think it's limiting, I could propose a counter patch displaying $a, $h, and $i.
Comment 5 Jonathan Druart 2015-05-26 15:25:06 UTC
(In reply to Frédéric Demians from comment #4)
> (In reply to Jonathan Druart from comment #3)
> > Frédéric,
> > I get the link, but not 200$h$i
> > Could you please detail where volume is mapped with them?
> 
> It isn't... And, as you know, it can't be mapped to 2 distinct biblio record
> subfields.

I just tried to understand your patch :)
It only adds "resul.volume" to the TT, and I don't see any places where 200$h or $i could be assigned to resul.volume.

From the test plan:
"- You get a result list, with two issues:
  1. $h & $i aren't displayed"
Is this wrong? If not, I don't understand how I could see them displayed.
Comment 6 Frédéric Demians 2015-05-26 15:38:02 UTC
> From the test plan:
> "- You get a result list, with two issues:
>   1. $h & $i aren't displayed"
> Is this wrong? If not, I don't understand how I could see them displayed.

It's wrong. See my above comment.
Comment 7 Jonathan Druart 2015-05-26 16:14:32 UTC
So please provide a valid test plan.
Comment 8 Frédéric Demians 2015-05-26 16:26:52 UTC Comment hidden (obsolete)
Comment 9 Bernardo Gonzalez Kriegel 2015-06-02 15:05:22 UTC Comment hidden (obsolete)
Comment 10 Jonathan Druart 2015-06-16 10:16:34 UTC
Comment on attachment 39772 [details] [review]
[SIGNED-OFF] Bug 13904: Make unimarc_field_4XX displays usefull 200 subfield data

Review of attachment 39772 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt
@@ +174,5 @@
> +                                                    [% IF ( resul.publishercode ) %]- [% resul.publishercode %][% END %]
> +                                                    [% IF ( resul.place ) %] ; [% resul.place %][% END %]
> +                                                    [% IF ( resul.pages ) %] - [% resul.pages %][% END %]
> +                                                    [% IF ( resul.notes ) %] : [% resul.notes %][% END %]
> +                                                    [% IF ( resul.size ) %] ; [% resul.size %][% END %]

These lines remove the changes introduced by bug 13129, is it expected?
Comment 11 Frédéric Demians 2015-06-18 08:26:31 UTC
(In reply to Jonathan Druart from comment #10)
> Comment on attachment 39772 [details] [review] [review]
> [SIGNED-OFF] Bug 13904: Make unimarc_field_4XX displays usefull 200 subfield
> data
> 
> Review of attachment 39772 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> :::
> koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/
> unimarc_field_4XX.tt
> @@ +174,5 @@
> > +                                                    [% IF ( resul.publishercode ) %]- [% resul.publishercode %][% END %]
> > +                                                    [% IF ( resul.place ) %] ; [% resul.place %][% END %]
> > +                                                    [% IF ( resul.pages ) %] - [% resul.pages %][% END %]
> > +                                                    [% IF ( resul.notes ) %] : [% resul.notes %][% END %]
> > +                                                    [% IF ( resul.size ) %] ; [% resul.size %][% END %]
> 
> These lines remove the changes introduced by bug 13129, is it expected?

Do you mean the last line? => result.size
Comment 12 Jonathan Druart 2015-06-18 08:54:50 UTC
commit c4095f55ad98cad41a546654fdc8829110599575
    Bug 13129 - HTML and JS escapes missing in unimarc_field_4XX.tt

-                                                                    <a_class="transparent resultlist" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% resul.biblionumber |url %]">[% resul.title |html %]<
-                                                    <p>[% resul.author %]
-                                                    [% IF ( resul.publishercode ) %]- [% resul.publishercode %][% END %]
-                                                    [% IF ( resul.place ) %] ; [% resul.place %][% END %]
-                                                    [% IF ( resul.pages ) %] - [% resul.pages %][% END %]
-                                                    [% IF ( resul.notes ) %] : [% resul.notes %][% END %]
-                                                    [% IF ( resul.size ) %] ; [% resul.size %][% END %]
+                                                                    <a_class="transparent resultlist" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% resul.biblionumber |uri %]">[% resul.title |html %]<
+                                                    <p>[% resul.author |html %]
+                                                    [% IF ( resul.publishercode ) %]- [% resul.publishercode |html %][% END %]
+                                                    [% IF ( resul.place ) %] ; [% resul.place |html %][% END %]
+                                                    [% IF ( resul.pages ) %] - [% resul.pages |html %][% END %]
+                                                    [% IF ( resul.notes ) %] : [% resul.notes |html %][% END %]
+                                                    [% IF ( resul.item('size') ) %] ; [% resul.item('size') |html %][% END %]
Comment 13 Frédéric Demians 2015-06-18 09:51:13 UTC Comment hidden (obsolete)
Comment 14 Jonathan Druart 2015-06-18 14:57:17 UTC
Created attachment 40313 [details] [review]
Bug 13904: Make unimarc_field_4XX displays usefull 200 subfield data

When searching for multivolumes titles, UNIMARC 4xx field plugin
displays the title of the biblios (200$a), without giving info about
volumes (200 $h $i). It neither doesn't display $e (subtitle) info which
could greatly help to disambiguate search result.

The displayed title is supposed to link to a biblio record view (MARC /
normal). It doesn't work.

TO TEST:

- On a UNIMARC Koha, add a new biblio record
- Call the 4XX plugin from 461/463 field
- Search for a biblio record which contains 200$e, and/or 200$h and/or
  200$i subfields.
- You get a result list, with two issues:
  1. $a, $h & $i aren't displayed
  2. Biblio title is not a link
- Apply the patch, and repeat previous steps.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
I got a link on fulltitle, but in 'ahie' order (not aehi)
Fixed some tabs.

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Comment 15 Jonathan Druart 2015-06-18 14:58:44 UTC
Thanks Frédéric for you reactivity!
Comment 16 Tomás Cohen Arazi 2015-06-19 14:50:55 UTC
Patch pushed to master.

Thanks Frederic!