From a25c9e637bbf7f053d5d65d21d9b7f139c316524 Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Sat, 1 Jul 2023 08:41:15 -0700 Subject: [PATCH] Bug 34182: Don't set biblio.serial based on biblio.seriestitle in AddBiblio A misunderstanding of the intention of some dead code that probably wanted to set biblio.series (which doesn't exist) left us setting biblio.serial if biblio.seriestitle was set. The only thing series and serial have in common is the first four letters. We shouldn't set serial on something with a series (unless someone also sets serial on it, of course). Test plan: 1. Administration - MARC bibliographic framework - Actions button next to Default framework - MARC structure 2. In the Search for tag input type 942 and click search 3. Actions button next to 942 - Edit subfields 4. Tab s - check the checkbox for Editor, uncheck the checkbox for Collapsed - Save changes 5. Cataloging - New record 6. Click in the input for 000 and hold down Tab until you get past 008 to fill in mandatory default values, then type any character in 040 subfield c 7. Tab 2 - In 245 subfield a type Series not serial 8. Tab 4 - In 490 subfield a type any character 9. Tab 9 - Set the value of subfield c to Books 10. Click save and leave the tab open to keep the biblionumber 11. Cataloging - New record - repeat step 6 12. Tab 2 - In 245 subfield a type Serial not series 13. Tab 9 - Set the value of subfield c to Books - Type 1 in subfield s 14. Click save, the biblionumber should be one higher than the first one 15. Reports - Create from SQL 16. Type something in Report name, paste in the SQL SELECT biblio.serial, biblio.seriestitle, biblio.title FROM biblio WHERE biblionumber IN ("","") and put your first biblionumber in the first "", your second in the second. 17. Save report - Run report 18. Series not serial should have a blank in the serial column and the character you typed in the seriestitle column; Serial not series should have a 1 in the serial column and a blank in the seriestitle column. Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 65b7c6731933f4b7d284ac07b9adab0d2ada60ca) Signed-off-by: Martin Renvoize --- C4/Biblio.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 93091b0ca9..c64a721c77 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -230,8 +230,7 @@ sub AddBiblio { part_name => $olddata->{part_name}, unititle => $olddata->{unititle}, notes => $olddata->{notes}, - serial => - ( $olddata->{serial} || $olddata->{seriestitle} ? 1 : 0 ), + serial => $olddata->{serial}, seriestitle => $olddata->{seriestitle}, copyrightdate => $olddata->{copyrightdate}, datecreated => \'NOW()', -- 2.39.5