Summary: | Autolink bibs after generating the biblionumber | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens <nick> |
Component: | Cataloging | Assignee: | Nick Clemens <nick> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrewfh, dcook, fridolin.somers, jonathan.druart, kyle, m.de.rooy, phil, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.06,20.05.12
|
|
Attachments: |
Bug 27577: Autolink biblio after biblionumber is generated
Bug 27577: Autolink biblio after biblionumber is generated Bug 27577: Autolink biblio after biblionumber is generated Bug 27577: Unit test Bug 27577: Autolink biblio after biblionumber is generated |
Description
Nick Clemens
2021-01-29 13:32:56 UTC
Created attachment 116030 [details] [review] Bug 27577: Autolink biblio after biblionumber is generated If BiblioAddsAuthorities and AutoCreateAuthorities are enabled, a new record is auto linked when saving and authorities generated with a 670 field that indicates which record generated the new authority. The code to do this is called before the biblionumber is generated, so the variable that adds the biblionumber to the citation is empty This patch moves the linking code to after the biblionumber is generated To recreate: 1 - Enable BiblioAddsAuthorities and AutoCreateAuthorities 2 - Import or create a new record 3 - Ensure the record has controlled fields that do not have authorities before saving, i.e.: Add a 650 with "test_bug_27577_01" 4 - Search for the authority record 5 - Note the 670 field does not contain the biblionumber 6 - Apply patch, restart all the things 7 - Repeat 2-4 8 - Note the 670 now has the biblionumber Created attachment 116851 [details] [review] Bug 27577: Autolink biblio after biblionumber is generated If BiblioAddsAuthorities and AutoCreateAuthorities are enabled, a new record is auto linked when saving and authorities generated with a 670 field that indicates which record generated the new authority. The code to do this is called before the biblionumber is generated, so the variable that adds the biblionumber to the citation is empty This patch moves the linking code to after the biblionumber is generated To recreate: 1 - Enable BiblioAddsAuthorities and AutoCreateAuthorities 2 - Import or create a new record 3 - Ensure the record has controlled fields that do not have authorities before saving, i.e.: Add a 650 with "test_bug_27577_01" 4 - Search for the authority record 5 - Note the 670 field does not contain the biblionumber 6 - Apply patch, restart all the things 7 - Repeat 2-4 8 - Note the 670 now has the biblionumber Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Created attachment 116854 [details] [review] Bug 27577: Autolink biblio after biblionumber is generated If BiblioAddsAuthorities and AutoCreateAuthorities are enabled, a new record is auto linked when saving and authorities generated with a 670 field that indicates which record generated the new authority. The code to do this is called before the biblionumber is generated, so the variable that adds the biblionumber to the citation is empty This patch moves the linking code to after the biblionumber is generated To recreate: 1 - Enable BiblioAddsAuthorities and AutoCreateAuthorities 2 - Import or create a new record 3 - Ensure the record has controlled fields that do not have authorities before saving, i.e.: Add a 650 with "test_bug_27577_01" 4 - Search for the authority record 5 - Note the 670 field does not contain the biblionumber 6 - Apply patch, restart all the things 7 - Repeat 2-4 8 - Note the 670 now has the biblionumber Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Obviously a bug fix, but for the future I think a regression test would be really helpful here. Nick, can you try to provide a test for this change please? Created attachment 120559 [details] [review] Bug 27577: Unit test Created attachment 120560 [details] [review] Bug 27577: Autolink biblio after biblionumber is generated If BiblioAddsAuthorities and AutoCreateAuthorities are enabled, a new record is auto linked when saving and authorities generated with a 670 field that indicates which record generated the new authority. The code to do this is called before the biblionumber is generated, so the variable that adds the biblionumber to the citation is empty This patch moves the linking code to after the biblionumber is generated To recreate: 1 - Enable BiblioAddsAuthorities and AutoCreateAuthorities 2 - Import or create a new record 3 - Ensure the record has controlled fields that do not have authorities before saving, i.e.: Add a 650 with "test_bug_27577_01" 4 - Search for the authority record 5 - Note the 670 field does not contain the biblionumber 6 - Apply patch, restart all the things 7 - Repeat 2-4 8 - Note the 670 now has the biblionumber Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.06 Pushed to 20.05.x for 20.05.12 Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. |