Bugzilla – Attachment 2514 Details for
Bug 4211
Acquisitions actions on suggestions don't generate email
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Followup fix, (includes first patch)
0001-Bug-4211-This-patch-should-provide-a-working-way-to-.patch (text/plain), 8.03 KB, created by
Chris Cormack
on 2010-08-12 21:46:16 UTC
(
hide
)
Description:
Followup fix, (includes first patch)
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2010-08-12 21:46:16 UTC
Size:
8.03 KB
patch
obsolete
>From 25887e31848d3da9bf2762cb8f39c22d7b1ea014 Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Fri, 13 Aug 2010 09:42:08 +1200 >Subject: [PATCH] Bug 4211: This patch should provide a working way to send out mail from suggestions > >Your suggestion notices template needs to contain things like ><<suggestions.title>> ><<suggestions.author>> >etc > >Squashed commit of the following: > >commit 3f4278bbe8d4c68be9f72d50e1eef6a411dc873d >Author: Chris Cormack <chrisc@catalyst.net.nz> >Date: Fri Aug 13 09:41:34 2010 +1200 > > bug 4211 parsing the letter before we enqueue it > >commit ecdc0ff34c1aa9b96b68d541423ca693e2d63e67 >Author: Chris Cormack <chrisc@catalyst.net.nz> >Date: Fri Aug 13 09:32:09 2010 +1200 > > Changing the query to fetch suggestions data, this is needed for suggestion mail to be sent > >commit ece11d015b945ce119cf7cbc5e2563f4bc8aecf9 >Author: Owen Leonard <oleonard@myacpl.org> >Date: Thu Aug 12 12:36:26 2010 -0400 > > Fix for Bug 4211, Acquisitions actions on suggestions don't generate email > > Assuming 1) The patch for Bug 5126 is approved and 2) Suggestions > notices are added by hand (or from default sql--see Bug 5127) this > correction should get suggestions notices properly enqueued. > > Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> > >commit 5c3bbe7d557b1994be72518746217fc6fc4e5b83 >Author: Owen Leonard <oleonard@myacpl.org> >Date: Thu Aug 12 12:27:33 2010 -0400 > > Fix for Bug 5126 - Suggestions module missing from "add notice" form > > - Adding "suggestions" entry > - Re-ordering options in alphabetical order > > Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > C4/Letters.pm | 3 +- > C4/Suggestions.pm | 11 ++++++--- > .../prog/en/modules/tools/letter.tmpl | 23 ++++++++++++------- > 3 files changed, 22 insertions(+), 15 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 885ed5f..592fa73 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -483,11 +483,10 @@ 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 '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 = ?" : >- ($table eq 'suggestions' ) ? "SELECT * FROM $table WHERE borrowernumber = ? and biblionumber = ?" : >+ ($table eq 'suggestions' ) ? "SELECT * FROM $table WHERE suggestionid = ?" : > ($table eq 'aqbooksellers') ? "SELECT * FROM $table WHERE id = ?" : undef ; > unless ($query) { > warn "ERROR: No parseletter_sth query for table '$table'"; >diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm >index b5eb7a4..87a71e4 100644 >--- a/C4/Suggestions.pm >+++ b/C4/Suggestions.pm >@@ -379,18 +379,21 @@ Note that there is no function to modify a suggestion. > sub ModSuggestion { > my ($suggestion)=@_; > my $status_update_table=UpdateInTable("suggestions", $suggestion); >- # check mail sending. >+# check mail sending. > if ($$suggestion{STATUS}){ > my $letter=C4::Letters::getletter('suggestions',$suggestion->{STATUS}); > if ($letter){ >- my $enqueued = C4::Letters::EnqueueLetter({ >+ C4::Letters::parseletter($letter, 'borrowers', $suggestion->{suggestedby}); >+ C4::Letters::parseletter($letter, 'suggestions', $suggestion->{suggestionid}); >+ C4::Letters::parseletter($letter, 'biblio', $suggestion->{biblionumber}); >+ my $enqueued = C4::Letters::EnqueueLetter({ > letter=>$letter, > borrowernumber=>$suggestion->{suggestedby}, > suggestionid=>$suggestion->{suggestionid}, > LibraryName => C4::Context->preference("LibraryName"), >- msg_transport_type=>'email' >+ message_transport_type=>'email' > }); >- if (!$enqueued){warn "can't enqueue letter $letter";} >+ if (!$enqueued){warn "can't enqueue letter $letter";} > } > } > return $status_update_table; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tmpl >index 8f52903..b2b2789 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tmpl >@@ -190,10 +190,10 @@ $(document).ready(function() { > <!--TMPL_ELSE--> > <option value="catalogue" >Catalog</option> > <!--/TMPL_IF--> >- <!--TMPL_IF Name="serial"--> >- <option value="serial" selected="selected">Serials (Routing List)</option> >+ <!--TMPL_IF Name="circulation"--> >+ <option value="circulation" selected="selected">Circulation</option> > <!--TMPL_ELSE--> >- <option value="serial">Serials (Routing List)</option> >+ <option value="circulation">Circulation</option> > <!--/TMPL_IF--> > <!--TMPL_IF Name="claimacquisition"--> > <option value="claimacquisition" selected="selected">Claim Acquisition</option> >@@ -205,20 +205,25 @@ $(document).ready(function() { > <!--TMPL_ELSE--> > <option value="claimissues">Claim Serial Issue</option> > <!--/TMPL_IF--> >- <!--TMPL_IF Name="circulation"--> >- <option value="circulation" selected="selected">Circulation</option> >+ <!--TMPL_IF Name="reserves"--> >+ <option value="reserves" selected="selected">Holds</option> > <!--TMPL_ELSE--> >- <option value="circulation">Circulation</option> >+ <option value="reserves">Holds</option> > <!--/TMPL_IF--> > <!--TMPL_IF Name="members"--> > <option value="members" selected="selected">Members</option> > <!--TMPL_ELSE--> > <option value="members">Members</option> > <!--/TMPL_IF--> >- <!--TMPL_IF Name="reserves"--> >- <option value="reserves" selected="selected">Holds</option> >+ <!--TMPL_IF Name="serial"--> >+ <option value="serial" selected="selected">Serials (Routing List)</option> > <!--TMPL_ELSE--> >- <option value="reserves">Holds</option> >+ <option value="serial">Serials (Routing List)</option> >+ <!--/TMPL_IF--> >+ <!--TMPL_IF Name="suggestions"--> >+ <option value="suggestions" selected="selected">Suggestions</option> >+ <!--TMPL_ELSE--> >+ <option value="suggestions">Suggestions</option> > <!--/TMPL_IF--> > </select> > </li> >-- >1.7.0.4 >
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 4211
:
2512
| 2514