Bug 13972 - Include fields from subscription and serial table in serial notification email
Summary: Include fields from subscription and serial table in serial notification email
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
: 12437 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-04-08 15:13 UTC by Katrin Fischer
Modified: 2017-01-27 13:26 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 13972: Include fields from subscription and serial table in serial notification email (4.89 KB, patch)
2015-05-25 13:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 13972: Follow-up - Add unit tests for changed parts of SendAlerts (2.94 KB, patch)
2015-05-25 15:02 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 13972: Follow-up - Add unit tests for changed parts of SendAlerts (2.90 KB, patch)
2015-05-25 15:06 UTC, Katrin Fischer
Details | Diff | Splinter Review
[Signed-off] Bug 13972: Include fields from subscription and serial table in serial notification email (5.08 KB, patch)
2015-06-09 16:02 UTC, Marc Véron
Details | Diff | Splinter Review
[Signed-off] Bug 13972: Follow-up - Add unit tests for changed parts of SendAlerts (3.06 KB, patch)
2015-06-09 16:03 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 13972: Include fields from subscription and serial table in serial notification email (5.13 KB, patch)
2015-06-18 10:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13972: Follow-up - Add unit tests for changed parts of SendAlerts (3.11 KB, patch)
2015-06-18 10:43 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2015-04-08 15:13:43 UTC
The sample notice RLIST is used for a notification of the patron when a new issue of a serial arrives (independent from the routing list feature). You can subscribe to the notice from the OPAC - subscription tab - more details.

The notice currently allows to include fields from branches, biblio, biblioitems and borrowers. It would be very good to also include subscriptions, serials and items so you can print information about which field has arrived into the notice.

Related code is here:
http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=C4/Letters.pm;hb=c16e19b3fdff71e20db1df036931d96dfabcce4d#l411
Comment 1 Katrin Fischer 2015-05-25 13:38:33 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2015-05-25 13:39:56 UTC
I know I am missing tests for the changed routine SendAlerts. 
I will probably need some help there.
Comment 3 Katrin Fischer 2015-05-25 15:02:40 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2015-05-25 15:03:29 UTC
I found some existing tests for serial claims - tried to adapt them for the other use case 'issue'. Ready for testing now :)
Comment 5 Katrin Fischer 2015-05-25 15:06:33 UTC Comment hidden (obsolete)
Comment 6 Marc Véron 2015-06-09 16:02:05 UTC Comment hidden (obsolete)
Comment 7 Marc Véron 2015-06-09 16:03:40 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2015-06-18 10:43:18 UTC
Created attachment 40273 [details] [review]
Bug 13972: Include fields from subscription and serial table in serial notification email

Currently it's not possible to include information about which
issue has arrived in the serial notification notice the patron
can subscribe to from the OPAC.

The patch makes the fields from the subscription and serial
table available to the notice template.

In order to be able to print information about the correct
issue, the GetAlert has been modified to expext the serialid
as externalid when the module is issue.

git grep SendAlerts (only call with 'issue' is in Serial.pm)

To test:
- Add a subscription, select a patron notification template
- Search for the record in the OPAC
- Go to the subscription tab - More details
- Subscribe to the notification
- Edit the notice template you selected for the subscription
  - add fields from subscription
  - add fields from serial (serial.serialseq has the issue
    information)
- Receive an issue for the subscription
- Check that you have received the notification and that
  all information has been printed correctly
  NOTE: notice is sent directly, not through the message_queue

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Comment 9 Jonathan Druart 2015-06-18 10:43:29 UTC
Created attachment 40274 [details] [review]
Bug 13972: Follow-up - Add unit tests for changed parts of SendAlerts

To test:
- prove t/db_dependent/Letters.t

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Comment 10 Tomás Cohen Arazi 2015-09-02 17:49:06 UTC
Patches pushed to master.

Thanks Katrina!
Comment 11 Katrin Fischer 2017-01-27 13:26:18 UTC
*** Bug 12437 has been marked as a duplicate of this bug. ***