Hi, SERIAL_ALERT email sends itself correctly when the status of the issue changes from Expected to Arrived. But the issues goes from Expected to Claimed and then to Arrived, the email does not send. I also tested it with other status. Only the way Expected> Arrived works. Is it normal? Version tested: 18.05.04 REgards, Marjorie
still valid in 21.05
I've just verified this on master: Expected - Arrived - Sends email Late - Arrived - NO email Missing - Arrived - NO email I believe every time an issue changes to Arrived, we should send the email. If a late issue arrives, the user should be informed, also if a missing one is found or made available.
ModSerialStatus has 2 checks: # create new expected entry if needed (ie : was "expected" and has changed) my $otherIssueExpected = scalar findSerialsByStatus(EXPECTED, $subscriptionid); if ( !$otherIssueExpected && $oldstatus == EXPECTED && $status != EXPECTED ) { And within: if ( $subscription->{letter} && $status == ARRIVED && $oldstatus != ARRIVED ) { require C4::Letters; C4::Letters::SendAlerts( 'issue', $serialid, $subscription->{letter} ); } I am tempted to move the second if outside of the first one that has the expected check... might do that for testing.
If I understand the code correctly: As soon as there is another 'Expected' issue, changing any of the old issues to 'Arrived' will no longer create an email. If you are using the cron to automatically set issues late, which always creates the next issue as well, you are possibly going to miss out on a lot of emails to patrons that they expected/have waited for. Same if you set an issue to missing - it auto-creates the next issue, taking the changed one out of the email loop. I'd be interested to hear if people agree that this should be changed and how it should work for older (not the currently expected) issues.