Bugzilla – Attachment 62123 Details for
Bug 9988
Leave larger authority merges to merge_authorities cronjob (pref AuthorityMergeLimit)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9988: Database revision for AuthorityMergeLimit
Bug-9988-Database-revision-for-AuthorityMergeLimit.patch (text/plain), 6.06 KB, created by
Julian Maurice
on 2017-04-13 08:48:56 UTC
(
hide
)
Description:
Bug 9988: Database revision for AuthorityMergeLimit
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2017-04-13 08:48:56 UTC
Size:
6.06 KB
patch
obsolete
>From b861a6688453657ef8f14f1981c972385ec3cec8 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 10 Jan 2017 11:39:31 +0100 >Subject: [PATCH] Bug 9988: Database revision for AuthorityMergeLimit >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Introduce the new preference and remove dontmerge. >If dontmerge was enabled, the new pref will be set to zero and we will >print a message about raising this value now. > >Test plan: >Run the database revision or a new install. >In case of an upgrade, check the new pref value. Should be 0 when >dontmerge was enabled, otherwise 50. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Also tested sysprefs.sql on a new database. > >Signed-off-by: Marc Véron <veron@veron.ch> >Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > installer/data/mysql/atomicupdate/bug_9988a.perl | 19 +++++++++++++++++++ > installer/data/mysql/sysprefs.sql | 2 +- > .../en/modules/admin/preferences/authorities.pref | 10 ++++------ > 3 files changed, 24 insertions(+), 7 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_9988a.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_9988a.perl b/installer/data/mysql/atomicupdate/bug_9988a.perl >new file mode 100644 >index 0000000000..9edd22b9a2 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_9988a.perl >@@ -0,0 +1,19 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ my $oldval = C4::Context->preference('dontmerge'); >+ my $newval = $oldval ? 0 : 50; >+ >+ # Remove dontmerge, add AuthorityMergeLimit >+ $dbh->do(q/ >+DELETE FROM systempreferences WHERE variable = 'dontmerge'; >+ /); >+ $dbh->do(qq/ >+INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) VALUES ('AuthorityMergeLimit','$newval',NULL,'Maximum number of biblio records updated immediately when an authority record has been modified.','integer'); >+ /); >+ >+ SetVersion( $DBversion ); >+ if( $newval == 0 ) { >+ print "NOTE: Since dontmerge was enabled, we have initialized AuthorityMergeLimit to 0 records. Please consider raising this value. This will allow for performing smaller merges directly and only postponing larger merges.\n"; >+ } >+ print "Upgrade to $DBversion done (Bug 9988 - Add AuthorityMergeLimit)\n"; >+} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 7e249b7242..9879e928a5 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -52,6 +52,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AudioAlerts','0','','Enable circulation sounds during checkin and checkout in the staff interface. Not supported by all web browsers yet.','YesNo'), > ('AuthDisplayHierarchy','0','','Display authority hierarchies','YesNo'), > ('AuthoritiesLog','1',NULL,'If ON, log edit/create/delete actions on authorities.','YesNo'), >+('AuthorityMergeLimit','50',NULL,'Maximum number of biblio records updated immediately when an authority record has been modified.','integer'), > ('AuthorityMergeMode','loose','loose|strict','Authority merge mode','Choice'), > ('AuthoritySeparator','--','10','Used to separate a list of authorities in a display. Usually --','free'), > ('autoBarcode','OFF','incremental|annual|hbyymmincr|EAN13|OFF','Used to autogenerate a barcode: incremental will be of the form 1, 2, 3; annual of the form 2007-0001, 2007-0002; hbyymmincr of the form HB08010001 where HB=Home Branch','Choice'), >@@ -139,7 +140,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('DisplayLibraryFacets', 'holding', 'home|holding|both', 'Defines which library facets to display.', 'Choice'), > ('DisplayMultiPlaceHold','1','','Display the ability to place multiple holds or not','YesNo'), > ('DisplayOPACiconsXSLT','1','','If ON, displays the format, audience, and material type icons in XSLT MARC21 results and detail pages in the OPAC.','YesNo'), >-('dontmerge','1',NULL,'If ON, modifying an authority record will not update all associated bibliographic records immediately, ask your system administrator to enable the merge_authorities.pl cron job','YesNo'), > ('DumpTemplateVarsIntranet', '0', NULL , 'If enabled, dump all Template Toolkit variable to a comment in the html source for the staff intranet.', 'YesNo'), > ('DumpTemplateVarsOpac', '0', NULL , 'If enabled, dump all Template Toolkit variable to a comment in the html source for the opac.', 'YesNo'), > ('EasyAnalyticalRecords','0','','If on, display in the catalogue screens tools to easily setup analytical record relationships','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref >index 72370354a5..4c07c911a8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref >@@ -24,12 +24,10 @@ Authorities: > no: "do not generate" > - authority records that are missing (BiblioAddsAuthorities must be set to "allow" for this to have any effect). > - >- - pref: dontmerge >- default: yes >- choices: >- yes: "Don't" >- no: Do >- - automatically update attached biblios when changing an authority record. If this is off, please ask your administrator to enable the merge_authority.pl cronjob. >+ - When modifying an authority record, do not update attached biblio records if the number exceeds >+ - pref: AuthorityMergeLimit >+ default: 50 >+ - records. (Above this limit, the merge_authority cron job will merge them.) > - > - Use the following text for the contents of MARC21 authority control field 008 position 06-39 (fixed length data elements). Do NOT include the date (position 00-05). > - pref: MARCAuthorityControlField008 >-- >2.11.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 9988
:
59158
|
59159
|
60256
|
60257
|
60258
|
60259
|
60594
|
60595
|
60596
|
60597
|
60598
|
60599
|
60600
|
60601
|
60602
|
60603
|
60604
|
60605
|
60606
|
60607
|
60668
|
60669
|
60670
|
60671
|
60672
|
60673
|
60674
|
60675
|
61306
|
61307
|
61308
|
61309
|
61779
|
61780
|
61781
|
61782
|
61783
|
61784
|
61785
|
61786
|
61787
|
61788
|
61789
|
61790
|
61791
|
61792
|
61890
|
61891
|
61892
|
61893
|
61894
|
61895
|
61897
|
61898
|
61899
|
61900
|
61901
|
61902
|
61903
|
61904
|
61912
|
61913
|
61914
|
61915
|
61916
|
61917
|
61918
|
61919
|
61920
|
61921
|
61922
|
61923
|
61924
|
61925
|
62055
| 62123 |
62124
|
62125
|
62126
|
62127
|
62128
|
62129
|
62130
|
62131
|
62132
|
62133
|
62134
|
62135
|
62136
|
62137