Bugzilla – Attachment 175624 Details for
Bug 31632
Add ability to manually link orders to suggestions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31632: (QA follow-up) Align behavior with order from suggestion
Bug-31632-QA-follow-up-Align-behavior-with-order-f.patch (text/plain), 2.11 KB, created by
Emily Lamancusa (emlam)
on 2024-12-17 14:35:59 UTC
(
hide
)
Description:
Bug 31632: (QA follow-up) Align behavior with order from suggestion
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2024-12-17 14:35:59 UTC
Size:
2.11 KB
patch
obsolete
>From 08c0b8b8960257a5b419c83fb702a1414a946311 Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Date: Wed, 4 Dec 2024 10:49:32 -0500 >Subject: [PATCH] Bug 31632: (QA follow-up) Align behavior with order from > suggestion > >If an order is added from a suggestion in the first place, the >suggestion automatically changes status to ORDERED, and a notice is >sent out to the patron. If a suggestion is linked to the order after >the fact, it should move to ORDERED and notify the patron as well. > >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >--- > acqui/newordersuggestion.pl | 21 ++++++++++++++++++--- > 1 file changed, 18 insertions(+), 3 deletions(-) > >diff --git a/acqui/newordersuggestion.pl b/acqui/newordersuggestion.pl >index 3c467892f7..4ae693c54b 100755 >--- a/acqui/newordersuggestion.pl >+++ b/acqui/newordersuggestion.pl >@@ -93,7 +93,7 @@ use Modern::Perl; > use CGI qw ( -utf8 ); > use C4::Auth qw( get_template_and_user ); > use C4::Output qw( output_html_with_http_headers ); >-use C4::Suggestions qw( ConnectSuggestionAndBiblio ); >+use C4::Suggestions qw( ConnectSuggestionAndBiblio ModSuggestion ); > use C4::Budgets; > > use Koha::Acquisition::Booksellers; >@@ -131,8 +131,23 @@ if ( $op eq 'connectDuplicate' ) { > > if ( $op eq 'cud-link_order' and $link_order ) { > my $order = Koha::Acquisition::Orders->find($link_order); >- my $suggestion = Koha::Suggestions->find($suggestionid); >- $suggestion->update( { biblionumber => $order->biblionumber } ) if $order->biblionumber; >+ >+ if($order->biblionumber) { >+ ModSuggestion( >+ { >+ suggestionid => $suggestionid, >+ biblionumber => $order->biblionumber, >+ STATUS => 'ORDERED', >+ } >+ ); >+ if ( C4::Context->preference('PlaceHoldsOnOrdersFromSuggestions') ) { >+ my $suggestion = Koha::Suggestions->find($suggestionid); >+ if ($suggestion) { >+ $suggestion->place_hold(); >+ } >+ } >+ } >+ > print $input->redirect( "/cgi-bin/koha/acqui/basket.pl?basketno=" . $basketno ); > } > >-- >2.34.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 31632
:
141028
|
141029
|
141030
|
169391
|
170147
|
170148
|
170953
|
174393
|
174394
|
174395
|
174415
|
174416
|
174417
|
175620
|
175621
|
175622
|
175623
|
175624
|
176281
|
176282
|
179957
|
179958
|
179959
|
179960
|
179961
|
179962