Bug 32782 - Add UNIMARC support to the ERM module
Summary: Add UNIMARC support to the ERM module
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact:
URL:
Keywords:
Depends on: 32030
Blocks:
  Show dependency treegraph
 
Reported: 2023-02-01 15:45 UTC by Jonathan Druart
Modified: 2023-10-20 08:59 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.06


Attachments
Bug 32782: ERM UNIMARC support - Create the biblio record when a resource is created (1.77 KB, patch)
2023-02-01 15:52 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 32782: ERM UNIMARC support (1.87 KB, patch)
2023-03-22 11:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 32782: Koha to KBart mapping for UNIMARC (13.43 KB, patch)
2023-03-22 11:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 32782: Koha to KBart mapping for UNIMARC (13.49 KB, patch)
2023-03-30 14:37 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 32782: ERM UNIMARC support (1.92 KB, patch)
2023-03-30 14:41 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 32782: Koha to KBart mapping for UNIMARC (13.49 KB, patch)
2023-03-30 14:41 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2023-02-01 15:45:09 UTC
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 ?
Comment 1 Jonathan Druart 2023-02-01 15:45:31 UTC
Paul, can you have a look at this please?
Comment 2 Jonathan Druart 2023-02-01 15:52:35 UTC
Created attachment 145961 [details] [review]
Bug 32782: ERM UNIMARC support - Create the biblio record when a resource is created
Comment 3 Laurence Rault 2023-02-21 16:19:58 UTC
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.
Comment 4 Jonathan Druart 2023-03-17 09:23:26 UTC
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.
Comment 5 Laurence Rault 2023-03-17 14:23:27 UTC
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
Comment 6 Jonathan Druart 2023-03-22 11:43:08 UTC
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.
Comment 7 Jonathan Druart 2023-03-22 11:43:11 UTC
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
Comment 8 Jonathan Druart 2023-03-22 11:43:30 UTC
Ready for testing, Laurence :)
Comment 9 Biblibre Sandboxes 2023-03-30 14:37:14 UTC
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>
Comment 10 Biblibre Sandboxes 2023-03-30 14:41:28 UTC
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>
Comment 11 Biblibre Sandboxes 2023-03-30 14:41:30 UTC
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>
Comment 12 Katrin Fischer 2023-04-09 15:44:51 UTC
We are a little short on UNIMARC users in the current QA team. 
Frido or Victor, could you take this one?
Comment 13 Victor Grousset/tuxayo 2023-04-26 03:38:50 UTC
> 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.
Comment 14 Victor Grousset/tuxayo 2023-04-29 04:37:12 UTC
Works, makes sense (not expert so I just checked fields in code against UNIMARC documentation), QA script happy, code looks good, passing QA :)
Comment 15 Tomás Cohen Arazi 2023-05-05 12:17:06 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 16 Martin Renvoize 2023-05-11 11:10:48 UTC
Many hands makes light work, thankyou everyone!

Pushed to 22.11.x for the next release
Comment 17 Lucas Gass 2023-05-15 22:09:16 UTC
NOt needed for 22.05.x, no backport.