Summary: | _increment_barcode is called twice | ||
---|---|---|---|
Product: | Koha | Reporter: | Kyle M Hall <kyle.m.hall> |
Component: | Architecture, internals, and plumbing | Assignee: | Kyle M Hall <kyle.m.hall> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | gmcharlt, kyle, m.de.rooy, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 10305 - Duplicate code in Search.pm
Bug 10305 - _increment_barcode is called twice Bug 10305 - _increment_barcode is called twice |
Description
Kyle M Hall
2013-05-21 19:58:38 UTC
Created attachment 18281 [details] [review] Bug 10305 - Duplicate code in Search.pm For some reason, _increment_barcode is called twice in succession in cataloguing/additem.pl Test Plan: 1) Enable autobarcode = incremental 2) Catalog an item, not the barcode 3) Apply this patch 4) Catalog another item, the barcode should be the next in line as previously. No change should be noted. The patch itself looks OK, the patch title is clearly wrong. Please update the patch title (and the bug title) to reflect the actual problem, which is that _increment_barcode is called twice. Created attachment 20227 [details] [review] Bug 10305 - _increment_barcode is called twice For some reason, _increment_barcode is called twice in succession in cataloguing/additem.pl Test Plan: 1) Enable autobarcode = incremental 2) Catalog an item, not the barcode 3) Apply this patch 4) Catalog another item, the barcode should be the next in line as previously. No change should be noted. Created attachment 21370 [details] [review] Bug 10305 - _increment_barcode is called twice For some reason, _increment_barcode is called twice in succession in cataloguing/additem.pl Test Plan: 1) Enable autobarcode = incremental 2) Catalog an item, not the barcode 3) Apply this patch 4) Catalog another item, the barcode should be the next in line as previously. No change should be noted. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Works. Looks good to me. There was no problem before, just a duplicate executing of a select max in the database. Note that the code used for this increment might still be wrong with concurrent edits, since the max calculation and the update of the table are quite separate parts in code. Reminds me of the discussion about the seqno engine.. No complaints from qa tools. Passed QA Pushed to master. Thanks, Kyle! This patch has been pushed to 3.12.x, will be in 3.12.7. Thanks Kyle! |