Commit c7aa9387 authored by Arthur Suzuki's avatar Arthur Suzuki
Browse files

hotline#157048 : fix proper use of 214 copyright date field to compute publicationdate

parent 8f232eef
Pipeline #17481 passed with stage
in 37 minutes and 50 seconds
- correctif #157048 : Cosmogramme : prise en compte du 214 indice 4 (informations de copyright) pour le calcul de la date de publication. Les informations présentes dans le champ 214 indice zéro (éditeur) restent présentes si les deux informations sont présentes.
\ No newline at end of file
......@@ -1357,3 +1357,27 @@ class NoticeIntegrationZone214Test extends NoticeIntegrationTestCase {
$this->notice_integration->noticeToDBEnreg($this->notice_data)['annee']);
}
}
class NoticeIntegrationZone214Indice4Test extends NoticeIntegrationTestCase {
public function getProfilDonnees() {
return Class_IntProfilDonnees::forNanook()
->setIdProfil(108)
->getRawAttributes();
}
public function setUp() {
parent::setUp();
$this->loadNotice('unimarc_zone_214_4');
}
/** @test */
public function publicationDateShouldBe2019() {
$this->assertEquals('2019',
$this->notice_integration->noticeToDBEnreg($this->notice_data)['annee']);
}
}
01384cam 2200349 450 001002100000003004700021010003800068020001700106073001800123100004100141101000800182102000700190105001800197106000600215181001900221181002400240182001000264182002000274200014800294214002000442214002100462214001100483215004100494606005500535608004800590676001800638686007000656702005700726710006600783801007000849930011500919FRBNF46505891000000Xhttp://catalogue.bnf.fr/ark:/12148/cb46505891q a979-10-271-0348-5bbr.d12,95 EUR aFRb02005560 0a9791027103485 a20200123d2019 a y0frey50 ba0 afre aFR a||||z 00|y| ar 0601ai bxxxe  602ctxt2rdacontent 0601an 602cn2rdamedia1 aProtegeons l'eau !bTexte imprimeemanuel de l'apprenti ecoloftexte, Water familygillustrations, Nicolas Trevegpreface, Roland Jourdain 0a[Paris]cVagnon 3aimpr. en Espagne 4dC 2019 a1 vol. (95 p.)cill. en coul.d22 cm 311979093aEauxConservation des ressources2rameau 312042408aOuvrages pour la jeunesse2rameau a553.708 3v23 a5502Cadre de classement de la Bibliographie nationale francaise |316169492oISNI0000000076504142aTrevebNicolas4440||317865912aWater familycBiarritz, Pyrenees-Atlantiques4070 0aFRbFR-751131015c20200123gAFNORhFRBNF46505891000000X2intermrc 5FR-751131010:46505891001001a2020-15583b759999999cTolbiac - Rez de Jardin - Litterature et art - MagasindO
\ No newline at end of file
......@@ -123,7 +123,10 @@ class Class_Notice_Zone214 {
if ($this->getZones()->isEmpty())
return [];
return $this->_getNamesOfType(static::INDICATOR_EDITORS, 'dates');
if ($date = $this->_getNamesOfType(static::INDICATOR_EDITORS, 'dates'))
return $date;
return $this->_getNamesOfType(static::INDICATOR_COPYRIGHTDATE, 'dates');
}
......
Markdown is supported
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