Bugzilla – Attachment 167945 Details for
Bug 35823
When uploading a MARC file to a basket it is showing inactive funds without them being selected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35823: When uploading a MARC file to a basket it is showing inactive funds without the show checkbox button selected
Bug-35823-When-uploading-a-MARC-file-to-a-basket-i.patch (text/plain), 5.63 KB, created by
Biblibre Sandboxes
on 2024-06-21 07:26:16 UTC
(
hide
)
Description:
Bug 35823: When uploading a MARC file to a basket it is showing inactive funds without the show checkbox button selected
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2024-06-21 07:26:16 UTC
Size:
5.63 KB
patch
obsolete
>From 0c9fb87c4e34c7d5018a620d0f2f79c1298f2ba8 Mon Sep 17 00:00:00 2001 >From: Alexandre Noel <alexandre.noel@inlibro.com> >Date: Tue, 18 Jun 2024 14:23:10 -0400 >Subject: [PATCH] Bug 35823: When uploading a MARC file to a basket it is > showing inactive funds without the show checkbox button selected >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Prerequisites: > - Have at least 2 budgets with funds > 1. Add several budgets ("Acquisitions" > "Budget") with funds ("Actions" > "Add fund") > 2. Keep one budget active (check the "Make Budget active" box in > the budget edit page) > - Have at least one file of records imported into Koha ("Cataloging" > > "Stage records for import" > "Upload a file") > >To test: > 1. Go to Acquisitions page. > 2. Create a vendor and new basket if not already available. > 3. In your vendor, "Add to the basket" > "From a staged MARC file". > 4. Click "Add orders" of one of the MARC file. > 5. Check the checkbox in the "Select for import" tab. > 6. In the dropdown menu of the "Fund" field, verify the budget > names. > --> Ensure Koha displays all inactive budgets even if the "Show > inactive funds" checkbox is not checked. > 7. Apply patch, and refresh the page (crtl + F5) > 8. Verify the budgets in the "Fund" dropdown menu and test it with > the "Show inactive funds" checked and uncheked" > >Signed-off-by: Thibault Keromnès <thibault.keromnes@univ-paris8.fr> >--- > .../prog/en/modules/acqui/addorderiso2709.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js | 12 ++++++------ > 2 files changed, 7 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >index 09066e6795..97026e7d3c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >@@ -211,7 +211,7 @@ > <input type="hidden" size="20" name="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %] > [% ELSE %] > <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label> >- <select id="fund_record_[% biblio.import_record_id | html %]" name="budget_id_[% biblio.import_record_id | html %]"> >+ <select id="fund_record_[% biblio.import_record_id | html %]" name="budget_id_[% biblio.import_record_id | html %]" class="fund_selector"> > <option value="">Select a fund (will use default if set)</option> > [% FOREACH budget IN budget_loop %] > [% IF ( budget.b_id == biblio.budget_id ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js b/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js >index 75a85e247b..24d206b65c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js >@@ -2,9 +2,9 @@ > $(document).ready(function() { > // keep copy of the inactive budgets > disabledAllBudgetsCopy = $("select[name='all_budget_id']").html(); >- disabledBudgetsCopy = $("select[name='budget_id']").first().html(); >+ disabledBudgetsCopy = $("select[name='budget_id'], .fund_selector").first().html(); > $("select[name='all_budget_id'] .b_inactive").remove(); >- $("select[name='budget_id'] .b_inactive").remove(); >+ $("select[name='budget_id'] .b_inactive, .fund_selector .b_inactive").remove(); > > $(".budget_code_item").each(function(){ > let active_only = $(this).clone(); >@@ -21,12 +21,12 @@ $(document).ready(function() { > > $("#showallbudgets").click(function() { > if ($(this).is(":checked")) { >- $("select[name='budget_id']").html(disabledBudgetsCopy) >+ $("select[name='budget_id'], .fund_selector").html(disabledBudgetsCopy) > $(".bci_active").prop('disabled',true).prop('hidden',true); > $(".bci_all").prop('disabled',false).prop('hidden',false); > } > else { >- $("select[name='budget_id'] .b_inactive").remove(); >+ $("select[name='budget_id'] .b_inactive, .fund_selector .b_inactive").remove(); > $(".bci_active").prop('disabled',false).prop('hidden',false); > $(".bci_all").prop('disabled',true).prop('hidden',true); > } >@@ -41,7 +41,7 @@ $(document).ready(function() { > } > }); > >- $("select[name='budget_id']").change(function(){ >+ $("select[name='budget_id'], .fund_selector").change(function(){ > var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); > var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); > var destination_sort1 = $(this).parents('fieldset').find('li.sort1').find('input[name="sort1"]'); >@@ -59,7 +59,7 @@ $(document).ready(function() { > getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 ); > } ); > >- $("select[name='budget_id']").change(); >+ $("select[name='budget_id'], .fund_selector").change(); > > $("select[name='all_budget_id']").change(function(){ > var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); >-- >2.39.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 35823
:
167865
|
167945
|
168145
|
168304
|
168324