Bug 7848

Summary: Issues data missing from circulation notices
Product: Koha Reporter: Kyle M Hall <kyle.m.hall>
Component: NoticesAssignee: Kyle M Hall <kyle.m.hall>
Status: CLOSED FIXED QA Contact: Ian Walls <koha.sekjal>
Severity: major    
Priority: P5 - low CC: chris, paul.poulain, wizzyrea
Version: 3.8   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 7848 - Issues data missing from circulation notices
Bug 7848 - Issues data missing from circulation notices
Bug 7848 - Issues data missing from circulation notices
[Signed Off] Bug 7848 - Issues data missing from circulation notices
Bug 7848 - Issues data missing from circulation notices

Description Kyle M Hall 2012-03-29 15:33:34 UTC
For the CHECKIN and CHECKOUT notices, any data that is issue specific does not show. For example, date due.
Comment 1 Kyle M Hall 2012-03-29 15:37:19 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2012-04-01 12:42:18 UTC
Hi Kyle, 
this is marked 3.6 - is this patch only relevant for 3.6 or also for master?
Comment 3 Katrin Fischer 2012-04-01 12:54:14 UTC
I tested this on current master and see some problems in the generated messages.

My CHECKOUT notice looks like this:
-------------------------------------------------------------------
Die folgenden Medien wurden entliehen:


<<biblio.title>> <<issues.date_due>> 

Vielen Dank für Ihren Besuch in <<branches.branchname>>.

-------------------------------------------------------------------


The output after checking out 2 items is:
-------------------------------------------------------------------
Die folgenden Medien wurden entliehen:


Die Kultur der Gegenwart 2012-04-15 23:59:00

Vielen Dank für Ihren Besuch in Midway.Die folgenden Medien wurden entliehen:


Die Kultur der Gegenwart 2012-04-15 23:59:00

Vielen Dank für Ihren Besuch in Midway. 
-------------------------------------------------------------------

Note: This is one message, for 2 different items of the same title. Part of the message gets repeated - I think this should not happen and I am not sure why it does.

My CHECKIN notice looks like this:
-------------------------------------------------------------------
Die folgenden Medien wurden zurückgegeben:

----
<<biblio.title>> <<issues.itemnumber>><<issues.date_due>>
----

Vielen Dank.
-------------------------------------------------------------------

Checking in the same items as before, gives me following output:
-------------------------------------------------------------------
Die folgenden Medien wurden zurückgegeben:

Die Kultur der Gegenwart
Die Kultur der Gegenwart

Vielen Dank. 
-------------------------------------------------------------------
Note: This time the list is ok, as no other parts of the message are repeated, but the information from the issues table does not show up.

I think instead of the issues table or in addition to it we should make the items table available, so that barcode and callnumber can be added to the notices.
Comment 4 Kyle M Hall 2012-04-02 15:16:06 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2012-04-02 15:20:06 UTC
(In reply to comment #4)

It may be that you have your repetition lines in the wrong places. For example, take this notice:

The following items have been checked out:
----
<<biblio.title>> DUE ON: <<issues.date_due>>
----
Thank you for visiting <<branches.branchname>>.

Anything between the dashes will be repeated. I should also not that repetition in various notices is done in different ways. Some notices use tags like <items>Repeated Content</items> instead. This should really be standardized throughout the notice system.
Comment 6 Katrin Fischer 2012-04-02 15:23:41 UTC
Hi Kyle, thx for this hint! I didn't know about the 'repetition lines' and I agree that it would be nice to standardize the syntax for repeating parts of the notices.
Comment 7 Liz Rea 2012-05-11 14:19:49 UTC
I confirm Katrin's issue with the checkin notice - the data from the issues table does not appear in the generated notices.

Failing QA.
Comment 8 Kyle M Hall 2012-05-22 14:50:34 UTC Comment hidden (obsolete)
Comment 9 Liz Rea 2012-05-31 14:35:17 UTC Comment hidden (obsolete)
Comment 10 Ian Walls 2012-06-04 15:32:28 UTC
Unconditional WARNs need to be removed.  Once that's done, this can do to Passed QA.
Comment 11 Kyle M Hall 2012-07-02 12:35:46 UTC
Created attachment 10599 [details] [review]
Bug 7848 - Issues data missing from circulation notices

For the CHECKIN and CHECKOUT notices, any data that is issue specific
does not show. For example, date due.

For CHECKOUT, this is caused not passing in the issues table as part
of the 'table' hash used by C4::Letters::GetPreparedLetter.

For CHECKIN notices, we need the old_issues table instead, as the item
has already been returned.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
passes tests, correct information shows in notices.
Comment 12 Paul Poulain 2012-07-10 11:52:16 UTC
QA comment
 * Ian comment 10 (conditional warn) fixed
 * C4 files modified did not pass perlcritic before, they still don't (most of the errors are ["return" statement with explicit "undef" ...] and [Subroutine prototypes used]
 * No other comment, code integrates smoothly with existing code

passed QA
Comment 13 Chris Cormack 2012-07-11 22:47:50 UTC
Seems to work well, pushed to 3.8.x will be in 3.8.3
Comment 14 Jared Camins-Esakov 2012-08-02 21:34:31 UTC
If this is intended to apply to 3.6.x, please provide a patch rebased against 3.6-testing.