Brendan Lawlor [Thu, 22 Aug 2024 19:52:23 +0000 (19:52 +0000)]
Bug 36083: (follow-up) add USE Branches for html customizations
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Brendan Lawlor [Thu, 22 Aug 2024 16:39:55 +0000 (16:39 +0000)]
Bug 36083: Fix HTML additional contents for the logged in branchcode
This patch updates the calls to AdditionalContents.get() to use
Branches.GetLoggedInBranchcode instead of the logged in users
homebranch for the library parameter.
To test:
1. In Tools > HTML Customizations
2. Choose to create an entry in StaffAcquisitionsHome
3. Assign it to a specific library
It's helpful to test with libraries other than Centerville
4. Add text and publication date (important or it will never display)
5. Save
6. Go to the Acquisitions Home page - logged into that library, no text displays.
7. Apply patch and refresh browser
8. Notice the library specifc content displays
9. Notice content created for all libraries still displays too
10. Test HTML content for specific libraries works on all 8 pages
IntranetmainUserBlock
Staff AcquisitionsHome
StaffAuthoritiesHome
StaffCataloguing Home
StaffListsHome
StaffPatronsHome
StaffPOSHome
StaffSerialsHome
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Raphael Straub [Thu, 8 Feb 2024 14:17:56 +0000 (14:17 +0000)]
Bug 36049: Fix price rounding
This patch only fixes price rounding by using Math::BigFloat.
To test:
0) Enable syspref OrderPriceRounding
1) Create an order line in acquisitions with vendor price 18.90 and a
discount of 5 %.
2) Verify that the total (tax excl.) in the order table on the basket
page is 17.95.
3) Apply the patch.
4) Reload the basket page.
5) Verify that the total (tax excl.) in the order table on the basket
page now is 17.96, which is correct.
6) Run: prove t/Number/Price.t
Sponsored-by: Karlsruhe Institute of Technology (KIT) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Raphael Straub [Thu, 8 Feb 2024 14:17:56 +0000 (14:17 +0000)]
Bug 36049: Add unit test
Sponsored-by: Karlsruhe Institute of Technology (KIT) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Phil Ringnalda [Thu, 19 Sep 2024 04:01:56 +0000 (21:01 -0700)]
Bug 37961: Inventory problem resolution fails by POSTing without an op or csrf_token
After you upload a file or textarea of barcodes to inventory, the next step is
a list of the things that were missing, with checkboxes to check when you find
them, and buttons to Mark seen, which send a POST to
/cgi-bin/koha/tools/ajax-inventory.pl without an op param (since it doesn't
have an $op) and without a csrf_token, so the POST fails with a 403.
Test plan:
1. Without the patch, Cataloging - Inventory - in Item location filters
set Library to Centerville, Shelving location to Audio visual, Collection
code to Reference, and in Optional filters for inventory list or comparing
barcodes set Last inventory date to today.
2. Click Submit, and you'll have a table of 23 items. Check the checkbox for
the first item, click Mark seen and continue
3. What was supposed to happen was that you would be taken to the next
page, but instead you are still in the same page, and if you had the
browser console open, you would have seen that you sent a POST to
ajax-inventory.pl, and got a 403 error in response
4. Apply patch, restart_all
5. Repeat step 1 and 2, this time getting to the second page. Check the
checkboxes for the last two items, and click Mark seen and quit
6. Repeat step 1 and click Submit. You should now have only 20 items, since
the three you checked now have a Last inventory date of today.
Yeah, when you did Mark seen and continue they ought to have been removed from
the list, I agree. I had to go back to 23.11.x and make sure that was really
how it was supposed to function, but that is the existing behavior. Even
though they get marked as seen, nothing changes about your list until you quit
and go back to it. Maybe because then something that wasn't on the current
page would have moved there. Another bug.
Sponsored-by: Chetco Community Public Library Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Matt Blenkinsop [Tue, 30 Jul 2024 12:54:14 +0000 (12:54 +0000)]
Bug 37526: Handle redirects in SUSHI requests
Test plan:
1) Apply test patch only. Run:
prove t/db_dependent/Koha/BackgroundJob/ErmSushiHarvester.t
2) Verify tests fail.
3) Apply this patch. Run tests again. Verify they pass.
PA amended: Added test plan
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Thu, 19 Sep 2024 13:55:48 +0000 (13:55 +0000)]
Bug 37856: Consider 'Exceptions' not being part of 'Report_Header'
When fixing the issue around the missing platform parameter, we
noticed this particular provider also returns 'Exceptions' as
its own thing, not part of 'Report_Header', despite documentation:
https://countermetrics.stoplight.io/docs/counter-sushi-api/7cp0h7n1hm2en-tr-j1-journal-requests-controlled
From the link above, search for 'Exceptions'. Notice it should be under 'Report_Header'.
Either way, this patch accounts for this possibility.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Wed, 18 Sep 2024 15:56:19 +0000 (15:56 +0000)]
Bug 37856: Add service_platform field
The change from this patch itself should be self-explanatory.
Testing for this requires credentials to a specific provider.
But the parameter is only added to the URL if defined.
1) Enable ERMModule
2) Create a new provider, visit:
<staff_url>/cgi-bin/koha/erm/eusage/usage_data_providers/add
3) Ensure 'Service platform' now shows. Create the provider and put something in this field.
4) View the provider, ensure the field is shown, visit:
<staff_url>/cgi-bin/koha/erm/eusage/usage_data_providers/1
Ensure all tests are still passing:
$ cypress run --spec t/cypress/integration/ERM/DataProviders_spec.ts
$ prove t/db_dependent/api/v1/erm_usage_*
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan:
1) Apply only test patch for case 1. Run tests:
prove t/db_dependent/Koha/BackgroundJob/ErmSushiHarvester.t
2) Verify tests fail. Apply the other patch for case 1.
3) Run tests again. Verify they now pass.
4) Repeat the test plan but using patches for case 2
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Thu, 19 Sep 2024 13:39:07 +0000 (13:39 +0000)]
Bug 37963: Case 1 - Return if sushi_errors even if response code >= 400
This ensures that SUSHI errors, if present, are shown on the UI even if
response->code >= 400.
This means that if, for example, SUSHI provider returns 401 with SUSHI
error like so:
{"Code": 2020, "Severity": "Error", "Message": "API Key Invalid"}
Then, the 'API Key Invalid' will be shown to the user, without having to
check logs.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Tue, 17 Sep 2024 12:14:23 +0000 (12:14 +0000)]
Bug 37483: Use cud-list for extend due dates tool
This patch switch the check in the script to 'cud-list' - we use the same form
submission if listing for preview or directly updating dates, so this may or may
not be a cud- action - assuming it is restores script functionality.
See bug 37941 for updating forms to not share actions
To test:
1 - Checkout some items to patrons of at least two libraries
2 - Tools -> Batch extend due dates
3 - Select nothing except 'preview' and submit
4 - Blank screen
5 - Apply patch, repeat
6 - It works!
7 - Filter by library and confirm it still works
8 - Sign off!
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Thu, 19 Sep 2024 07:13:21 +0000 (09:13 +0200)]
Bug 37947: (bug 37429 follow-up) Fix addbiblio and frameworkcode="Default"
On bug 37429 we reordered the global var to assign them before anything
else. The logic is correct except for $frameworkcode, we want to do some
processings (like defaulting to "" if eq "Default") BEFORE we retrieve
the MARC structure ($tagslib, $usedTagsLib).
This patch also moved this code after get_template_and_user (and so
authentication), like it should be everywhere.
Test plan:
1. Go to Cataloging
2. Click on New from Z39.50/SRU
3. Make a search in the library of congress server for anything (Caroline searched for author: shakespeare)
4. Click on one of the results and choose Import
Without this patch the basic editor appears, but not the record
With this patch applied the bug is fixed and you can edit the record
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
When you click on a cell in the Item circulation alerts table, the page sends
a POST to /cgi-bin/koha/admin/item_circulation_alerts.pl without including a
csrf_token, which gets back a 403 error because that's sketchy behavior. It
needs to include the token.
Test plan:
1. Administration - Item circulation alerts
2. Open the browser devtools to the console
3. Click on any green table cell
4. It should have turned red, but instead your console turned red with a 403
5. Apply patch, reload
6. Click on any green table cell, it will turn red
Sponsored-by: Chetco Community Public Library
https://bugs.koha-community.org/show_bug.cgi?id=37959 Signed-off-by: Jan Kissig <jkissig@th-wildau.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
The pref ReportsExportFormatODS should be true for exporting
to ODS in Reporting.
Test plan:
Set pref to false value.
Check if option is no longer available on report's Download menu.
Manipulate URL with op=export&format=ods. No data expected.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 23685: (follow-up) Add export limit for guided reports
Test plan:
Set pref ReportsExportLimit to some positive integer.
Test if exporting a report respects that limit.
Run t/db_dependent/Koha/Reports.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 23685: (follow-up) Add prefs to Administration form
Test plan:
Edit both prefs.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Aleisha Amohia [Tue, 25 Jun 2024 21:43:22 +0000 (21:43 +0000)]
Bug 23685: Don't store ODS content in a variable to save memory
Just attaching this to start.
Sponsored-by: Waikato Institute of Technology Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Mason James [Tue, 24 Sep 2024 00:47:26 +0000 (12:47 +1200)]
Bug 37824: remove references to non-existent files in Makefile.PL
to test...
0/ install debhelper tool
1/ run 'DEB_BUILD_OPTIONS=nocheck dh build', observe failure
make: *** No rule to make target 'koha-tmpl/intranet-tmpl/prog/js/vue/dist/erm.js.LICENSE.txt', needed by 'pm_to_blib'. Stop.
dh_auto_build: error: make -j1 returned exit code 2
2/ apply patch
3/ run 'DEB_BUILD_OPTIONS=nocheck dh build', observe success
Signed-off-by: Blou <blou@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Thu, 19 Sep 2024 15:17:43 +0000 (15:17 +0000)]
Bug 37812: (QA follow-up) Prevent cypress test failures by correcting modal selector, removing ambiguity of contains calls, replace by get with respective ids
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Wed, 18 Sep 2024 12:57:40 +0000 (12:57 +0000)]
Bug 37955: Fix table's 'configure' button to open correct column settings
This patch updates markup and JS code on the table settings page so that
clicking a table's "configure" button will open the right panel and
scroll you to the correct table.
The patch also overrides Bootstrap's default table caption positioning
so that captions are above the table instead of below them.
Unfortunately this property isn't in Bootstrap's _variables.
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface).
- Find a table in the staff interface which has a "Configure" button,
e.g. Administration -> Libraries.
- Click the "Configure" button.
- When you arrive at the table settings page the correct panel should be
expanded (in this example, Administration), and the page should scroll
to the correct table (in this example, libraries).
- The table caption ("Table id: libraries") should appear before the
table instead of after.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This tests are written in a way that the cleanup is done explicitly. So
I found no evidence of them leaving the database dirty. But it felt
worth wrapping anyway, because any dev adding something could easily
introduce new data inadvertedly.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 16 Sep 2024 09:31:45 +0000 (11:31 +0200)]
Bug 37330: (bug 33526 follow-up) Fix display of cover images for items
The id has been modified by bug 33526. We can simply pass the table
element however.
Test plan:
Have some cover images at item level and notice that they are correctly
displayed on the bibliographic record detail page.
Note that the slider does not work correctly. If you click on the dot
(so if you have several images for an item) the scrollbar is going to
hit the top of the page and the image won't change.
Could be reported separately if not done yet.
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 37840: Fix item status in the Intranet detail page when the item has a item type not for loan
When the item type is not for loan, the item status must be "Not for loan". Now in the Intranet status is Available while in the OPAC it's Not for loan.
Test plan:
1 Define an item type as "Not for loan"
2 Add or edit an item so that its item type is "Not for loan"
3 Check that the status in the Intranet detail page shows Available while the OPAC detail page shows "Not for loan"
4 Apply patch, restart services
5 Check that the status is now "Not for loan" in both Intranet and OPAC
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Tue, 5 Mar 2024 12:38:02 +0000 (12:38 +0000)]
Bug 35100: (follow-up) Tidy
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Tue, 5 Mar 2024 12:31:12 +0000 (12:31 +0000)]
Bug 35100: (follow-up) Fix test
Previous patches changed the return values, just needed to update expectations
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Mon, 8 Jan 2024 17:34:09 +0000 (17:34 +0000)]
Bug 35100: Revert change to request_transfer
This patch reverts the change to request_transfer, opting to tackle the
StockRotationAdvance requirement to stay in place in ModItemTransfer
itself.
We also add a FIXME to RotatingCollections.. I'll look to removing that
on another bug to reduce the scope of this one.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Fri, 5 Jan 2024 16:08:44 +0000 (16:08 +0000)]
Bug 35100: Various fixes
1) Don't automagically always set a transfer to in transit on checkin..
wait for the user to actually confirm that's the case
2) New transfers triggered by a hold should take precidence, so hide
transfers for any other reason from display
3) Update get_transfer and get_transfers to ensure ordering isn't lost
when prefetch is used and add tests for this
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 4 Jan 2024 12:00:13 +0000 (12:00 +0000)]
Bug 35100: Prevent StockrotationAdvance transfers from being cancelled
ModItemTransfer is still very heavy handed and outright overrules
existing transfers in the queue.
For StockrotationAdvance transfers it's important that they remain in
the queue to get actioned later, even if a higher precident transfer is
actions in the interim.
This patch adds a clause to the cancellation call within
request_transfer such that StockrationAdvance transfers are left in tact
for the next time the item is checked in.
Test plan
1) Item is added to stock rotation
2) The cronjob creates a 'StockRotationAdvance' transfer
3) The item is checked in, which initiates the transfer, however, a hold is triggered
4) The hold is confirmed, which replaces the StockRotationAdvance
5) The item is checked out
6) The item is checked in, which initiates the transfer again
7) The item is checked in at it's destination and the StockrotationAdvance transfer
has the proper date arrived date set.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 4 Jan 2024 12:09:47 +0000 (12:09 +0000)]
Bug 35100: Unit tests
This patch adds a unit test to ensure StockrotationAdvance transfers are
not cancelled from request_transfer when called with 'replace'.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Paul Derscheid [Tue, 17 Sep 2024 10:59:26 +0000 (10:59 +0000)]
Bug 37812: Improve consistency of modal styling in Dialog.vue
- Use modal-header for content, modal-footer for acknowledgement in alert type modal.
- Conditionally render modal-body if message or inputs available.
- Use modal footer for interactions and hide top border if body wasn't rendered.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 30 Aug 2024 12:47:07 +0000 (12:47 +0000)]
Bug 37775: Remove delayed commits from update_totalissues.pl and add progress option
This patch removes setting AutoCommit to 0 and commiting only every X records.
Instead we commit as we go and report progress using a parameter.
Bug 36474 reduced the numebr of changes that are being committed, so this should be a reasonable change. The
use of commits without transactions was causing problems if the library was active while the script ran.
To test:
1 - perl misc/cronjobs/update_totalissues.pl -c
2 - Script runs, but with unknown parameter
3 - perl misc/cronjobs/update_totalissues.pl -p 10
4 - Script runs and reports every 10 records
5 - per; misc/cronjobs/update_totalissues.pl
6 - Script runs and reports every 100 records by default
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Mon, 1 Apr 2024 15:00:34 +0000 (15:00 +0000)]
Bug 36474: Don't update records when total issues has not changed
This patch adds a new check in UpdateTotalIssues to check that we are changing the number
of total issues before calling ModBiblio
To test:
0 - Enable CataloguingLog
1 - Checkout an item
2 - Run : misc/cronjobs/update_totalissues.pl --use-stats --commit=1000 -v
3 - In report, note all biblios were updated
4 - Check action_logs - note a new entry for every biblio
5 - Apply patch
6 - Repeat
7 - Note no biblios reported updated
8 - Note no new cataloguing log entries
9 - Checkout the item again
10 - Run again
11 - Note biblionumber has updated count in verbose output
12 - Note report only rpeort 1 biblio modified, the rest only processed
13 - Only one line added to action_logs
14 - Run it again
15 - Confirm no updates
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Wed, 18 Sep 2024 03:59:27 +0000 (04:59 +0100)]
Bug 37592: (QA follow-up) Fetch database fields for api return
Creation and Modification times are maintained by the database, but on
add/update we were not fetching the updated fields from the database for
the api response.
This patch corrects that and also updates the api schema to reflect that
these are readOnly fields.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 9 Sep 2024 09:06:37 +0000 (11:06 +0200)]
Bug 37857: Add callnumber and geo_point for new search fields
It is missing "Geo point" and "Call Number" from the options of
"Type" when creating a new search field.
Test plan:
Go to the elastic mapping config page, bottom of the page.
Notice that after this patch you see the 2 options in the dropdown list.
Signed-off-by: Chloe Zermatten <chloe.zermatten@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Thu, 12 Sep 2024 22:39:46 +0000 (15:39 -0700)]
Bug 37914: Forms for budget planning filters and export should GET rather than POST
Because of the bug 36192 CSRF protection, we intend not to have forms that
POST without a param named 'op' with a value starting with 'cud-'. Because
of bug 37728, a few were missed, including the 'Filters' form that lets you
switch between planning budgets by month or by itemtype or by library, and
the 'Export' form that lets you save your planning as a .csv file. Neither
one has any need to POST, they can just be the GET they naturally are.
Alas, the default data won't let you exercise everything, so there's a lot of
setup before the actual testing.
Test plan:
1. Patrons - search for Acevedo - More-> Set permissions - check
Acquisitions management and Save
2. Administration - Authorized values - Asort1 - New authorized value for
Asort1 - value Q1, description First Quarter, then repeat for Q2, Q3, Q4
3. Administration - Budgets - New budget - give it a start date of today,
end date of a year from today, a description, a total amount of
100000.00, for Statistic 1 done on choose Asort1
4. Click the name of your new budget - New-> New fund for (name) - give it
the code my, name My money, amount 75000.00 and Submit
5. New-> New fund for (name) - give it the code his, name Henry's money,
amount 25000.00, and click Select owner, find Henry and Select, then
Submit
6. Acquisitions - click Search on an empty search box to find the only
vendor - New-> Basket - Give it a name and Save
7. Add to basket - From an existing record (search for something like Perl)
click any bib record - Add order - set the required item type and click
Add item
8. Scroll down to the Accounting details form, change Fund to My money, and
enter 20.00 for the Vendor price and click Save. You just made that
fund "active" in the eyes of the Filter form, by spending some of it.
9. Finally set up. Administration - Budgets - click the name of your budget
10. Planning-> Plan by months
11. In the upper left Filter box, check Show my funds only and Submit - you
should see Henry's money disappear
12. Uncheck Show my funds only and check Show active funds only and Submit -
you should see Henry's money disappear
13. Check Show actual/estimated values and Submit, you should see text for
the actual (only in this month, since that's all you spent) and wee
little shrunken text boxes for the planning numbers
14. Uncheck all the boxes and change the dropdown from by months to by Asort1
(either one of it, there being two is bug 34159) and Submit, you should
have four columns for Q1 - Q4 and only for My money, since Henry doesn't
use Asort1
15. Click the Auto-fill row button, and Save
16. In the Export form (which isn't much of a form, since you only have a
choice for the filename) click Submit
17. You should have downloaded a .csv file, and if you open it it should
have the info from your current planning form.
18. Apply patch, restart_all
19. Repeat steps 9-17, getting the same results you did without the patch
Sponsored-by: Chetco Community Public Library Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Wed, 11 Sep 2024 03:17:20 +0000 (20:17 -0700)]
Bug 37887: OPAC password recovery needs to use a cud- op while POSTing new password
To pass xt/find-missing-op-in-forms.t after bug 37728 updates it to notice
that there can be more than one form in a template, opac-password-recovery.tt
needs to have a param named 'op' which starts with 'cud-' for the form that
POSTs the new password.
Luckily, testing this doesn't require that you set Koha up to actually send
email (though you can), because you can get the link to reset the password
by looking at the list of notices sent to the patron in the staff interface:
the failure to send notice works just fine.
Test plan:
1. There's no behavior change to test, you just need to see that resetting
the password still works, so start with the patch applied.
2. Administration - System preferences - change OpacResetPassword to allowed
3. Set a patron so you can use them, which requires that you know the
username, and they have an email address. I give Acosta, Edna one of
my email addresses, and copy her cardnumber.
4. Open the OPAC, and below the login form click the "Forgot your password?"
link
5. Enter the cardnumber for Login and the email you used for Email and
click Submit. If you didn't set up sending email, you'll get an error
message, but ignore it, not a problem
6. Back in the staff interface, check out to the patron you are using, and
on the left sidebar choose Notices and find the Koha password recovery
notice and click that linked phrase
7. In the popup with the notice text, open the recovery link in a new tab
8. Following the instructions for the content of a new password, enter one
in both fields and click Submit
9 In the success message, click the link to Log in to your account and
log in with the new password
Sponsored-by: Chetco Community Public Library Signed-off-by: Olivier V <olivier.vezina@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Thu, 29 Aug 2024 22:31:50 +0000 (15:31 -0700)]
Bug 37769: Fix forms that POST without an op in currency administration
We intend not to have forms with method="post" without an op variable (so we
can check that the op starts with "cud-" as part of the CSRF protection), but
because of bug 37728 some were missed.
This patch changes the form around the OK button when you are told you can't
delete a currency which is in use, and the No, do not delete button when you
could delete a currency and decide not to, from a POST to a GET because all
they need to do is show the list of currencies again.
The only visible change from the patch is that the URL will end with a "?"
from having done a GET without any params. Someone who wants to decide
which of our link-as-cancel-button styles to use is welcome to switch them
to links, in a bug not blocking an RM_priority bug.
Test plan:
1. No changes to see, so apply the patch first
2. Administration - Currencies and exchange rates
3. You need one currency in use and one not in use. Luckily, ktd gave you
USD for in use, and GBP for not in use. For USD, click the Deleete button
4. On the page telling you that you can't delete it because it's in use,
click the OK button and verify that you are back at the list of currencies
5. Click the Delete button for GBP, then the No, do not delete button
6. Verify that you are back at the list of currencies
Sponsored-by: Chetco Community Public Library Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Fri, 30 Aug 2024 00:34:36 +0000 (17:34 -0700)]
Bug 37767: Fix forms that POST without an op in Authority types
We intend not to have forms with method="post" without an op variable (so we
can check that the op starts with "cud-" as part of the CSRF protection), but
because of bug 37728 some were missed.
In Authority types, that's dead code in the template that expects to show a
"Data deleted" confirmation page, but it never shows because rather than
setting the variable delete_confirmed and outputting the template, the op
cud-delete_confirmed just does a print $input->redirect() and exits, and, the
search for tags form that should be a GET so it can be bookmarked and linked
to.
Test plan:
1. Without the patch, Administration - Authority types - choose one other
than default, so you can see the code rather than "" in the URL -
Actions - MARC structure
2. For any tag (you *are* testing in a throwaway database, right?) click
Actions - Delete then Yes, delete
3. Note that you don't get a confirmation page, just redirected back to a
search for your tag which no longer exists, with the searchfield and
authtypecode nicely in the URL
4. Click the Search button for the Search for tag form, without changing
anything
5. Note that your URL lost the searchfield and authtypecode
6. Apply patch, restart_all
7. Repeat steps 1, 2, and 3, with identical results like they should be
8. Repeat step 4, but this time note that the searchfield and authtypecode
stay in the URL.
9. Change the select menu for In framework and click Search, note that
the searchfield and frameworkcode are still in the URL and still correct
and that the correct results show
10. Change the tag number and hit Enter, and verify that the URL and the
page show the correct results
Sponsored-by: Chetco Community Public Library Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Matt Blenkinsop [Mon, 16 Sep 2024 11:00:44 +0000 (11:00 +0000)]
Bug 37929: Remove it.only from Agreements_spec
Test plan:
1) Run the cypress tests for Agreements_spec.ts
yarn cypress run --spec t/cypress/integration/ERM/Agreements_spec.ts
2) Only the Delete test will run
3) Apply patch and yarn build
4) Run test again, all tests should run
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Mon, 16 Sep 2024 16:25:36 +0000 (16:25 +0000)]
Bug 37824: (QA follow-up) Fix improper handling of jQuery and DataTables libraries by marking them as externals
This commit addresses an issue where jQuery and DataTables libraries (datatables.net and related extensions) were not functioning correctly when bundled with rspack. These libraries expect to be loaded in the global scope rather than as bundled modules, leading to initialization issues.
To resolve this, jQuery and all related DataTables libraries (datatables.net, datatables.net-buttons, datatables.net-buttons/js/buttons.html5, etc.) are marked as externals in the rspack configuration. This ensures they are treated as global dependencies, preventing conflicts and allowing proper initialization.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Thu, 12 Sep 2024 10:49:53 +0000 (11:49 +0100)]
Bug 37592: (QA follow-up) Add API mapping and definition
Sticking to API guidelines, this adds the creation_date and
modification_date fields to the api definitions and the required
to_api_mappings for those fields to be properly populated.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Wed, 7 Aug 2024 15:25:25 +0000 (15:25 +0000)]
Bug 37592: Add created_at, updated_at fields to bookings table
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Fri, 13 Sep 2024 00:32:23 +0000 (17:32 -0700)]
Bug 34159: Budget planning shouldn't add every authorized value starting with A
In aqplan.pl there are two different sets of params for things you can plan
by: for the toolbar "Planning" menubutton the script looks up what AVs are
used for "Statistic 1|2 done on" for the budget's fund(s), and passes them to
the template which knows to hardcode the MONTHS, ITEMTYPES, and BRANCHES
choices, but for "Select planning type" in the Filter sidebar box, the
script inserts the harcoded ones itself, adds in the ones used by a fund,
and for no apparent reason adds in every authorized value category that starts
with the letter A and has at least one value. Those things do not actually
work, because for things other than the hardcoded ones the script checks
whether they are in a fund's "Statistic 1|2" and if not refuses to let you
plan by them.
Test plan:
1. Administration - Budgets
2. If you don't have a budget, create one and add a fund to it,
but with the default data click the name Main budget
3. In the row for Main fund, click Actions->Edit
4. For Statistic 1 done on choose an authorized value which does not start
with A, like BOR_NOTES, and Save
5. In the top toolbar, Planning->Plan by months
6. In the sidebar Filter box, note that there is an option to plan by
AR_CANCELLATION even though you didn't select that for Statistic 1
7. Select the by BOR_NOTE choice and Submit
8. Note that you now only see Main fund, because that's the only one
which uses that AV
9. Select the by months choice and Submit, see that it changes back, then
select the by AR_CANCELLATION choice and see that nothing is displayed,
select the by months choice again and Submit, see that the display is
now completely broken
9. Apply patch, restart_all, reload the page
10. Note that the AR_CANCELLATION choice is gone, and all the choices
you do have work correctly
Sponsored-by: Chetco Community Public Library Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Thu, 11 Apr 2024 10:25:21 +0000 (10:25 +0000)]
Bug 26933: Improve handling of multiple covers on catalog search results in the OPAC
This patch implements a book cover slider widget for cover images in
OPAC search results, matching the way we show covers on the detail page.
To test, apply the page and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
Enable multiple cover image services. The patch was developed with these
services available:
- Amazon
- Local cover images
- Coce (serving up Amazon, Google, and OpenLibrary images)
- OpenLibrary
- Baker & Taylor
- Google
- Custom cover images (the CustomCoverImages preference)
Perform a variet of searches and confirm that cover images are
displaying correctly, whether there be 0, 1, 2, or more covers
available for each.
Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This subroutine can easily be replaced and is not really needed.
Test plan:
No changes expected, try to suspend/resume holds from the OPAC
Note that you cannot affect somebody's else holds.
Note for QA: The extra fetch of Koha::Hold will be removed on bug 37868.
Signed-off-by: Olivier V <olivier.vezina@inLibro.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Tue, 3 Sep 2024 15:35:16 +0000 (17:35 +0200)]
Bug 37824: Replace webpack with rspack for fun and profit
I left the webpack.config.js as well as the devDependencies in place for now.
We can remove them in a follow-up patch on this bug after testing it out.
To test:
1) Run js:build and js:build:prod
2) Note the build time
3) Apply patch
4) Run yarn install
5) Run js:build and js:build:prod again
6) Note the much faster build time
7) Extra credit: take a look at the ERM or preservations module and make sure everything works as expected.
8) Extra credit: run the cypress tests.
9) Sign off or give your opinion
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Looks faster to me. Where webpack failed for me (Killed, error 137), this passed. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 37480: Make addroutingmember use Koha::Subscription::Routinglists
This patch rewriteis the method so it relies on Koha::Object-based
classes instead of the old way.
To test:
1. Run:
$ ktd --shell
k$ prove t/db_dependent/Serials.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Run:
$ git grep addroutingmember
=> SUCCESS: It is only called on a single .pl file which doesn't care
about the return value. Neither the tests care.
5. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 37380: Replace uses of GetMarcControlnumber for get_control_number()
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 37380: Add get_control_number() to the metadata extractor
This simple patch implements C4::Biblio::GetMarcControlnumber in the
right spot on the Koha::* namespace.
To test:
1. Apply this patches
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>