b5bd2b7586
This patch gives Koha the ability to merge authority records using the same interface used by bibliographic records, though slightly different methods for selecting which records to merge. The two ways to select records are as follows: 1) Records can be selected from authority search results by clicking the "Merge" link for two records. 2) Authority records can be merged from the reservoir by clicking the merge-related links in the Manage staged MARC batch screen. To test: 1) Apply patch. 2) Do a search for an authority record that will turn up multiple identical records (or at least two records that you don't mind merging). 3) Click the "Merge" link for the first record. 4) Click the "Merge" link for the second record. 5) Choose which fields from which record you want to appear in the resulting record. 6) Confirm that those are the fields that exist in the resulting record. 7) Stage an authority record (for example, an authority record you saved from your catalog. 8) Search for a record to merge with it using the "Search for a record to merge in a new window" link. 9) Merge these records, confirming that the resulting record (after going through the entire merging process) matches your expectations. 10) Set up a matching rule for authorities, and export an authority from your catalog that will match based on that rule. For MARC21, the following is a good choice for a rule: Matching rule code: AUTHPER Description: Personal name main entry Match threshold: 999 Record type: Authority record [Match point 1:] Search index: mainmainentry Score: 1000 Tag: 100 Subfields: a 11) Stage the record you just exported, choosing the matching rule you just created. 12) Merge the record using the "Merge" link, confirming that the resulting record (after going through the entire merging process) matches your expectations. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Testing notes on last patch in series. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
27 lines
720 B
Perl
Executable file
27 lines
720 B
Perl
Executable file
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use CGI;
|
|
use CGI::Session;
|
|
use C4::Context;
|
|
use C4::Auth qw/check_cookie_auth/;
|
|
use C4::AuthoritiesMarc;
|
|
use JSON;
|
|
use CGI::Cookie; # need to check cookies before
|
|
# having CGI parse the POST request
|
|
|
|
my %cookies = fetch CGI::Cookie;
|
|
my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value, { editcatalogue => 'edit_catalogue' });
|
|
if ($auth_status ne "ok") {
|
|
my $reply = CGI->new("");
|
|
print $reply->header(-type => 'text/html');
|
|
exit 0;
|
|
}
|
|
|
|
my $reply = new CGI;
|
|
my $framework = $reply->param('frameworkcode');
|
|
my $tagslib = GetTagsLabels(1, $framework);
|
|
print $reply->header(-type => 'text/html');
|
|
print encode_json $tagslib;
|