When receiving a subscription item, Koha will assume that you want to create a new subscription item (which will be put in the "expected" status) every time. How to reproduce this: 1. Someone accidentally changes something to "received" and then changes it back to "expected". -> a new item in subscriptions has been generated 2. Now we go and change that accidentally changed item back to "received". -> a new item in subscriptions has been generated 3. Now there is two new items waiting to be received. Normally there should be just one. 4. and what if someone changes the status 10 times accidentally to received.. Then there would be 10 new items waiting with the status "expected". Also when you add the last item of that specific subscription period Koha shouldn't generate the maybe future subscriptions item there. There is a huge bug(?) in the C4::Serials::abouttoexpire(), so fixing this might be difficult. The bug is that originally periodic subscription has been changed to non-periodic in the renewal phase and then it doesn't take that account.
Created attachment 43879 [details] [review] Bug 15055: Koha generates new subscription item even when it's not necessary Do checking whether the item which is been received is already in the system or not. If it is, then do not generate a new subscription item. Sponsored-by: Vaara-kirjastot This is a work-in-progress version (may not even apply but look at the code). This doesn't work optimally with the subscription expiration situation (when the abouttoexpire fixed, now it works in some cases) In order to get this working we need to call the C4::Serials::GenerateNewIssue also when we renew the subscription.