]> git.koha-community.org Git - koha.git/commit
Bug 12911: batch_id for new labels batches can be asssigned to several batches
authorNick Clemens <nick@quecheelibrary.org>
Sat, 7 Feb 2015 17:49:29 +0000 (12:49 -0500)
committerChris Cormack <chrisc@catalyst.net.nz>
Sun, 17 May 2015 21:55:48 +0000 (09:55 +1200)
commit2dd97f26c1e72bc35e29b1afd1fc38d301c48e9e
tree519e4d4dde9d5ffbec3805ebdd7a66cf9930d4ab
parent2cdbaae38bf8ce08ec88b8334f7877f10d2784d8
Bug 12911: batch_id for new labels batches can be asssigned to several batches

Currently batch_id is assigned upon creation of a new batch object.  This patch leaves batch_id as 0 at creation and adds a check when adding items.  If batch is new then batch_id is created then

Test plan:
1 -In one browser window, go to tools->label creator and click the new batch button
2 - Before adding items, open a new browser, and go tools->label creator and click the new batch button
3 - Note that both batches have the same number listed
4 - Add an item to the first batch - you should now see one item in the batch
5 - Add an item to the second batch, you should see two items in the batch
6 - Apply patch and repeat steps 1&2
7 - Note that neither batch lists a batch number
8 - Add an item to the first batch, you should see one item and a batch number
9 - Add an item to the second batch, you should see one item and a new batch number

Patch behaves as expected.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit dedd059ac006eefb9eb89c28dc3581ccaaf71098)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
C4/Creators/Batch.pm
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt
labels/label-edit-batch.pl