I need UNIMARC equivalence for the following values: my $publication_title = $biblio->title; my $print_identifier = $record->subfield( '020', 'a' ) || $record->subfield( '020', 'z' ) || $record->subfield( '022', 'a' ) || $record->subfield( '022', 'y' ); my $online_identifier = $print_identifier; my ( $date_first_issue_online, $date_last_issue_online ) = $fix_coverage->( $record->subfield( '866', 'a' ) ); my ( $num_first_vol_online, $num_last_vol_online ) = $fix_coverage->( $record->subfield( '863', 'a' ) ); my ( $num_first_issue_online, $num_last_issue_online ) = ( '', '' ); # FIXME ? my $title_url = $record->subfield( '856', 'u' ); my $first_author = $biblio->author; my $embargo_info = ''; # FIXME ? my $coverage_depth = $title_url ? 'fulltext' : 'print'; my $notes = $record->subfield( '852', 'z' ); my $publisher_name = $record->subfield( '260', 'b' ); my $publication_type = ''; # FIXME ? my $date_monograph_published_print = ''; # FIXME ? my $date_monograph_published_online = ''; # FIXME ? my $monograph_volume = ''; # FIXME ? my $monograph_edition = ''; # FIXME ? my $first_editor = ''; # FIXME ? my $parent_publication_title_id = ''; # FIXME ? my $preceeding_publication_title_id = ''; # FIXME ? my $access_type = ''; # FIXME ?
Paul, can you have a look at this please?
Created attachment 145961 [details] [review] Bug 32782: ERM UNIMARC support - Create the biblio record when a resource is created
My proposition for Unimarc (no good syntax for code, but just notes) : my $publication_title = $biblio->title; my $print_identifier = $record->subfield( '010', 'a' ) || $record->subfield( '010', 'z' ) || $record->subfield( '011', 'a' ) || $record->subfield( '011', 'y' ); my $online_identifier = $print_identifier; my ( $date_first_issue_online, $date_last_issue_online ) = 955$a, 995$k $fix_coverage->( $record->subfield( '', '' ) ); my ( $num_first_vol_online, $num_last_vol_online ) = 955$d, 955$n $fix_coverage->( $record->subfield( '', '' ) ); my ( $num_first_issue_online, $num_last_issue_online ) = 955$e, 955$o ( '', '' ); # FIXME ? my $title_url = $record->subfield( '856', 'u' ); my $first_author = $biblio->author; my $embargo_info = ''; # FIXME ? 371$a my $coverage_depth = $title_url ? 'fulltext' : 'print'; my $notes = $record->subfield( '', '' ); = 336$a my $publisher_name = $record->subfield( '214', 'c' ); my $publication_type = ''; # FIXME ? see below my $date_monograph_published_print = ''; # FIXME ? 214$d my $date_monograph_published_online = ''; # FIXME ? 214$d + 100$a pos 9-12 my $monograph_volume = ''; # FIXME ? 200$v my $monograph_edition = ''; # FIXME ? 205$a my $first_editor = ''; # FIXME ? 214$c (?) my $parent_publication_title_id = ''; # FIXME ? 461 : what kind of information here ? If title, 461$t, if id, 461$0 or $3 ? my $preceeding_publication_title_id = ''; # FIXME ? 432 : same question my $access_type = ''; # FIXME ? 856$y publication_type : serial, or monograph if monograph : label pos. 67=am + 106$a=s if serial : label pos. 67=as + 106$a=s + always add field 135$a=drnn#nnnmnnuu For 955 : instead of 955 we could put all information in 856$z maybe, as they are related to the url. Depends on if we create one record with multiple 856 if many raws for one title in the kbart file, or one record per raw.
Thanks Laurence! (In reply to Laurence Rault from comment #3) > my ( $date_first_issue_online, $date_last_issue_online ) = > 955$a, 995$k I guess there is a typo and the second one should be 955$k. > my $date_monograph_published_online = ''; # > FIXME ? 214$d + 100$a pos 9-12 What means '+' here? Should it be: pick 214$d, but if empty then pick 100$a pos 9-12? > my $parent_publication_title_id = ''; # > FIXME ? 461 : what kind of information here ? If title, 461$t, if id, 461$0 > or $3 ? I am going to ignore this for now (I have no idea!) > publication_type : serial, or monograph > if monograph : label pos. 67=am + 106$a=s > if serial : label pos. 67=as + 106$a=s Do you mean the reverse? If we have 67=am AND 106$a=s then publication_type=monograph Else if 67=as AND 106$a=s then publication_type=serial Is that correct or I misunderstood what you meant? > + always add field 135$a=drnn#nnnmnnuu Always add a new field? Or update the existing one? What if there are several 135$a in the record already? > For 955 : instead of 955 we could put all information in 856$z > maybe, as they are related to the url. Depends on if we create one record > with multiple 856 if many raws for one title in the kbart file, or one > record per raw. Ignoring this again, will see later, depending on the feedback we get from UNIMARC users.
1) my ( $date_first_issue_online, $date_last_issue_online ) = => 955$a, 955$k, indeed 2) my $date_monograph_published_online = ''; What means '+' here? Should it be: pick 214$d, but if empty then pick 100$a pos 9-12? => yes ok 3) For publication type : You're right In fact I have though the mappings for kbart to koha, not the reverse. So maybe don't take into account the 106 : If we have 67=am then publication_type=monograph Else if 67=as then publication_type=serial else keep empty 4) field 135 Field is repeatable So for unimarc to kbart : no need of 135
Created attachment 148516 [details] [review] Bug 32782: ERM UNIMARC support Create the biblio record when a resource is created Test plan: Create a new local title and confirm that the Koha bibliographic record is created correctly.
Created attachment 148517 [details] [review] Bug 32782: Koha to KBart mapping for UNIMARC Used when creating eholdings from Koha items. Test plan: Add some items to a list, then use this list to create eholdings /cgi-bin/koha/erm/eholdings/local/titles/import
Ready for testing, Laurence :)
Created attachment 148998 [details] [review] Bug 32782: Koha to KBart mapping for UNIMARC Used when creating eholdings from Koha items. Test plan: Add some items to a list, then use this list to create eholdings /cgi-bin/koha/erm/eholdings/local/titles/import Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Created attachment 148999 [details] [review] Bug 32782: ERM UNIMARC support Create the biblio record when a resource is created Test plan: Create a new local title and confirm that the Koha bibliographic record is created correctly. Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Created attachment 149000 [details] [review] Bug 32782: Koha to KBart mapping for UNIMARC Used when creating eholdings from Koha items. Test plan: Add some items to a list, then use this list to create eholdings /cgi-bin/koha/erm/eholdings/local/titles/import Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
We are a little short on UNIMARC users in the current QA team. Frido or Victor, could you take this one?
> Create a new local title and confirm that the Koha bibliographic record is created correctly. I filled all the fields in the local title and only one field ends up in the record (200$a (title)) But same happens without the patches on marc21 so I guess it's normal. Pointing out just in case.
Works, makes sense (not expert so I just checked fields in code against UNIMARC documentation), QA script happy, code looks good, passing QA :)
Pushed to master for 23.05. Nice work everyone, thanks!
Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release
NOt needed for 22.05.x, no backport.