Bugzilla – Attachment 179961 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.26 KB, created by
Nick Clemens (kidclamp)
on 2025-03-31 09:49:35 UTC
(
hide
)
Description:
Bug 31632: (QA follow-up) Align behavior with order from suggestion
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-03-31 09:49:35 UTC
Size:
2.26 KB
patch
obsolete
>From 2497c5760f670ad71933884d4e0abe353d138dd1 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> >Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> >--- > acqui/newordersuggestion.pl | 23 +++++++++++++++++++---- > 1 file changed, 19 insertions(+), 4 deletions(-) > >diff --git a/acqui/newordersuggestion.pl b/acqui/newordersuggestion.pl >index 429b6702f7d..344cf79148c 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; >@@ -130,9 +130,24 @@ 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; >+ my $order = Koha::Acquisition::Orders->find($link_order); >+ >+ 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.39.5
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