Bug 19772 - Wrong success message if CHECKOUT_NOTE is not defined
Summary: Wrong success message if CHECKOUT_NOTE is not defined
Status: ASSIGNED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on: 17698
Blocks:
  Show dependency treegraph
 
Reported: 2017-12-07 13:46 UTC by Jonathan Druart
Modified: 2018-04-01 13:54 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2017-12-07 13:46:51 UTC
There is no PATRON_NOTE notice template created for new installation.
If the pref (AllowCheckoutNotes) is set to on, a patron can let a note from the OPAC and the message "Your note about $TITLE / has been saved and sent to the library." is display to the screen.

But actually the Koha logs mention "No circulation PATRON_NOTE letter transported by email at /home/vagrant/kohaclone/C4/Letters.pm line 697." and no notice is generated
Comment 1 Aleisha Amohia 2017-12-15 00:33:04 UTC
this will be fixed by the patch in bug 18915.

*** This bug has been marked as a duplicate of bug 18915 ***
Comment 2 Aleisha Amohia 2018-01-24 01:08:13 UTC
Sorry Jonathan, I can't actually reproduce this. When there is no notice called 'CHECKOUT_NOTE' (which is now what the notice is called), the note still saves and the title shows as expected (but obviously the notice isn't sent and the log shows that "No circulation CHECKOUT_NOTE letter transported by email at /home/vagrant/kohaclone/C4/Letters.pm line 697." message)
Comment 3 Jonathan Druart 2018-01-30 19:47:51 UTC
Aleisha, yes it is what I describe :)

The message says "everything is ok and sent" whereas the email has not been sent.
Comment 4 Jonathan Druart 2018-01-30 19:48:42 UTC
Maybe we should disable the feature if the notice template is not configured.
Comment 5 Aleisha Amohia 2018-01-31 00:24:42 UTC
Hi Jonathan,

Sorry I think I'm understanding the problem now. I'll make a fix where the Checkout Notes feature can't be enabled unless the library also has a CHECKOUT_NOTE notice configured. Patch to come soon.
Comment 6 Katrin Fischer 2018-01-31 06:37:31 UTC
Could there be a case where a library wants to activate the feature, but use it without email? We have some cases like the suggestions emails where you just delete the notice in that case. Maybe we could just adapt the text a little and remove the error/warning? Making the options dependent seems more hassle.
Comment 7 Aleisha Amohia 2018-01-31 22:16:49 UTC
(In reply to Katrin Fischer from comment #6)
> Could there be a case where a library wants to activate the feature, but use
> it without email? We have some cases like the suggestions emails where you
> just delete the notice in that case. Maybe we could just adapt the text a
> little and remove the error/warning? Making the options dependent seems more
> hassle.

I'm still working on the patch for Bug 17698 where the checkout notes will be shown on the staff dashboard, similar to how patron modifications are shown. I could add a patch to this bug that depends on 17698 where, if no notice is defined, it will not try to send an email and instead just show the note on the staff dashboard? hope that makes sense.
Comment 8 Katrin Fischer 2018-04-01 13:54:38 UTC
(In reply to Aleisha Amohia from comment #7)
> (In reply to Katrin Fischer from comment #6)
> > Could there be a case where a library wants to activate the feature, but use
> > it without email? We have some cases like the suggestions emails where you
> > just delete the notice in that case. Maybe we could just adapt the text a
> > little and remove the error/warning? Making the options dependent seems more
> > hassle.
> 
> I'm still working on the patch for Bug 17698 where the checkout notes will
> be shown on the staff dashboard, similar to how patron modifications are
> shown. I could add a patch to this bug that depends on 17698 where, if no
> notice is defined, it will not try to send an email and instead just show
> the note on the staff dashboard? hope that makes sense.

Yep, makes sense to me! I have taken a look on bug 17698 and it looks promising. Linking both reports now.