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

Merge branch...

Merge branch 'hotline#58261_rcm_st_omer_pb_reconnaissance_des_types_doc_de_bibliondemand' into 'hotline-master'

hotline #58261 : force record update for Bibliondemand

See merge request !2098
parents d50674c4 bd3df944
Branches
Tags
5 merge requests!2334Master,!2102#57574 : correction orthographe des jours de la semaine,!2101Master,!2100Hotline master,!2098hotline #58261 : force record update for Bibliondemand
Pipeline #989 canceled with stage
- ticket #58261 : intégration Bibliondemand : correction de la mise à jour des notices
\ No newline at end of file
......@@ -585,7 +585,9 @@ class notice_integration {
if (!$this->notice['titre_princ'])
$this->statut = static::RECORD_UPDATE;
if (Class_IntProfilDonnees::FORMAT_DUBLIN_CORE == $this->format)
if (in_array($this->format,
[ Class_IntProfilDonnees::FORMAT_DUBLIN_CORE,
Class_IntProfilDonnees::FORMAT_BIBLIONDEMAND]))
return $this->_realUpdate($existing_notice);
// Zones forcees
......
......@@ -53,7 +53,7 @@ class Class_Notice_DoubleFinder {
return true;
}
if($this->_profil && $this->_profil->isFormatDublinCore())
if($this->_profil && ($this->_profil->isFormatDublinCore() || $this->_profil->isBibliondemand()))
return false;
if ($this->_id = $this->findByIdOrigine()) {
......
......@@ -210,3 +210,54 @@ class RecordPhaseBibliondemandSimpleTest extends AbstractRecordPhaseBibliondeman
$this->assertEmpty($item->getUrl());
}
}
class RecordPhaseBibliondemandUpdateTest extends AbstractRecordPhaseBibliondemandTestCase {
public function _prepareFixtures() {
parent::_prepareFixtures();
Class_Cosmogramme_Integration::find(999)
->beIncrementImport()
->save();
$record = $this->fixture('Class_Notice',
['id' => 1,
'type_doc' => 16,
'alpha_titre' => 'PIERO SOFFICI',
'facettes' => 'T15',
'clef_alpha' => 'PIEROSOFFICIQUARTET--PIEROSOFFICIQUARTET----16',
'clef_oeuvre' => 'PIEROSOFFICIQUARTET--PIEROSOFFICIQUARTET--',
'annee' => '',
'unimarc' => '',
'qualite' => 0,
'exportable' => true,
'date_maj' => '2016-04-25 14:39:58',
'url_vignette' => 'http://play-assets-production.1dtouch.com/cargo/medium_8017297007164.jpg',
'url_image' => 'http://play-assets-production.1dtouch.com/cargo/medium_8017297007164.jpg',
'exemplaires' => [
$this->fixture('Class_Exemplaire',
['id' => 1,
'activite' => 'peut être prêté',
'zone995' => '',
'code_barres' => 'CG62_5532b9e4e47a7d41fe81d125d3ba7863',
'id_bib' => 3,
'id_int_bib' => 3])
]]);
}
public function setUp() {
parent::setUp();
$this->_record = Class_Notice::find(1);
}
/** @test */
public function typeDocShouldStay16() {
$this->assertEquals(16, $this->_record->getTypeDoc());
}
}
\ No newline at end of file
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