Bugzilla – Attachment 4648 Details for
Bug 5263
Add support for including fields from the ISSUES table in advanced due notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 5263 - Add support for including fields from the ISSUES table in advanced due notices
SIGNED-OFF-Bug-5263---Add-support-for-including-fi.patch (text/plain), 4.91 KB, created by
Katrin Fischer
on 2011-07-17 21:44:37 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 5263 - Add support for including fields from the ISSUES table in advanced due notices
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2011-07-17 21:44:37 UTC
Size:
4.91 KB
patch
obsolete
>From 0a07af7bd9219fe0d3aa4ca50feb70c8ce010184 Mon Sep 17 00:00:00 2001 >From: Chris Nighswonger <cnighswonger@foundations.edu> >Date: Wed, 29 Sep 2010 09:27:30 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 5263 - Add support for including fields from the ISSUES table in advanced due notices >Content-Type: text/plain; charset="utf-8" > >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> >--- > C4/Letters.pm | 2 ++ > misc/cronjobs/advance_notices.pl | 7 ++++++- > tools/letter.pl | 3 ++- > 3 files changed, 10 insertions(+), 2 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index cb47c7e..6846a00 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -489,6 +489,8 @@ sub parseletter_sth { > ($table eq 'biblio' ) ? "SELECT * FROM $table WHERE biblionumber = ?" : > ($table eq 'biblioitems' ) ? "SELECT * FROM $table WHERE biblionumber = ?" : > ($table eq 'items' ) ? "SELECT * FROM $table WHERE itemnumber = ?" : >+ ($table eq 'issues' ) ? "SELECT * FROM $table WHERE itemnumber = ?" : >+ ($table eq 'suggestions' ) ? "SELECT * FROM $table WHERE borrowernumber = ? and biblionumber = ?" : > ($table eq 'reserves' ) ? "SELECT * FROM $table WHERE borrowernumber = ? and biblionumber = ?" : > ($table eq 'borrowers' ) ? "SELECT * FROM $table WHERE borrowernumber = ?" : > ($table eq 'branches' ) ? "SELECT * FROM $table WHERE branchcode = ?" : >diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl >index a573e96..3ca4835 100755 >--- a/misc/cronjobs/advance_notices.pl >+++ b/misc/cronjobs/advance_notices.pl >@@ -170,6 +170,7 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { > borrowernumber => $upcoming->{'borrowernumber'}, > branchcode => $upcoming->{'branchcode'}, > biblionumber => $biblio->{'biblionumber'}, >+ itemnumber => $upcoming->{'itemnumber'}, > substitute => { 'items.content' => $titles } > } ); > } >@@ -201,6 +202,7 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { > borrowernumber => $upcoming->{'borrowernumber'}, > branchcode => $upcoming->{'branchcode'}, > biblionumber => $biblio->{'biblionumber'}, >+ itemnumber => $upcoming->{'itemnumber'}, > substitute => { 'items.content' => $titles } > } ); > } >@@ -345,10 +347,13 @@ sub parse_letter { > if ( $params->{'branchcode'} ) { > C4::Letters::parseletter( $params->{'letter'}, 'branches', $params->{'branchcode'} ); > } >- >+ if ( $params->{'itemnumber'} ) { >+ C4::Letters::parseletter( $params->{'letter'}, 'issues', $params->{'itemnumber'} ); >+ } > if ( $params->{'biblionumber'} ) { > C4::Letters::parseletter( $params->{'letter'}, 'biblio', $params->{'biblionumber'} ); > C4::Letters::parseletter( $params->{'letter'}, 'biblioitems', $params->{'biblionumber'} ); >+ C4::Letters::parseletter( $params->{'letter'}, 'items', $params->{'biblionumber'} ); > } > > return $params->{'letter'}; >diff --git a/tools/letter.pl b/tools/letter.pl >index ab6039c..39c2ffb 100755 >--- a/tools/letter.pl >+++ b/tools/letter.pl >@@ -172,7 +172,7 @@ sub add_form { > push @{$field_selection}, add_fields('biblio','biblioitems'), > {value => q{}, text => '---ITEMS---' }, > {value => 'items.content', text => 'items.content'}, >- add_fields('borrowers'); >+ add_fields('issues','borrowers'); > } > > $template->param( >@@ -309,6 +309,7 @@ sub get_columns_for { > my $table_prefix = $table . q|.|; > my $rows = C4::Context->dbh->selectall_arrayref($sql, { Slice => {} }); > for my $row (@{$rows}) { >+ next if $row->{'Field'} eq 'timestamp'; # this is really an irrelevant field and there may be other common fields that should be excluded from the list > push @fields, { > value => $table_prefix . $row->{Field}, > text => $table_prefix . $row->{Field}, >-- >1.7.4.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 5263
:
4583
| 4648 |
5678