Item Templates will apply the same barcode each time template is applied if autobarcode is enabled Test Plan: 1. Create item template, filling out the fields necessary. 2. Koha will have created barcode to item, but remove. 3. Save the template. 4. Apply the template. 5 Koha will again but the barcode on the item. 6. Create second item, apply same template, Koha will use that same barcode to next item.
Created attachment 146615 [details] [review] Bug 32959: Don't store results of autobarcode in item editor templates Test Plan: 1) Enable autobarcode 2) Create a new item template, leave the barcode field blank 3) Apply that item template 4) Note the template prefills the barcode field 5) Delete that item template 6) Apply this patch 7) Restart all the things! 8) Repeat steps 2-4 9) Note the barcode field remains empty!
Created attachment 149700 [details] [review] Bug 32959: Don't store results of autobarcode in item editor templates Test Plan: 1) Enable autobarcode 2) Create a new item template, leave the barcode field blank 3) Apply that item template 4) Note the template prefills the barcode field 5) Delete that item template 6) Apply this patch 7) Restart all the things! 8) Repeat steps 2-4 9) Note the barcode field remains empty! Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Created attachment 150694 [details] [review] Bug 32959: Don't store results of autobarcode in item editor templates Test Plan: 1) Enable autobarcode 2) Create a new item template, leave the barcode field blank 3) Apply that item template 4) Note the template prefills the barcode field 5) Delete that item template 6) Apply this patch 7) Restart all the things! 8) Repeat steps 2-4 9) Note the barcode field remains empty! Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.com>
Created attachment 150832 [details] [review] Bug 32959: Don't store results of autobarcode in item editor templates Test Plan: 1) Enable autobarcode 2) Create a new item template, leave the barcode field blank 3) Apply that item template 4) Note the template prefills the barcode field 5) Delete that item template 6) Apply this patch 7) Restart all the things! 8) Repeat steps 2-4 9) Note the barcode field remains empty! Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Hm, looks like we overlapped, I was just writing this up: I can't reproduce this error in master. What I did: * Activate Autobarcode, I chose YYYY-0001 * Create a new item, leave barcode empty, save as template * Load the template = Barcode field is empty * Crate a new item, generate barcode, empty field, save as template * Load the template = Barcode field remains empty The only way I can replicate is if the barcode field is filled in when I create the template.
You need autobarcode=incremental
(In reply to Jonathan Druart from comment #6) > You need autobarcode=incremental That was not in the test plan! (but glad we could clear it up)
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work everyone! Pushed to stable for 22.11.x