Bugzilla – Attachment 145495 Details for
Bug 32685
Display incorrect when matching authority records during import
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32685: Correct authority match display on import
Bug-32685-Correct-authority-match-display-on-impor.patch (text/plain), 3.41 KB, created by
Nick Clemens (kidclamp)
on 2023-01-19 20:49:02 UTC
(
hide
)
Description:
Bug 32685: Correct authority match display on import
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-01-19 20:49:02 UTC
Size:
3.41 KB
patch
obsolete
>From f084bf00bbd0b3f67570e23334a5f9edda479c2d Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 19 Jan 2023 20:47:31 +0000 >Subject: [PATCH] Bug 32685: Correct authority match display on import > >Bug 22785 updated the import records table, but mixed javascript variables and template toolkit, this means all matches are treated as biblios > >To test: >1 - Export some authority records form Koha >2 - Create a matching rule based on 'Local-number' and field 001 >3 - Stage the records for import using above rule >4 - Note the match links point to authorities, but the citations point to biblios >5 - Apply patch >6 - Reload the page >7 - Confirm the links have the correct text >--- > .../prog/en/modules/tools/manage-marc-import.tt | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt >index 2c7680ad6e..3c17c157bc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt >@@ -545,18 +545,20 @@ > checked = 'checked="checked"'; > any_checked = 1; > } >- [% IF(item.record_type == 'auth') -%] >- var matching_msg = _("Matches authority %s (score=%s):%s"); >- [%- ELSE -%] >- var matching_msg = _("Matches bibliographic record %s (score=%s):%s"); >- [%- END %] > var match_option = ""; > match_option = '<input type="radio" data-import_record_id="'+aData['import_record_id']+'" class="chosen" name="import_record_id_'+aData['import_record_id']+'_match" value="'+item.candidate_match_id+'" ' + checked + disabled + '> '; > > var diff_url = '/cgi-bin/koha/tools/showdiffmarc.pl?batchid=%s&importid=%s&id=%s&type=%s'; > var match_citation = ''; >- if( item.title ){ match_citation += item.title + ' ' } >- if( item.author ){ match_citation += item.author } >+ var matching_msg = ''; >+ if ( item.record_type == 'auth' ){ >+ matching_msg = _("Matches authority %s (score=%s):%s"); >+ if( item.authorized_heading ){ match_citation += item.authorized_heading } >+ } else { >+ matching_msg = _("Matches bibliographic record %s (score=%s):%s"); >+ if( item.title ){ match_citation += item.title + ' ' } >+ if( item.author ){ match_citation += item.author } >+ } > $('td:eq(4) ul', nRow).append('<li><label for="import_record_id_'+aData['import_record_id']+'_match_'+index+'">'+match_option+ > matching_msg.format(item.candidate_match_id, item.score, > '<a target="_blank" href="' + record_details_url >-- >2.30.2
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 32685
:
145495
|
145546
|
147210