Bugzilla – Attachment 171678 Details for
Bug 35659
OAI harvester
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35659: (follow-up) Use new column name in cron script
Bug-35659-follow-up-Use-new-column-name-in-cron-sc.patch (text/plain), 2.29 KB, created by
Andreas Roussos
on 2024-09-18 14:36:36 UTC
(
hide
)
Description:
Bug 35659: (follow-up) Use new column name in cron script
Filename:
MIME Type:
Creator:
Andreas Roussos
Created:
2024-09-18 14:36:36 UTC
Size:
2.29 KB
patch
obsolete
>From 12919ad44578ef30545b6b4389bd8e4718fd8d7c Mon Sep 17 00:00:00 2001 >From: Andreas Roussos <a.roussos@dataly.gr> >Date: Wed, 18 Sep 2024 14:01:21 +0000 >Subject: [PATCH] Bug 35659: (follow-up) Use new column name in cron script > >In an earlier patch, the `id` column of the `oai_servers` >table was renamed to `oai_server_id`. However, the code >in misc/cronjobs/harvest_oai.pl still uses the old column >name, which results in the following error: > >$ misc/cronjobs/harvest_oai.pl --list >DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'id' in 'order clause' at /kohadevbox/koha/Koha/Objects.pm line 403 > >This patch fixes that. > >Test plan: > >1) $ misc/cronjobs/harvest_oai.pl --list > [...you get the DBI Exception...] >2) Apply the patch. >3) $ misc/cronjobs/harvest_oai.pl --list > [...list of OAI repositories...] >--- > misc/cronjobs/harvest_oai.pl | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/misc/cronjobs/harvest_oai.pl b/misc/cronjobs/harvest_oai.pl >index 3148e89347..554049304a 100755 >--- a/misc/cronjobs/harvest_oai.pl >+++ b/misc/cronjobs/harvest_oai.pl >@@ -44,14 +44,13 @@ my $usage = << 'ENDUSAGE'; > > This script starts an OAI Harvest > >-This script has the following parameters : >+This script has the following parameters: > -h --help: this message > -v --verbose > -r --repository: id of the OAI repository > -d --days: number of days to harvest from (optional) > -l --list: list the OAI repositories > -f --force: force harvesting (ignore records datestamps) >- > ENDUSAGE > > if ($help) { >@@ -60,10 +59,10 @@ if ($help) { > } > > if ($list) { >- my $servers = Koha::OAIServers->search( {}, { order_by => { -asc => 'id' } } )->unblessed; >+ my $servers = Koha::OAIServers->search( {}, { order_by => { -asc => 'oai_server_id' } } )->unblessed; > print "The following repositories are available: \n\n"; > foreach my $server (@$servers) { >- print $server->{'id'} . ": " >+ print $server->{'oai_server_id'} . ": " > . $server->{'servername'} > . ", endpoint: " > . $server->{'endpoint'} >@@ -79,6 +78,7 @@ if ($list) { > if ( !$id ) { > print "The repository parameter is mandatory.\n"; > print $usage . "\n"; >+ exit; > } > > my $server = Koha::OAIServers->find($id); >-- >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 35659
:
160356
|
160357
|
160744
|
161813
|
161960
|
162004
|
162005
|
162006
|
162007
|
162008
|
162009
|
162010
|
162011
|
162527
|
162528
|
162692
|
162693
|
162694
|
163527
|
164586
|
164590
|
164602
|
164603
|
164604
|
164605
|
164606
|
164618
|
164619
|
164620
|
164621
|
164622
|
165199
|
165594
|
165595
|
165596
|
165597
|
165598
|
167106
|
167107
|
167171
|
167172
|
167173
|
167174
|
167175
|
167176
|
168982
|
168983
|
169941
|
171255
|
171258
|
171260
|
171264
|
171265
|
171267
|
171675
|
171676
|
171678
|
171679
|
172072
|
172073
|
172074
|
172075
|
172076
|
172077
|
172078
|
172079
|
172080
|
172081
|
172082
|
172083
|
172202
|
172203
|
172204
|
172205
|
172206
|
172207
|
172208
|
172209
|
172210
|
172211
|
172212
|
172213
|
173088
|
173089
|
173090
|
173091
|
173092
|
173093
|
173094
|
173095
|
173096
|
173097
|
173098
|
173099
|
173100
|
173101
|
173561
|
173599
|
173600
|
173601
|
173614
|
174790