Bug 7688: Fix generating next serial when there is no 'Expected' issue
authorJulian Maurice <julian.maurice@biblibre.com>
Tue, 11 Dec 2012 10:16:54 +0000 (11:16 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sat, 23 Mar 2013 02:14:36 +0000 (22:14 -0400)
commitda5aca223fccdae6b0b64e4c1ba67e65c550242c
treeb31813642fb5a8951d3ec395ec2ee94861aa99b7
parent98d95ae8b8f6590883beb82f9590a3e457f44f74
Bug 7688: Fix generating next serial when there is no 'Expected' issue

It can happen when the Expected issue is claimed. In this case the
status of the last serial is 'Claimed'

This patch change the API of GetNextSeq and GetSeq

Test plan:
- Create a subscription which starts a long time ago so that serials
  automatically appear in late issues
- Receive the first serial
- Go to claims page and claim the 2nd serial.
- Go back to the subscription page and click on 'Serial collection'
- You should have 2 serials, one 'Arrived' and one 'Claimed'.
- Click on Generate Next. This should fail with a software error message
  ("can't call method output ...")
- Apply this patch and click again on Generate Next. A new issue must be
  created with status 'Expected'.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
C4/Serials.pm
serials/serials-collection.pl
serials/showpredictionpattern.pl