]> git.koha-community.org Git - koha.git/commit
Bug 12748 - Fixes duplicate serials with an "expected" status bug
authorremi <remi.mayrand-provencher@inLibro.com>
Tue, 11 Aug 2015 15:10:45 +0000 (11:10 -0400)
committerJulian Maurice <julian.maurice@biblibre.com>
Fri, 1 Jul 2016 06:24:00 +0000 (08:24 +0200)
commitee4607cda1f30cb524b69b4cdb07a08e5a95ac7e
tree6f4736ffd6bc2ffe3872116ecc302ab8910ff3ba
parent64d29957894e67b0dfbd0599887eac355772a6b9
Bug 12748 - Fixes duplicate serials with an "expected" status bug

Added a new sub to Serials.pm to be able to get serials with their statuses.
Now the sub ModSerialStatus checks for other serials with an "expected" status before doing anything.

Also modified Serials.t to be able to test those changes.

Test Plan
1) Apply patch
2) Run ./t/db_dependent/Serials.t
3) Validate that there are no errors
4) Go on "Serial collection information" page for a serial of your choice
5) Click on "Generate next"
6) Change the status of the original serial from "late" to "expected"
7) Change the newly generated serial from "expected" to "delete"
8) Validate that there are no new serials created by instruction 7 and that the serial was deleted
9) Run ./t/db_dependent/Serials.t

With QA Fixes

- Use the constant instead of the code (1 vs EXPECTED)
- Avoid interpolation in query
- use selectall_arrayref instead of fetchall_arrayref

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 10fd9f5ec0d5faa7b54b0bfaf5a7b8fccd665f0a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 695dc4c370d4d170b41447c583c8bfe91b0609e2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
C4/Serials.pm
t/db_dependent/Serials.t [changed mode: 0644->0755]