To recreate: 1) Create two budgets -- let's say 'Active Budget 2024' and 'Inactive Budget 2024' 2) Create 'Fund1' in Active Budget 2024 and 'Fund2' in Inactive Budget 2024. 3) Mark Inactive Budget 2024 as inactive. 4) Create a vendor and new basket if not already available. Add to the basket using either a new MARC file or a staged MARC file. 5) When adding the items to the order click on "Fund" and notice that 'Fund2' is appearing in the dropdown despite the "Show inactive funds" box not being ticked.
Created attachment 167865 [details] [review] Bug 35823: When uploading a MARC file to a basket it is showing inactive funds without the show checkbox button selected 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"
Tried on a sandbox, it worked :)
Created attachment 167945 [details] [review] Bug 35823: When uploading a MARC file to a basket it is showing inactive funds without the show checkbox button selected 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>
The patch here adds a new class, and adds it to the selectors - the problem stems from bug 35254 which updated the select name, but not the jQuery selectors. This patch works, but either: 1 - We should remove the old 'name="budget_id"' selector as it is not working and just use the new one 2 - Don't add a new class, but update the selector to match the current name: 'name^="budget_id_"'
(In reply to Nick Clemens (kidclamp) from comment #4) > The patch here adds a new class, and adds it to the selectors - the problem > stems from bug 35254 which updated the select name, but not the jQuery > selectors. > > This patch works, but either: > 1 - We should remove the old 'name="budget_id"' selector as it is not > working and just use the new one > 2 - Don't add a new class, but update the selector to match the current name: > 'name^="budget_id_"' You're right, it will be cleaner that way. I'm making the changes now!
Created attachment 168145 [details] [review] Bug 35823: When uploading a MARC file to a basket it is showing inactive funds without the show checkbox button selected 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"
Created attachment 168304 [details] [review] Bug 35823: When uploading a MARC file to a basket it is showing inactive funds without the show checkbox button selected 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: Chris Cormack <chris@bigballofwax.co.nz>
Created attachment 168324 [details] [review] Bug 35823: When uploading a MARC file to a basket it is showing inactive funds without the show checkbox button selected 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: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Simple clean fix, thanks everyone. Passing QA
Pushed for 24.11! Well done everyone, thank you!
Backported to 24.05.x for upcoming 24.05.06
Pushed to 23.11.x for 23.11.11