Bug 5263 - Add support for including fields from the ISSUES table in advanced due notices
Summary: Add support for including fields from the ISSUES table in advanced due notices
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: 3.4
Hardware: All All
: PATCH-Sent (DO NOT USE) enhancement (vote)
Assignee: Chris Nighswonger
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 13:26 UTC by Chris Nighswonger
Modified: 2013-12-05 20:04 UTC (History)
5 users (show)

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


Attachments
Bug 5263 - Add support for including fields from the ISSUES table in advanced due notices (4.80 KB, patch)
2011-07-07 22:18 UTC, Chris Cormack
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 5263 - Add support for including fields from the ISSUES table in advanced due notices (4.91 KB, patch)
2011-07-17 21:44 UTC, Katrin Fischer
Details | Diff | Splinter Review
Follow up Patch (1.58 KB, patch)
2011-10-03 14:50 UTC, Ian Walls
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Nighswonger 2010-09-29 13:26:42 UTC
Add support for including fields from the Issues table in advanced due notices. This is primarily to allow the inclusion of the due date for each item in the advanced due notice, but will allow the inclusion of any field from the ISSUES table.

This also adds code to exclude timestamp fields as these are irrelevant to the end user in this context.
Comment 1 Chris Nighswonger 2010-09-29 13:41:01 UTC
Related patches can be picked up here:

http://git.koha-community.org/gitweb/?p=wip/koha-fbc.git;a=shortlog;h=refs/heads/k_bug_5263
Comment 2 Nicole C. Engard 2011-03-08 00:28:48 UTC
Does not apply:


Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all y
Applying: Bug 5263 - Add support for including fields from the ISSUES table in advanced due notices
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging C4/Letters.pm
CONFLICT (content): Merge conflict in C4/Letters.pm
Auto-merging tools/letter.pl
Failed to merge in the changes.
Patch failed at 0001 Bug 5263 - Add support for including fields from the ISSUES table in advanced due notices
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
nengard@debian:~/kohaclone$
Comment 3 Chris Cormack 2011-07-07 22:18:52 UTC Comment hidden (obsolete)
Comment 4 Nicole C. Engard 2011-07-08 17:48:00 UTC
The patch applies and the fields are available, but I added the due date and the issuedate to the checkout notice and instead of values showing I saw <> and <> for the two values I tried to add.

Is there another way to test this?

Nicole
Comment 5 Katrin Fischer 2011-07-17 21:42:45 UTC
I checked both PREDUE and PREDUEDGST with following results:

PREDUE notice: 
borrowernumber <<issues.borrowernumber>>
itemnumber <<issues.itemnumber>>
date_due <<issues.date_due>>
branchcode <<issues.branchcode>>
issuingbranch <<issues.issuingbranch>>
returndate <<issues.returndate>>
lastrenewddate <<issues.lastreneweddate>>
return <<issues.return>>
renewals <<issues.renewals>>
issuedate <<issues.issuedate>>

PREDUE result:
borrowernumber 19

itemnumber 8

date_due 2011-07-18

branchcode MPL

issuingbranch 

returndate 

lastrnewddate 

return 

renewals 

issuedate 2011-07-17

RESULT: OK - Improvement, but date formatting is wrong.

PREDUEDGST:
<<items.content>>
./misc/cronjobs/advance_notices.pl -i date_due,branchcode,itemnumber,borrowernumber,issuedate

PREDUEDGST:
07/18/2011	MPL	8	19	07/17/2011

RESULT: OK - Date formatting is correct too.

I am signing off.
Comment 6 Katrin Fischer 2011-07-17 21:44:37 UTC
Created attachment 4648 [details] [review]
[SIGNED-OFF] Bug 5263 - Add support for including fields from the ISSUES table in advanced due notices

Adding support for including fields from the Issues table in advanced due notices.
This is primarily to allow the inclusion of the due date for each item in the
advanced due notice, but will allow the inclusion of any field from the ISSUES
table.

This also adds code to exclude timestamp fields as these are irrelevant to the
end user in this context.

Note: Documentation should be updated to reflect the availability of the additional
fields in all circulation notices.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 7 Chris Cormack 2011-08-02 01:01:17 UTC
Pushed to master, please test
Comment 8 Ian Walls 2011-10-03 14:42:30 UTC
This patch has the items table being parsed with biblionumber as Key, which will result in all item information being wrong, unless itemnumber happens to equal biblionumber.  Marking this as Failed QA, though it's a little late.

I'll work on the fix and submit as a followup.
Comment 9 Ian Walls 2011-10-03 14:50:51 UTC
Created attachment 5678 [details] [review]
Follow up Patch

Fixes the issue introduced by the original patch of the items table being keyed in using the biblionumber
Comment 10 Chris Cormack 2011-10-03 19:55:29 UTC
Pushed the follow up, please test again
Comment 11 Jared Camins-Esakov 2012-12-30 23:58:06 UTC
There have been no further reports of problems so I am marking this bug resolved.