Skip to content
Snippets Groups Projects
Commit 5d87cdb5 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Merge branch...

Merge branch 'hotline#99172_disfonctionnement_du_filtre_reserve_par_d_autres_prets_en_cours_mon_compte' into 'hotline'

Hotline#99172 disfonctionnement du filtre reserve par d autres prets en cours mon compte

See merge request !3306
parents f341ae00 7058a875
2 merge requests!3308Hotline,!3306Hotline#99172 disfonctionnement du filtre reserve par d autres prets en cours mon compte
Pipeline #8700 failed with stage
in 39 minutes and 47 seconds
- ticket hotline#99172 : : Dysfonctionnement du filtre "réservé par d'autres" (prêts en cours / mon compte)
\ No newline at end of file
......@@ -133,6 +133,12 @@ abstract class Class_WebService_SIGB_AbstractILSDIPatronInfoReader {
}
public function endRecordonhold($data) {
if ($data)
$this->_currentLoan->setOnHold($data);
}
public function endRenewals($data) {
if ($data && $this->_currentLoan)
$this->_currentLoan->setRenewals($data);
......
......@@ -815,4 +815,187 @@ class ChamberyKohaFixtures {
</GetPatronInfo>
';
}
// cf. https://forge.afi-sa.net/issues/99172
// was owed to a change in onhold tag into recordonhold
public static function getPatronInfoWithSeptLettres () {
return '<?xml version="1.0" encoding="UTF-8" ?>
<GetPatronInfo>
<city>Gotham City</city>
<altcontactaddress2></altcontactaddress2>
<B_address2></B_address2>
<altcontactfirstname></altcontactfirstname>
<sort2></sort2>
<borrowernumber>6871</borrowernumber>
<altcontactphone></altcontactphone>
<title></title>
<dateexpiry>2019-06-30</dateexpiry>
<mobile>06 01 02 03 04</mobile>
<cardnumber>90519000053165</cardnumber>
<B_streetnumber></B_streetnumber>
<dateenrolled>2014-04-29</dateenrolled>
<altcontactzipcode></altcontactzipcode>
<streettype></streettype>
<sort1>12</sort1>
<email>xxx@xxx.fr</email>
<contactfirstname></contactfirstname>
<B_country></B_country>
<B_email></B_email>
<phone>01 02 03 04 05</phone>
<B_address></B_address>
<branchcode>PUKA</branchcode>
<guarantorid>0</guarantorid>
<emailpro></emailpro>
<phonepro></phonepro>
<B_city></B_city>
<gonenoaddress>0</gonenoaddress>
<privacy_guarantor_checkouts>0</privacy_guarantor_checkouts>
<categorycode>J14</categorycode>
<dateofbirth>2004-11-10</dateofbirth>
<lost>0</lost>
<zipcode>1123</zipcode>
<lang>default</lang>
<altcontactaddress3></altcontactaddress3>
<checkprevcheckout>inherit</checkprevcheckout>
<fax>01 02 03 04 05</fax>
<streetnumber></streetnumber>
<altcontactaddress1></altcontactaddress1>
<address2></address2>
<updated_on>2017-03-23 13:22:49</updated_on>
<loans>
<loan>
<replacementpricedate>2009-10-01</replacementpricedate>
<issuedate>2016-05-24 00:00</issuedate>
<issues>3</issues>
<issue_id>272</issue_id>
<author>René Gouichoux, Pronto</author>
<permanent_location>Romans enfant</permanent_location>
<itemlost>0</itemlost>
<overdue>1</overdue>
<publishercode>F. Nathan</publishercode>
<surname>Aguetant</surname>
<biblioitemnumber>4107</biblioitemnumber>
<firstname>Agathe</firstname>
<notforloan>0</notforloan>
<holdingbranch>PUKA</holdingbranch>
<itemnumber>5111</itemnumber>
<auto_renew>0</auto_renew>
<frameworkcode></frameworkcode>
<barcode>00519000083096</barcode>
<itemonhold>0</itemonhold>
<renewals>28</renewals>
<publicationyear>2004</publicationyear>
<location>Romans enfant</location>
<withdrawn>0</withdrawn>
<date_due>2017-06-14 00:00</date_due>
<dateaccessioned>2014-06-26</dateaccessioned>
<itemtype>LIVR</itemtype>
<damaged>0</damaged>
<homebranch>PUKA</homebranch>
<more_subfields_xml>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;collection
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation=&quot;http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd&quot;
xmlns=&quot;http://www.loc.gov/MARC21/slim&quot;&gt;
&lt;record&gt;
&lt;leader&gt; a &lt;/leader&gt;
&lt;datafield tag=&quot;999&quot; ind1=&quot; &quot; ind2=&quot; &quot;&gt;
&lt;subfield code=&quot;h&quot;&gt;8309&lt;/subfield&gt;
&lt;subfield code=&quot;j&quot;&gt;Librairie jeunesse au pays ble&lt;/subfield&gt;
&lt;subfield code=&quot;q&quot;&gt;Jeunes&lt;/subfield&gt;
&lt;subfield code=&quot;p&quot;&gt;5,35&lt;/subfield&gt;
&lt;subfield code=&quot;s&quot;&gt;24/04/2004&lt;/subfield&gt;
&lt;/datafield&gt;
&lt;/record&gt;
&lt;/collection&gt;</more_subfields_xml>
<recordonhold>0</recordonhold>
<itemcallnumber>E GOU</itemcallnumber>
<itype>LIVR</itype>
<branchcode>PUKA</branchcode>
<date_due_sql>2017-06-14 00:00:00</date_due_sql>
<biblionumber>4107</biblionumber>
<onloan>2016-06-14</onloan>
<datecreated>2014-06-26</datecreated>
<cardnumber>90519000053165</cardnumber>
<datelastborrowed>2016-05-24</datelastborrowed>
<timestamp>2017-03-23 13:24:14</timestamp>
<title>Quel bazar, Léonard !</title>
<borrowernumber>6871</borrowernumber>
<datelastseen>2016-05-24</datelastseen>
<isbn>2092502611</isbn>
<onsite_checkout>0</onsite_checkout>
<cn_sort>E_GOU</cn_sort>
</loan>
<loan>
<issuedate>2016-05-24 10:40</issuedate>
<datelastseen>2016-05-24</datelastseen>
<onsite_checkout>0</onsite_checkout>
<issues>3</issues>
<surname>Aguetant</surname>
<withdrawn>0</withdrawn>
<issue_id>245089</issue_id>
<branchcode>PUKA</branchcode>
<datecreated>2016-06-01</datecreated>
<itemcallnumber>RP HAR</itemcallnumber>
<dateaccessioned>2016-01-07</dateaccessioned>
<auto_renew>0</auto_renew>
<barcode>1643136</barcode>
<url>http://www.electre.com/GetBlob.ashx?Ean=9782016269381,0-4986152&amp;Size=Original</url>
<replacementpricedate>2016-07-01</replacementpricedate>
<datelastborrowed>2016-05-24</datelastborrowed>
<recordonhold>1</recordonhold>
<isbn>978-2-01-626938-1</isbn>
<title>7 lettres</title>
<booksellerid>007</booksellerid>
<itemonhold>0</itemonhold>
<number>ALOES787234</number>
<itemtype>LIVR</itemtype>
<date_due_sql>2020-10-23 23:59:00</date_due_sql>
<holdingbranch>PUKA</holdingbranch>
<itype>LIVR</itype>
<permanent_location>SECTION_A</permanent_location>
<price>16.38</price>
<replacementprice>16.38</replacementprice>
<onloan>2020-10-23</onloan>
<author>Olivia Harvard</author>
<borrowernumber>6877</borrowernumber>
<location>SECTION_A</location>
<itemlost>0</itemlost>
<biblioitemnumber>92531</biblioitemnumber>
<timestamp>2016-09-23 10:40:54</timestamp>
<damaged>0</damaged>
<cardnumber>90519000053165</cardnumber>
<ccode>FDS_ROMAN</ccode>
<publicationyear>2018</publicationyear>
<cn_sort>RP_HAR</cn_sort>
<frameworkcode></frameworkcode>
<biblionumber>92531</biblionumber>
<notforloan>0</notforloan>
<itemnumber>106730</itemnumber>
<date_due>2020-10-23 23:59</date_due>
<publishercode>Hachette Romans</publishercode>
<homebranch>PUKA</homebranch>
</loan>
</loans>
<firstname>Agathe</firstname>
<B_zipcode></B_zipcode>
<sex></sex>
<othernames></othernames>
<privacy>1</privacy>
<surname>Aguetant</surname>
<B_streettype></B_streettype>
<altcontactsurname></altcontactsurname>
<login_attempts>0</login_attempts>
<initials></initials>
<branchname>Pukapuka</branchname>
<contactname></contactname>
<address>6871 rue de Agathe</address>
<B_phone></B_phone>
</GetPatronInfo>
';
}
}
......@@ -283,4 +283,34 @@ class HandleOnholdWithManyItemOnHoldTest extends HandleOnholdDispatchTestCase {
->with($this->_ilsdi . '?service=GetPatronInfo&patron_id=18&show_contact=1&show_loans=0&show_holds=1')
->answers(ChamberyKohaFixtures::getPatronInfoChambelleWithManyItemonhold());
}
}
\ No newline at end of file
}
class HandleOnholdChangedForRecordonholdWithOnHoldTest extends HandleOnholdTestCase {
protected function _addCallToWebClient() {
$this->_mock_web_client
->whenCalled('open_url')
->with($this->_ilsdi . '?service=GetPatronInfo&patron_id=18&show_contact=0&show_loans=0&show_holds=1')
->answers(ChamberyKohaFixtures::getPatronInfoWithSeptLettres())
->whenCalled('open_url')
->with($this->_ilsdi . '?service=GetPatronInfo&patron_id=&show_contact=0&show_loans=1&show_holds=0')
->answers(ChamberyKohaFixtures::getPatronInfoWithSeptlettres());
}
/** @test */
public function tableOfLoanShouldContainsSeptLettresAndQuelBazar() {
$this->dispatch('/opac/abonne/prets', true);
$this->assertXPathContentContains('//td','7 lettres',$this->_response->getBody());
$this->assertXPathContentContains('//td','Quel bazar',$this->_response->getBody());
}
/** @test */
public function tableOfLoansWithOnholdYesShouldContainsSeptLettresAndNotQuelBazar() {
$this->dispatch('/opac/abonne/prets/onhold/yes', true);
$this->assertNotXPathContentContains('//td','Quel bazar',$this->_response->getBody());
$this->assertXPathContentContains('//td','7 lettres',$this->_response->getBody());
}
}
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