Koha/t/db_dependent
David Gustafsson 139e6c30d6 Bug 14957: Merge rules system for merging of MARC records
Add a rule based system for merging MARC records to for example
prevent field data from being overwritten.

To test:
    1. Apply this patch.
    2. Log in to staff client.
    3. Enable new syspref MARCMergeRules.
    4. Click the new link "MARC merge rules" in the "Catalog"
       section of the Koha administration page.
    5. Create a new rule:
       Module: source, Filter: *, Tag: 245, Preset: Protect.
    6. Clicking "Edit" should allow you to edit corresponding rule.
    7. Clicking "Delete" should remove corresponding rule after confirmation.
    8. Selecting one or more rules followed by clicking "Delete
       selected" should remove all selected rules after confirmation.
    9. Try creating a rule with tag set to "**", the other options does
       not matter. Verify that saving this rule produces an error
       message complaining about invalid tag regular expression.
    10. Try creating a rule with tag set to "008" (or other control
        field) and set Appended: Append and Removed: Skip, the other
        options does not matter. Verify that saving this rule produces
        an error message complaining about invalid combination of actions
        for control field.
    11. With the 245 rule in step 5 in place, edit a bibliographic record,
        change 245a for example (which should be Title for MARC21) and save.
    12. Verify that the changes has not been saved.
    13. Create a new rule:
        Module: source, Filter: intranet, Tag: 245, Preset: Overwrite.
    14. Repeat step 12, and verify that the changes has now been saved.
    15. Run tests in t/db_dependent/Biblio/MarcMergeRules.t and very
        that all tests pass.

Sponsored-by: Halland County Library
Sponsored-by: Catalyst IT
Sponsored-by: Gothenburg University Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-26 16:46:02 +02:00
..
Acquisition
api/v1 Bug 28585: (QA follow-up) Add explicit tests for setting date/date-time attributes 2021-10-25 14:06:46 +02:00
Auth
AuthoritiesMarc
Authority
Biblio Bug 14957: Merge rules system for merging of MARC records 2021-10-26 16:46:02 +02:00
Circulation Bug 28931: Remove unused Koha::DateUtils from tests 2021-10-07 11:01:05 +02:00
CourseReserves
Creators
cronjobs Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
data
Exporter
Holds Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Illrequest
Items Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Koha Bug 11175: Add tests 2021-10-26 16:46:02 +02:00
Labels
LDAP
Letters Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Members
misc/translator
OAI Bug 29135: Fix handling of deleted items in OAI-PMH provider 2021-10-12 10:14:29 +02:00
Patron Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Record
Reports
Reserves Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Search Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
selenium Bug 19185: Fix regressions.t 2021-10-26 16:46:02 +02:00
Serials
SIP Bug 28730: Add option to format AH field (due date) in SIP checkout response 2021-10-07 11:18:29 +02:00
Template/Plugin Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Utils
www Bug 19185: Fix regressions.t 2021-10-26 16:46:02 +02:00
00-strict.t
01-test_dbic.t
Accounts.t
Acquisition.t Bug 27287: (QA follow-up) Unit tests 2021-10-21 12:24:04 +02:00
Amazon.t
ArticleRequests.t Bug 29182: (follow-up) Fix ArticleRequests.t 2021-10-07 15:49:01 +02:00
AudioAlerts.t
Auth.t
Auth_with_cas.t
Auth_with_ldap.t
AuthorisedValues.t Bug 27944: Fix t/db_dependent/AuthorisedValues.t 2021-10-06 11:44:22 +02:00
AuthoritiesMarc.t
AuthUtils.t
BackgroundJob.t
Barcodes.t
Barcodes_ValueBuilder.t
Biblio.t Bug 14957: Merge rules system for merging of MARC records 2021-10-26 16:46:02 +02:00
Breeding.t
Budgets.t Bug 24190: (follow-up) Rename AcqLog 2021-09-21 20:22:57 +02:00
Cache.t
Calendar.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Charset.t
check_kohastructure.t
check_sysprefs.t
Circulation.t Bug 29062: Unit tests 2021-10-07 15:49:01 +02:00
Clubs.t
Context.t
Contract.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
CourseReserves.t
db_structure.t
DecreaseLoanHighHolds.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Filter_MARC_ViewPolicy.t
Fines.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
FrameworkPlugin.t Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
Heading.t
Heading_MARC21.t
Hold.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Holds.t Bug 29306: Fix warning on undefined $_ in Holds.t 2021-10-25 14:08:06 +02:00
HoldsQueue.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Holidays.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Illcomments.t
Illrequestattributes.t
Illrequests.t Bug 28340: Unit test 2021-09-21 20:22:57 +02:00
ILSDI_Services.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
ImportBatch.t
ImportExportFramework.t
Installer.t
Items.t
Koha.t
Koha_Authority.t
Koha_Database.t
Koha_Elasticsearch.t
Koha_ExternalContent_OverDrive.t
Koha_ExternalContent_RecordedBooks.t
Koha_Misc_Files.t
Languages.t
Letters.t Bug 28803: (follow-up) Error details improvement 2021-09-28 10:22:36 +02:00
LibraryGroups.t
Linker_Default.t
Linker_FirstMatch.t
Log.t Bug 28931: Remove unused Koha::DateUtils from tests 2021-10-07 11:01:05 +02:00
MarcModificationTemplates.t
Members.t
Message.t
MungeMarcPrice.t
Overdues.t
Passwordrecovery.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Patroncards.t
PatronLists.t Bug 16446: Add ability to add patrons to list by borrowernumber 2021-10-21 12:24:04 +02:00
Patrons.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Record.t
RecordProcessor_EmbedSeeFromHeadings.t
Reports.t
Reserves.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
rollingloans.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
RotatingCollections.t
Search.t Bug 29315: Remove warnings from Search.t 2021-10-25 14:37:56 +02:00
Serials.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Serials_2.t
Service.t
ShelfBrowser.t
Sitemapper.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Stats.t
StockRotationItems.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
StockRotationRotas.t
StockRotationStages.t
SuggestionEngine_ExplodedTerms.t
Suggestions.t
sysprefs.t
TablesSettings.t
Tags.t
Templates.t Bug 28303: Add unit test for badtemplatecheck 2021-10-05 10:58:13 +02:00
TestBuilder.t
Upload.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
UsageStats.t
Virtualshelves.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
XISBN.t
XSLT.t Bug 26302: (QA follow-up) Prefix prefs with OPAC 2021-08-30 17:04:31 +02:00
yaml.t
zebra_config.pl