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

Merge branch 'hotline#40867_traitement_bloque_indexation_des_domaines' into 'stable'

Hotline#40867 traitement bloque indexation des domaines

See merge request !1590
parents f8040033 5902e932
Branches
Tags
4 merge requests!1659Master,!1618Master,!1610Dev#35088 oai import in cosmogramme,!1595Master
- ticket #40867 : Notices d'articles, albums, RSS, sitothèques : correction d'une mauvaise indexation du genre
\ No newline at end of file
......@@ -208,24 +208,27 @@ class Class_Indexation_PseudoNotice {
$this->_notice->save();
// exemplaire
$genre = '';
$this->_indexItem();
$this->_model->setNotice($this->_notice)
->save();
}
protected function _indexItem() {
$genre = null;
if ($this->dataExist('genre', $this->_datas)) {
$genres = explode(';', $this->_datas['genre']);
$genre = $genres[0];
$genre = $genres[0] ? $genres[0] : null;
}
$cote = '';
if ($this->dataExist('cote', $this->_datas))
$cote = $this->_datas['cote'];
$this->_exemplaire->setGenre($genre)
->setCote($cote)
->save();
$this->_model->setNotice($this->_notice)
->save();
}
......
......@@ -93,6 +93,13 @@ class Class_Indexation_PseudoNoticeAlbumTest extends Class_Indexation_PseudoNoti
$this->assertContains('/bib-numerique/notice/ido/778997987',
$this->_notice->get_subfield('856', 'a')[0]);
}
/** @test */
public function itemKindShouldBeNull() {
$item = $this->_notice->getExemplaires()[0];
$this->assertNull($item->getGenre());
}
}
......@@ -582,4 +589,11 @@ class Class_Indexation_PseudoNoticeSacramentariumTest extends Class_Indexation_P
$this->assertContains('/userfiles/album/144/',
$this->sacramentarium->getBasePath());
}
/** @test */
public function itmeKindShouldBe7() {
$item = $this->_notice->getExemplaires()[0];
$this->assertEquals(7, $item->getGenre());
}
}
\ 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