Bug 20310: Redirect article record without items for article requests
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 19 Mar 2018 13:14:39 +0000 (14:14 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 12 Jul 2021 13:47:34 +0000 (15:47 +0200)
commite5651d4dad95bb5f5ba2be8eb418c956a05fcf77
treeeacf82e534c0cd813734d16236f0b09be7162efa
parent80d93b62c10eb20bcc7f4fa45b87dacf37dc823e
Bug 20310: Redirect article record without items for article requests

If an article record has been catalogued separately, has no items and
contains a reference to its host via MARC21 field 773 (host item entry),
this patch makes an article request redirect to the host record while
copying title, author and page info (from 773$g).

This is accomplished by using the new Koha::Biblio->host_record method.

Note: Subfield 773$g may contain additional information on volume and
issue number etc. It will be very hard or perhaps impossible to parse $g
and copy these details into the corresponding fields of the article
request form for all possible variations used in libraries. A similar
remark can be made for selecting the correct item (when item level is
used). We could try this on a future report, but will probably need at
least a preference to define the expected format.

Test plan:
[1] Enable article requests. Add rules for an ART and a SER itemtype.
[2] Create a SER host biblio record.
[3] Create an ART biblio record, no items. Include a 773w pointing to the
    SER record with '(MARCorgcode)[recno]' (keep the parentheses, remove
    the square brackets when inserting the biblionumber).
    Include text in 773$g too.
[4] Place an article request on the ART record. Verify that it redirects
    you to the SER record while copying title, author, page info.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt
opac/opac-request-article.pl