Skip to content
Snippets Groups Projects
Commit 6862422c authored by André Lahmann's avatar André Lahmann Committed by Demian Katz
Browse files

Paia driver map about to title (#923)

* * always map paia fee.about to vufind's title field as the about field usually contains information about the fee in general in case no matching record can be found for the fee

* * updated PAIATest with new mapping
parent 1f890725
No related merge requests found
......@@ -626,9 +626,10 @@ class PAIA extends DAIA
protected function getAdditionalFeeData($fee, $patron = null)
{
$additionalData = [];
// Add the item title using the about field,
// but only if this fee is caused by some item
if (isset($fee['item'])) {
// The title is always displayed to the user in fines view if no record can
// be found for current fee. So always populate the title with content of
// about field.
if (isset($fee['about'])) {
$additionalData['title'] = $fee['about'];
}
......@@ -643,8 +644,6 @@ class PAIA extends DAIA
? $fee['about'] : null);
$additionalData['item'] = (isset($fee['item'])
? $fee['item'] : null);
$additionalData['title'] = (isset($fee['title'])
? $fee['title'] : null);
return $additionalData;
}
......
......@@ -120,7 +120,7 @@ class PAIATest extends \VuFindTest\Unit\ILSDriverTestCase
'createdate' => '06-07-2016',
'duedate' => '',
'id' => '',
'title' => null,
'title' => 'Open source licensing : software freedom and intellectual property law ; [open source licensees are free to: use open source software for any purpose, make and distribute copies, create and distribute derivative works, access and use the source code, com / Rosen, Lawrence (c 2005)',
'feeid' => null,
'about' => 'Open source licensing : software freedom and intellectual property law ; [open source licensees are free to: use open source software for any purpose, make and distribute copies, create and distribute derivative works, access and use the source code, com / Rosen, Lawrence (c 2005)',
'item' => 'http://uri.gbv.de/document/opac-de-830:bar:830$28295402'
......@@ -134,7 +134,7 @@ class PAIATest extends \VuFindTest\Unit\ILSDriverTestCase
'createdate' => '05-23-2016',
'duedate' => '',
'id' => '',
'title' => null,
'title' => 'Zend framework in action / Allen, Rob (2009)',
'feeid' => null,
'about' => 'Zend framework in action / Allen, Rob (2009)',
'item' => 'http://uri.gbv.de/document/opac-de-830:bar:830$28323471'
......@@ -148,7 +148,7 @@ class PAIATest extends \VuFindTest\Unit\ILSDriverTestCase
'createdate' => '05-23-2016',
'duedate' => '',
'id' => '',
'title' => null,
'title' => 'Unsere historischen Gärten / Lutze, Margot (1986)',
'feeid' => null,
'about' => 'Unsere historischen Gärten / Lutze, Margot (1986)',
'item' => 'http://uri.gbv.de/document/opac-de-830:bar:830$24476416'
......@@ -162,7 +162,7 @@ class PAIATest extends \VuFindTest\Unit\ILSDriverTestCase
'createdate' => '06-16-2016',
'duedate' => '',
'id' => '',
'title' => null,
'title' => 'Triumphe des Backsteins = Triumphs of brick / (1992)',
'feeid' => null,
'about' => 'Triumphe des Backsteins = Triumphs of brick / (1992)',
'item' => 'http://uri.gbv.de/document/opac-de-830:bar:830$33204941'
......@@ -176,7 +176,7 @@ class PAIATest extends \VuFindTest\Unit\ILSDriverTestCase
'createdate' => '05-23-2016',
'duedate' => '',
'id' => '',
'title' => null,
'title' => 'Lehrbuch der Botanik / Strasburger, Eduard (2008)',
'feeid' => null,
'about' => 'Lehrbuch der Botanik / Strasburger, Eduard (2008)',
'item' => 'http://uri.gbv.de/document/opac-de-830:bar:830$26461872'
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment