Bug 7756 - claim mail is not sent for serial claim
Summary: claim mail is not sent for serial claim
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low blocker (vote)
Assignee: Jonathan Druart
QA Contact: Ian Walls
URL:
Keywords:
Depends on: 5342 5347
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-20 11:42 UTC by jmbroust
Modified: 2019-06-27 09:24 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 7756: FIX send email for late orders (2.66 KB, patch)
2012-04-10 08:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 7756: FIX send email for late orders (2.82 KB, patch)
2012-04-10 19:53 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description jmbroust 2012-03-20 11:42:21 UTC
appeared while testing patch 5342 on biblibre sandbox 1 : the mail of claim is not sent not in message queue. Logs says vendor has no mail but it does have ! (apache error claims.pl bookseller without email at home/koha/src/c4/letters.pm line 340)
Comment 1 Katrin Fischer 2012-04-09 06:58:13 UTC
I retested on current master and the logs show this message without the patch from 5342 - the bug is not related to the feature itself. It's broken in general.

[Mon Apr 09 08:45:09 2012] [error] [client 127.0.0.1] [Mon Apr  9 08:45:09 2012] claims.pl: Use of uninitialized value in concatenation (.) or string at /home/katrin/kohaclone/C4/Letters.pm line 340., referer: http://localhost:8080/cgi-bin/koha/serials/claims.pl
[Mon Apr 09 08:45:09 2012] [error] [client 127.0.0.1] [Mon Apr  9 08:45:09 2012] claims.pl: Bookseller  without emails at /home/katrin/kohaclone/C4/Letters.pm line 340., referer: http://localhost:8080/cgi-bin/koha/serials/claims.pl
Comment 2 Jonathan Druart 2012-04-10 08:11:13 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2012-04-10 08:16:03 UTC
Hi Jonathan, 
thank you for your patch! I will test asap!
Comment 4 Katrin Fischer 2012-04-10 19:50:09 UTC
Hi Jonathan, 

1) The claim counter only increases, when an email for the vendor is set and a success is reported. So that's good!

2) From other tests, I had deleted my email address from the patron, the branch and KohaAdminEmailAdress. So when I claimed, no email was generated and I got the following error in the logs:

[Tue Apr 10 21:28:29 2012] [error] [client 127.0.0.1] [Tue Apr 10 21:28:29 2012] lateorders.pl: Bad or missing From address: '', referer: http://localhost:8080/cgi-bin/koha/acqui/lateorders.pl
[Tue Apr 10 21:28:29 2012] [error] [client 127.0.0.1] [Tue Apr 10 21:28:29 2012] lateorders.pl:  at /home/katrin/kohaclone/acqui/lateorders.pl line 83, referer: http://localhost:8080/cgi-bin/koha/acqui/lateorders.pl

It would be great, if there was an error message for a missing from address as there is one for missing vendor address now.

After I fixed the emails - mail was sent out :)

3) I noticed a little new problem, that is not urgent: The order date ___ days ago filter has no value set, so when you filter on vendor without putting in a value or if you send claim letters, a red error message shows up: The number of days () must be a number between 0 and 999. 
Perhaps with a default value of 0 this would work?

I am signing off as this patch fixes 2 problems:
- sending mail now works again
- claim counter is not increased when vendor had no email addres
Comment 5 Katrin Fischer 2012-04-10 19:51:14 UTC
Hm, I think this is the bug for serial claims, but the patch is for late order claims... ?
Comment 6 Katrin Fischer 2012-04-10 19:53:11 UTC
Created attachment 9090 [details] [review]
[SIGNED-OFF] Bug 7756: FIX send email for late orders

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- sending claim mails works now
- claim counter is not increased when vendor has no email address
Comment 7 Ian Walls 2012-04-10 20:12:27 UTC
Adds booksellerid back to the Alert SQL, and does some better checking for existence of things before using them.  Marking Passed QA.
Comment 8 Jonathan Druart 2012-04-12 15:09:44 UTC
(In reply to comment #4)
> 3) I noticed a little new problem, that is not urgent: The order date ___
> days ago filter has no value set, so when you filter on vendor without
> putting in a value or if you send claim letters, a red error message shows
> up: The number of days () must be a number between 0 and 999. 
> Perhaps with a default value of 0 this would work?

Hi Katrin, 
I can't reproduce this problem. On the late orders page, I select a vendor and click on the filter button. I don't have the error message.
Comment 9 Jonathan Druart 2012-04-13 07:19:34 UTC
Ok, fixed (I hope) in the last submitted patch for Bug 5347
Comment 10 Katrin Fischer 2012-04-15 18:30:58 UTC
Sending serial claims now works for me and I have signed off on the patch on bug 5347 that fixes problems with late order claims.
I am marking this bug resolved to end the confusion. If we find more problems with serial claims, those can go on separate bugs.