Bugzilla – Attachment 193488 Details for
Bug 39726
Remove ConnectSuggestionAndBiblio from C4/Suggestions.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39726: Remove op connectDuplicate from acqui/newordersuggestions.pl
Bug-39726-Remove-op-connectDuplicate-from-acquinew.patch (text/plain), 4.34 KB, created by
Baptiste Wojtkowski (bwoj)
on 2026-02-19 15:48:52 UTC
(
hide
)
Description:
Bug 39726: Remove op connectDuplicate from acqui/newordersuggestions.pl
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2026-02-19 15:48:52 UTC
Size:
4.34 KB
patch
obsolete
>From 2c8c7a302e2619ba67c21147d5fc2134ed71e2fd Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >Date: Thu, 19 Feb 2026 15:46:25 +0000 >Subject: [PATCH] Bug 39726: Remove op connectDuplicate from > acqui/newordersuggestions.pl > >ConnectDuplicate does not appear to be used anywhere. >No test plan to provide here. >git grep connectDuplicate should return nothing > >Since there is no cud-, it would at least have been broken for a year >--- > C4/Suggestions.pm | 21 --------------------- > acqui/newordersuggestion.pl | 13 ++----------- > t/db_dependent/Suggestions.t | 14 ++------------ > 3 files changed, 4 insertions(+), 44 deletions(-) > >diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm >index e83713952a1..d80e452a744 100644 >--- a/C4/Suggestions.pm >+++ b/C4/Suggestions.pm >@@ -23,7 +23,6 @@ use base 'Exporter'; > > BEGIN { > our @EXPORT = qw( >- ConnectSuggestionAndBiblio > DelSuggestion > GetSuggestion > ModStatus >@@ -151,26 +150,6 @@ sub ModSuggestion { > return 1; # No useful if the exception is raised earlier > } > >-=head2 ConnectSuggestionAndBiblio >- >-&ConnectSuggestionAndBiblio($ordernumber,$biblionumber) >- >-connect a suggestion to an existing biblio >- >-=cut >- >-sub ConnectSuggestionAndBiblio { >- my ( $suggestionid, $biblionumber ) = @_; >- my $dbh = C4::Context->dbh; >- my $query = q{ >- UPDATE suggestions >- SET biblionumber=? >- WHERE suggestionid=? >- }; >- my $sth = $dbh->prepare($query); >- $sth->execute( $biblionumber, $suggestionid ); >-} >- > =head2 DelSuggestion > > &DelSuggestion($borrowernumber,$ordernumber) >diff --git a/acqui/newordersuggestion.pl b/acqui/newordersuggestion.pl >index 02bfa2cfc3b..651499977ae 100755 >--- a/acqui/newordersuggestion.pl >+++ b/acqui/newordersuggestion.pl >@@ -77,12 +77,7 @@ the id of the suggestion to select. > > =item op > >-can be equal to >- * connectDuplicate : >- then call to the function : ConnectSuggestionAndBiblio. >- i.e set the biblionumber of this suggestion. >- * else : >- is the default value. >+The operation to perform > > =back > >@@ -93,7 +88,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 ModSuggestion ); >+use C4::Suggestions qw( ModSuggestion ); > use C4::Budgets; > > use Koha::Acquisition::Booksellers; >@@ -125,10 +120,6 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > } > ); > >-if ( $op eq 'connectDuplicate' ) { >- ConnectSuggestionAndBiblio( $suggestionid, $duplicateNumber ); >-} >- > if ( $op eq 'cud-link_order' and $link_order ) { > my $order = Koha::Acquisition::Orders->find($link_order); > >diff --git a/t/db_dependent/Suggestions.t b/t/db_dependent/Suggestions.t >index 14016928b8b..f617947a43a 100755 >--- a/t/db_dependent/Suggestions.t >+++ b/t/db_dependent/Suggestions.t >@@ -19,7 +19,7 @@ use Modern::Perl; > > use DateTime::Duration; > use Test::NoWarnings; >-use Test::More tests => 53; >+use Test::More tests => 50; > use Test::Warn; > > use t::lib::Mocks; >@@ -38,7 +38,7 @@ use Koha::Suggestions; > BEGIN { > use_ok( > 'C4::Suggestions', >- qw( ModSuggestion ConnectSuggestionAndBiblio DelSuggestion MarcRecordFromNewSuggestion GetUnprocessedSuggestions DelSuggestionsOlderThan ) >+ qw( ModSuggestion DelSuggestion MarcRecordFromNewSuggestion GetUnprocessedSuggestions DelSuggestionsOlderThan ) > ); > } > >@@ -310,16 +310,6 @@ $messages = C4::Letters::GetQueuedMessages( { borrowernumber => $borrowernumber2 > > is( scalar(@$messages), 1, 'No new letter should have been generated if the update raised an error' ); > >-is( ConnectSuggestionAndBiblio(), '0E0', 'ConnectSuggestionAndBiblio without arguments returns 0E0' ); >-my $biblio_2 = $builder->build_object( { class => 'Koha::Biblios' } ); >-my $connect_suggestion_and_biblio = ConnectSuggestionAndBiblio( $my_suggestionid, $biblio_2->biblionumber ); >-is( $connect_suggestion_and_biblio, '1', 'ConnectSuggestionAndBiblio returns 1' ); >-$suggestion = Koha::Suggestions->find($my_suggestionid); >-is( >- $suggestion->biblionumber, $biblio_2->biblionumber, >- 'ConnectSuggestionAndBiblio updates the biblio number correctly' >-); >- > my $del_suggestion = { > title => 'my deleted title', > STATUS => 'CHECKED', >-- >2.43.0
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 39726
:
181407
|
181408
|
181421
| 193488