Bug 38795

Summary: ERM : wrong mapping for publication_type when importing UNIMARC records
Product: Koha Reporter: Mathieu Saby <mathsabypro>
Component: ERMAssignee: Jonathan Druart <jonathan.druart>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, jonathan.field, martin.renvoize, matt.blenkinsop, pedro.amorim
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 32782    
Bug Blocks:    

Description Mathieu Saby 2024-12-29 17:13:45 UTC
bug 32782 introduced a mapping for UNIMARC records imported as a list into ERM 

This line is problematic for 2 reasons
+    my $publication_type                = $label_pos67 eq 'am' ? 'monograph' : $label_pos67 eq 'as' ? 'serial' : '';


- the position 6 for electronic resource is "l", and not "a", but the habits of libraries and data providers are not always consistent
- "monograph" and "serial" are not defined in the authorized value for publication type (ERM_TITLE_PUBLICATION_TYPE)

I propose 
- to take only into account the 7th position of the label (m for ebooks, s for serial)
- to use standard values defined in the authorized value : "ebook" and "journal" (or to add "monograph" and "serial" in that AV, but that seems redundant)