Skip to content
Snippets Groups Projects
Commit cdeb21f9 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

hotline #16358 fix facette type_doc on series

parent 14fef6fe
Branches
Tags
5 merge requests!529Hotline 6.56,!421Hotline 6.52,!416Hotline 16358 fix update notice cosmogramme,!414Hotline 16358 fix update notice cosmogramme,!413Hotline 16358 fix update notice cosmogramme
......@@ -118,6 +118,7 @@ class notice_integration {
public function traiteNotice($data) {
global $sql;
$id_bib=$this->id_bib;
if(! $this->analyseur ) return false;
$this->statut=0;
......@@ -160,6 +161,7 @@ class notice_integration {
// suppression ou creation des articles si périodique
if($this->notice["type_doc"]==2)
{
// Periodiques Koha et orphee (1 exemplaire pour chaque numéro)
if(($this->id_article_periodique==3 or $this->id_article_periodique==4) and $this->flag_koha==false)
{
......@@ -780,6 +782,8 @@ class notice_integration {
public function traiteFacettes() {
global $sql;
$facettes = [];
// Virer les facettes sauf les tags
$controle=explode(" ",$this->notice["facettes"]);
$this->notice["facettes"]="";
......@@ -789,6 +793,12 @@ class notice_integration {
if($tp =="Z") $this->notice["facettes"].=" ".$controle[$i];
}
if($type_doc = $this->notice['infos_type_doc']) {
if($code_type_doc = $type_doc['code']){
$facettes[] = 'T'.$code_type_doc;
}
}
// Dewey
if($this->notice["dewey"])
{
......
......@@ -1661,4 +1661,10 @@ class NoticeIntegrationUnimarcKohaFacetteTest extends NoticeIntegrationTestCase
public function clefAlphaShouldBeAsExpected() {
$this->assertEquals('OKAPI---955-BAYARD--2', Class_Notice::find(1)->getClefAlpha());
}
/** @test */
public function contextShouldExpectation() {
$this->assertContains('T2', Class_Notice::find(1)->getFacettes());
}
}
\ 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