Bugzilla – Attachment 174004 Details for
Bug 34355
Automated MARC record ordering process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34355: (QA follow-up) Fix template errors
Bug-34355-QA-follow-up-Fix-template-errors.patch (text/plain), 24.70 KB, created by
Nick Clemens (kidclamp)
on 2024-11-05 16:38:25 UTC
(
hide
)
Description:
Bug 34355: (QA follow-up) Fix template errors
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-11-05 16:38:25 UTC
Size:
24.70 KB
patch
obsolete
>From d7e6398d7dd15b80c75bcfdf8e679060d59ade59 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Mon, 21 Oct 2024 13:13:05 +0000 >Subject: [PATCH] Bug 34355: (QA follow-up) Fix template errors > >This patch addresses the following issues: >- Fixes a duplication of the SerialsDefaultReplyTo syspref >- Re-introduces include files for overlay rules > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/MarcOrder.pm | 111 ++++++++++-------- > .../prog/en/includes/tools-item-action.inc | 74 ++++++------ > .../prog/en/includes/tools-nomatch-action.inc | 32 ++--- > .../prog/en/includes/tools-overlay-action.inc | 44 +++---- > .../en/modules/admin/marc_order_accounts.tt | 80 ++----------- > .../admin/preferences/acquisitions.pref | 6 - > 6 files changed, 150 insertions(+), 197 deletions(-) > >diff --git a/Koha/MarcOrder.pm b/Koha/MarcOrder.pm >index 8faa0492df1..5d90171a800 100644 >--- a/Koha/MarcOrder.pm >+++ b/Koha/MarcOrder.pm >@@ -241,7 +241,7 @@ sub _create_basket_for_file { > > my $basketno = NewBasket( > $vendor_id, 0, $basketname, q{}, >- q{} . q{} >+ q{}, q{}, q{}, q{}, 0, 'ordering' > ); > > return $basketno; >@@ -608,6 +608,7 @@ sub add_items_from_import_record { > }); > > Used by the cronjob to detect whether a file matches the account and should be processed >+ This method only checks the first record in the file. > > =cut > >@@ -1229,20 +1230,23 @@ sub _create_item_fields_from_syspref { > my $marc_fields_to_order = $args->{marc_fields_to_order}; > my $budget_id = $args->{budget_id}; > >- my @homebranches = (); >- my @holdingbranches = (); >- my @itypes = (); >- my @nonpublic_notes = (); >- my @public_notes = (); >- my @locs = (); >- my @ccodes = (); >- my @notforloans = (); >- my @uris = (); >- my @copynos = (); >- my @budget_codes = (); >- my @itemprices = (); >- my @replacementprices = (); >- my @itemcallnumbers = (); >+ my @homebranches = (); >+ my @holdingbranches = (); >+ my @itypes = (); >+ my @nonpublic_notes = (); >+ my @public_notes = (); >+ my @locs = (); >+ my @ccodes = (); >+ my @notforloans = (); >+ my @uris = (); >+ my @copynos = (); >+ my @budget_codes = (); >+ my @itemprices = (); >+ my @replacementprices = (); >+ my @itemcallnumbers = (); >+ my @coded_location_qualifiers = (); >+ my @barcodes = (); >+ my @enumchrons = (); > > foreach my $infoset (@$marc_item_fields_to_order) { > my $quantity = $infoset->{quantity} || 1; >@@ -1264,48 +1268,55 @@ sub _create_item_fields_from_syspref { > $item_budget_id = $budget_id; > } > >- push @homebranches, $infoset->{homebranch}; >- push @holdingbranches, $infoset->{holdingbranch}; >- push @itypes, $infoset->{itype}; >- push @nonpublic_notes, $infoset->{nonpublic_note}; >- push @public_notes, $infoset->{public_note}; >- push @locs, $infoset->{loc}; >- push @ccodes, $infoset->{ccode}; >- push @notforloans, $infoset->{notforloan}; >- push @uris, $infoset->{uri}; >- push @copynos, $infoset->{copyno}; >- push @budget_codes, $item_budget_id; >- push @itemprices, $infoset->{price}; >- push @replacementprices, $infoset->{replacementprice}; >- push @itemcallnumbers, $infoset->{itemcallnumber}; >+ push @homebranches, $infoset->{homebranch}; >+ push @holdingbranches, $infoset->{holdingbranch}; >+ push @itypes, $infoset->{itype}; >+ push @nonpublic_notes, $infoset->{nonpublic_note}; >+ push @public_notes, $infoset->{public_note}; >+ push @locs, $infoset->{loc}; >+ push @ccodes, $infoset->{ccode}; >+ push @notforloans, $infoset->{notforloan}; >+ push @uris, $infoset->{uri}; >+ push @copynos, $infoset->{copyno}; >+ push @budget_codes, $item_budget_id; >+ push @itemprices, $infoset->{price}; >+ push @replacementprices, $infoset->{replacementprice}; >+ push @itemcallnumbers, $infoset->{itemcallnumber}; >+ push @coded_location_qualifiers, $infoset->{coded_location_qualifier}; >+ push @barcodes, $infoset->{barcode}; >+ push @enumchrons, $infoset->{enumchron}; > } > } > > my $item_fields = { >- quantity => scalar(@homebranches), >- homebranches => \@homebranches, >- holdingbranches => \@holdingbranches, >- itypes => \@itypes, >- nonpublic_notes => \@nonpublic_notes, >- public_notes => \@public_notes, >- locs => \@locs, >- ccodes => \@ccodes, >- notforloans => \@notforloans, >- uris => \@uris, >- copynos => \@copynos, >- budget_codes => \@budget_codes, >- itemprices => \@itemprices, >- replacementprices => \@replacementprices, >- itemcallnumbers => \@itemcallnumbers, >- c_quantity => $marc_fields_to_order->{quantity}, >- c_budget_code => $marc_fields_to_order->{budget_code}, >- c_price => $marc_fields_to_order->{price}, >- c_discount => $marc_fields_to_order->{discount}, >- c_sort1 => $marc_fields_to_order->{sort1}, >- c_sort2 => $marc_fields_to_order->{sort2}, >+ quantity => scalar(@homebranches), >+ homebranches => \@homebranches, >+ holdingbranches => \@holdingbranches, >+ itypes => \@itypes, >+ nonpublic_notes => \@nonpublic_notes, >+ public_notes => \@public_notes, >+ locs => \@locs, >+ ccodes => \@ccodes, >+ notforloans => \@notforloans, >+ uris => \@uris, >+ copynos => \@copynos, >+ budget_codes => \@budget_codes, >+ itemprices => \@itemprices, >+ replacementprices => \@replacementprices, >+ itemcallnumbers => \@itemcallnumbers, >+ coded_location_qualifiers => \@coded_location_qualifiers, >+ barcodes => \@barcodes, >+ enumchrons => \@enumchrons, >+ c_quantity => $marc_fields_to_order->{quantity}, >+ c_budget_code => $marc_fields_to_order->{budget_code}, >+ c_price => $marc_fields_to_order->{price}, >+ c_discount => $marc_fields_to_order->{discount}, >+ c_sort1 => $marc_fields_to_order->{sort1}, >+ c_sort2 => $marc_fields_to_order->{sort2}, > }; > > return $item_fields; > } > >+ > 1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-item-action.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-item-action.inc >index e58f05f551c..6007b5e8267 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-item-action.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-item-action.inc >@@ -1,37 +1,41 @@ >- [% IF item_action_ignore AND num_items == 0 %] >- No items were found during staging >- <input type ="hidden" name="item_action" value="ignore"> >+[% IF account.item_action == 'ignore' AND num_items == 0 %] >+ No items were found during staging >+ <input type ="hidden" name="item_action" value="ignore"> >+[% ELSE %] >+ [% IF ( class_name ) %] >+ <select name="item_action" id="item_action" class="[% class_name | html %]"> >+ [% ELSE %] >+ <select name="item_action" id="item_action"> >+ [% END %] >+ [% IF ( account.item_action == 'always_add' ) %] >+ <option value="always_add" selected="selected"> > [% ELSE %] >- <select name="item_action" id="item_action"> >- [% IF ( item_action_always_add ) %] >- <option value="always_add" selected="selected"> >- [% ELSE %] >- <option value="always_add"> >- [% END %] >- Always add items</option> >- [% IF ( item_action_add_only_for_matches ) %] >- <option value="add_only_for_matches" selected="selected"> >- [% ELSE %] >- <option value="add_only_for_matches"> >- [% END %] >- Add items only if matching bib was found</option> >- [% IF ( item_action_add_only_for_new ) %] >- <option value="add_only_for_new" selected="selected"> >- [% ELSE %] >- <option value="add_only_for_new"> >- [% END %] >- Add items only if no matching bib was found</option> >- [% IF ( item_action_replace ) %] >- <option value="replace" selected="selected"> >- [% ELSE %] >- <option value="replace"> >- [% END %] >- Replace items if matching bib was found (only for existing items)</option> >- [% IF ( item_action_ignore ) %] >- <option value="ignore" selected="selected"> >- [% ELSE %] >- <option value="ignore"> >- [% END %] >- Ignore items</option> >- </select> >+ <option value="always_add"> > [% END %] >+ Always add items</option> >+ [% IF ( account.item_action == 'add_only_for_matches' ) %] >+ <option value="add_only_for_matches" selected="selected"> >+ [% ELSE %] >+ <option value="add_only_for_matches"> >+ [% END %] >+ Add items only if matching bib was found</option> >+ [% IF ( account.item_action == 'add_only_for_new' ) %] >+ <option value="add_only_for_new" selected="selected"> >+ [% ELSE %] >+ <option value="add_only_for_new"> >+ [% END %] >+ Add items only if no matching bib was found</option> >+ [% IF ( account.item_action == 'replace' ) %] >+ <option value="replace" selected="selected"> >+ [% ELSE %] >+ <option value="replace"> >+ [% END %] >+ Replace items if matching bib was found (only for existing items)</option> >+ [% IF ( account.item_action == 'ignore' ) %] >+ <option value="ignore" selected="selected"> >+ [% ELSE %] >+ <option value="ignore"> >+ [% END %] >+ Ignore items</option> >+ </select> >+[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-nomatch-action.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-nomatch-action.inc >index 8003bb75ff9..4476bbb7f59 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-nomatch-action.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-nomatch-action.inc >@@ -1,14 +1,18 @@ >- <select name="nomatch_action" id="nomatch_action"> >- [% IF ( nomatch_action_create_new ) %] >- <option value="create_new" selected="selected"> >- [% ELSE %] >- <option value="create_new"> >- [% END %] >- Add incoming record</option> >- [% IF ( nomatch_action_ignore ) %] >- <option value="ignore" selected="selected"> >- [% ELSE %] >- <option value="ignore"> >- [% END %] >- Ignore incoming record</option> >- </select> >+[% IF ( class_name ) %] >+ <select name="nomatch_action" id="nomatch_action" class="[% class_name | html %]"> >+[% ELSE %] >+ <select name="nomatch_action" id="nomatch_action"> >+[% END %] >+ [% IF ( account.nomatch_action == 'create_new' ) %] >+ <option value="create_new" selected="selected"> >+ [% ELSE %] >+ <option value="create_new"> >+ [% END %] >+ Add incoming record</option> >+ [% IF ( account.nomatch_action == 'ignore' ) %] >+ <option value="ignore" selected="selected"> >+ [% ELSE %] >+ <option value="ignore"> >+ [% END %] >+ Ignore incoming record</option> >+ </select> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-overlay-action.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-overlay-action.inc >index 93188147d63..26cfca09869 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-overlay-action.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-overlay-action.inc >@@ -1,20 +1,24 @@ >- <select name="overlay_action" id="overlay_action"> >- [% IF ( overlay_action_replace ) %] >- <option value="replace" selected="selected"> >- [% ELSE %] >- <option value="replace"> >- [% END %] >- Replace existing record with incoming record</option> >- [% IF ( overlay_action_create_new ) %] >- <option value="create_new" selected="selected"> >- [% ELSE %] >- <option value="create_new"> >- [% END %] >- Add incoming record</option> >- [% IF ( overlay_action_ignore ) %] >- <option value="ignore" selected="selected"> >- [% ELSE %] >- <option value="ignore"> >- [% END %] >- Ignore incoming record (its items may still be processed)</option> >- </select> >+[% IF ( class_name ) %] >+ <select name="overlay_action" id="overlay_action" class="[% class_name | html %]"> >+[% ELSE %] >+ <select name="overlay_action" id="overlay_action"> >+[% END %] >+ [% IF ( account.overlay_action == 'replace' ) %] >+ <option value="replace" selected="selected"> >+ [% ELSE %] >+ <option value="replace"> >+ [% END %] >+ Replace existing record with incoming record</option> >+ [% IF ( account.overlay_action == 'create_new' ) %] >+ <option value="create_new" selected="selected"> >+ [% ELSE %] >+ <option value="create_new"> >+ [% END %] >+ Add incoming record</option> >+ [% IF ( account.overlay_action == 'ignore' ) %] >+ <option value="ignore" selected="selected"> >+ [% ELSE %] >+ <option value="ignore"> >+ [% END %] >+ Ignore incoming record (its items may still be processed)</option> >+</select> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt >index 11e9aef075e..2a9b8675779 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt >@@ -128,6 +128,7 @@ MARC Order Accounts > <label for="match_field">Match field: </label> > <input type="text" name="match_field" id="match_field" size="20" value="[% account.match_field | html %]" /> > <div class="hint">(Optional): If you have files from multiple vendors in the same file directory, the match field is the field in the marc record that will be checked to see if the file should be processed by this account.</div> >+ <div class="hint">The format for this field is the same as MARCFieldsToOrder - the field and the subfield separated by a dollar sign e.g. 245$a</div> > </li> > <li> > <label for="match_value">Match value: </label> >@@ -143,17 +144,15 @@ MARC Order Accounts > <label for='record_type'>Record type:</label> > <select class="select2" name='record_type' id='record_type'> > [% IF ( account.record_type == 'biblio' ) %] >- <option value="biblio" selected="selected"> >+ <option value="biblio" selected="selected">Bibliographic</option> > [% ELSE %] >- <option value="biblio"> >+ <option value="biblio">Bibliographic</option> > [% END %] >- Bibliographic</option> > [% IF ( account.record_type == 'auth' ) %] >- <option value="auth" selected="selected"> >+ <option value="auth" selected="selected">Authority</option> > [% ELSE %] >- <option value="auth"> >+ <option value="auth">Authority</option> > [% END %] >- Authority</option> > </select> > </li> > <li> >@@ -216,43 +215,11 @@ MARC Order Accounts > </li> > <li> > <label for="overlay_action">Action if matching record found: </label> >- <select class="select2" name="overlay_action" id="overlay_action"> >- [% IF ( account.overlay_action == 'replace' ) %] >- <option value="replace" selected="selected"> >- [% ELSE %] >- <option value="replace"> >- [% END %] >- Replace existing record with incoming record</option> >- [% IF ( account.overlay_action == 'create_new' ) %] >- <option value="create_new" selected="selected"> >- [% ELSE %] >- <option value="create_new"> >- [% END %] >- Add incoming record</option> >- [% IF ( account.overlay_action == 'ignore' ) %] >- <option value="ignore" selected="selected"> >- [% ELSE %] >- <option value="ignore"> >- [% END %] >- Ignore incoming record (its items may still be processed)</option> >- </select> >+ [% INCLUDE 'tools-overlay-action.inc' class_name='select2' %] > </li> > <li> > <label for="nomatch_action">Action if no match is found: </label> >- <select class="select2" name="nomatch_action" id="nomatch_action"> >- [% IF ( account.nomatch_action == 'create_new' ) %] >- <option value="create_new" selected="selected"> >- [% ELSE %] >- <option value="create_new"> >- [% END %] >- Add incoming record</option> >- [% IF ( account.nomatch_action == 'ignore' ) %] >- <option value="ignore" selected="selected"> >- [% ELSE %] >- <option value="ignore"> >- [% END %] >- Ignore incoming record</option> >- </select> >+ [% INCLUDE 'tools-nomatch-action.inc' class_name='select2' %] > </li> > </ol> > </fieldset> >@@ -279,38 +246,7 @@ MARC Order Accounts > <ol> > <li> > <label for="item_action">How to process items: </label> >- <select class="select2" name="item_action" id="item_action"> >- [% IF ( account.item_action == 'always_add' ) %] >- <option value="always_add" selected="selected"> >- [% ELSE %] >- <option value="always_add"> >- [% END %] >- Always add items</option> >- [% IF ( account.item_action == 'add_only_for_matches' ) %] >- <option value="add_only_for_matches" selected="selected"> >- [% ELSE %] >- <option value="add_only_for_matches"> >- [% END %] >- Add items only if matching bib was found</option> >- [% IF ( account.item_action == 'add_only_for_new' ) %] >- <option value="add_only_for_new" selected="selected"> >- [% ELSE %] >- <option value="add_only_for_new"> >- [% END %] >- Add items only if no matching bib was found</option> >- [% IF ( account.item_action == 'replace' ) %] >- <option value="replace" selected="selected"> >- [% ELSE %] >- <option value="replace"> >- [% END %] >- Replace items if matching bib was found (only for existing items)</option> >- [% IF ( account.item_action == 'ignore' ) %] >- <option value="ignore" selected="selected"> >- [% ELSE %] >- <option value="ignore"> >- [% END %] >- Ignore items</option> >- </select> >+ [% INCLUDE 'tools-item-action.inc' class_name='select2' %] > </li> > </ol> > </fieldset> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >index 1d3f8cb35c2..a3755acda1b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >@@ -138,12 +138,6 @@ Acquisitions: > class: email > - 'when sending acquisitions order and claim notices.' > - '<br>If left empty, it will fall back to the first defined address in the following list: library reply-to, library email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReplytoDefault">ReplytoDefault</a>, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.' >- - >- - Use the reply-to email address >- - pref: SerialsDefaultReplyTo >- class: email >- - 'when sending serial claim notices.' >- - '<br>If left empty, it will fall back to the first defined address in the following list: Library ReplyTo, Library Email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReplytoDefault">ReplytoDefault</a>, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.' > - > - pref: MarcOrderingAutomation > default: no >-- >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 34355
:
154705
|
154706
|
154707
|
154708
|
154709
|
154710
|
157092
|
157093
|
157094
|
157095
|
157096
|
157097
|
157098
|
157099
|
157100
|
160858
|
160859
|
160860
|
160861
|
160862
|
160863
|
160864
|
160865
|
160866
|
160867
|
160868
|
160869
|
160870
|
160871
|
160872
|
160873
|
160874
|
160875
|
169896
|
169897
|
169898
|
169899
|
169900
|
169901
|
169902
|
169903
|
169904
|
170395
|
170401
|
170402
|
170403
|
170404
|
170405
|
170406
|
170407
|
170408
|
170409
|
173054
|
173055
|
173056
|
173057
|
173058
|
173059
|
173060
|
173061
|
173062
|
173063
|
173064
|
173065
|
173066
|
173709
|
173805
|
173806
|
173809
|
173824
|
173825
|
173993
|
173994
|
173995
|
173996
|
173997
|
173998
|
173999
|
174000
|
174001
|
174002
|
174003
|
174004
|
174005
|
174006
|
174007
|
174008
|
174009
|
174010
|
174362
|
174363
|
174364
|
174365
|
174366
|
174367
|
174368
|
174369
|
174370
|
174371
|
174372
|
174373
|
174374
|
174375
|
174376
|
174377
|
174378
|
174379
|
174380
|
174382
|
174383