Add a syspref, "AutoAddSystemControlNumberAndMARCOrgCode". If enabled, when a new biblio is saved, the 001 and 003 fields of the marc record will be set to the koha biblionumber and value of the "MARCOrgCode" syspref respectively. According to the MARC21 standard the old values of 001 and 003 may also be moved to field 035, 010 or 016 as appropriate, but it since this step is more complicated it's perhaps better left to the user to implement some custom solution for this (for example as a to-marc-plugin).
Created attachment 128517 [details] [review] Bug 29694: Add preference for setting 001 and 003 fields on biblio save Add a syspref, "AutoAddSystemControlNumberAndMARCOrgCode". If enabled the 001 and 003 fields of the marc record will be set to the koha biblionumber and value of the "MARCOrgCode" syspref respectively before when saving biblios. To test: 1) Add a new biblio 2) Verify that 001 field is empty 3) Enable AutoAddSystemControlNumberAndMARCOrgCode syspref and make sure MARCOrgCode syspref is set to some value 4) Save biblio again 5) Verify that 001 has been set to the Koha biblio and 003 to the value of MARCOrgCode 6) Run tests in t/db_dependent/Biblio.t
Created attachment 128518 [details] [review] Bug 29694: Add tests
Created attachment 128519 [details] [review] Bug 29694: Add preference for setting 001 and 003 fields on biblio save Add a syspref, "AutoAddSystemControlNumberAndMARCOrgCode". If enabled the 001 and 003 fields of the marc record will be set to the koha biblionumber and value of the "MARCOrgCode" syspref respectively before when saving biblios. To test: 1) Add a new biblio 2) Verify that 001 field is empty 3) Enable AutoAddSystemControlNumberAndMARCOrgCode syspref and make sure MARCOrgCode syspref is set to some value 4) Save biblio again 5) Verify that 001 has been set to the Koha biblionumber and 003 to the value of MARCOrgCode 6) Run tests in t/db_dependent/Biblio.t Sponsored-by: Gothenburg University Library
Created attachment 128520 [details] [review] Bug 29694: Add tests
Hi David, I feel like this is at least a partial duplicate to bug 27981, that was pushed for 22.11. 003 is set for me to the MarcOrgCode system preference value or to the logged in library's MARCOrgCode on saving. So this seems to work as well. *** This bug has been marked as a duplicate of bug 27981 ***