Commit graph

55052 commits

Author SHA1 Message Date
20cf1fd7b6
Bug 37601: (QA follow-up) Change updated_on to modification_date in accordance with Bug 37592
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:14 +02:00
2b6bd66fd2
Bug 37601: (QA follow-up) Add status to api definition
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:14 +02:00
262646bd60
Bug 37601: (follow-up) Change updated_at to updated_on in accordance with Bug 37592
Signed-off-by: LEBSimonsen <simonsen@bz-sh.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:13 +02:00
0846e45a1e
Bug 37601: Add status field to bookings table
Signed-off-by: LEBSimonsen <simonsen@bz-sh.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:13 +02:00
750f40eaae
Bug 37592: (follow-up) Fix database column names in kohastructure.sql
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:12 +02:00
d17c640510
Bug 37592: DBRev 24.06.00.029
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:11 +02:00
e75c1ac012
Bug 37592: (QA follow-up) Change created_on, updated_on to creation_date, modification_date
It makes sense not to introduce mapping code if there's no reason for it.
Accordingly the the columns are now of type DATETIME instead.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:11 +02:00
b884de71ce
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>
2024-09-16 13:47:10 +02:00
ab7d511822
Bug 37592: (follow-up) Change created_at, updated_at to created_on, updated_on
As per a discussion in the community chat, this change is more in line with the existing schema.

Signed-off-by: LEBSimonsen <simonsen@bz-sh.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:10 +02:00
2dec6cb6d1
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>
2024-09-16 13:47:09 +02:00
Phil Ringnalda
db42742a3a
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>
2024-09-16 13:47:08 +02:00
a6c85442bc
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>
2024-09-16 13:47:08 +02:00
cae45797b8
Bug 30856: Remove C4::Reserves::CanReserveBeCanceledFromOpac
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>
2024-09-16 13:47:07 +02:00
28b6294461
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>
2024-09-16 13:47:06 +02:00
27f94d8f9b
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>
2024-09-16 10:41:06 +02:00
c895a8d563
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>
2024-09-16 10:41:05 +02:00
7cafe5f0dd
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>
2024-09-16 10:41:04 +02:00
9936c99903
Bug 37380: Unit tests
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>
2024-09-16 10:41:04 +02:00
Caroline Cyr La Rose
c547fbcf8d
Bug 37781: Add translation context for "On" (when used alone)
This patch adds context to the string "On" used alone in the item search
page, to mean "On a specific date".

To test:
1. Update translation files

gulp po:update --lang fr-CA

2. Check the staff-prog.po file and search for "On".

vi misc/translator/po/fr-CA-staff-prog.po

/"On"

   --> It should be in three places, two in itemsearch.tt and
       one in smtp_servers.tt

 #. For the first occurrence,
 #. SCRIPT
 #: koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt:327
 #: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:322
 #: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:324
 #, c-format
 msgid "On"
 msgstr "Sur "

3. Apply patch
4. Reupdate po files

gulp po:update --lang fr-CA

5. Check the misc/translator/po/fr-CA-messages.po file and search for "On"

    --> There should be a msgctxt line that adds context to the
        "On" (please ignore the translated msgstr, I have no idea
        how it decides what to put in there!)

 #: koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt:404
 #, fuzzy
 msgctxt "Active"
 msgid "On"
 msgstr "Oman"

 #: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:322
 #: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:324
 #, fuzzy
 msgctxt "On specific date"
 msgid "On"
 msgstr "Oman"

6. Also check the item search page
   --> It should still work and the "On" in the last borrowed date
       drop-down should still say "On"

7. In the SMTP servers page, add a server and enable the "Debug" mode.
   --> In the list of servers, the Debug column should still say simply
       "On"

8. Optionally, translate the string and remove the "#fuzzy" line,
   install the translation and check the item search page
   --> It should use the string you put in

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>
2024-09-16 10:41:03 +02:00
8e211a1fef
Bug 35191: Make entries per page configurable for items table on staff detail page
The new API driven items view defaults to 20 per page. This is a bit low, it would be great if it could be configurable to a higher value per the table configuration.

Test plan:
1. Apply this patch
2. restart_all (memcached restart is required)
3. Go to Administration > Table settings
4. Catalogue > holdings_table | otherholdings_table
=> Notice the new "Default display length"
5. Select something else than 20
6. Go to the detail page of a record with lot of records
=> Notice that the default value defined in the settings is used.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:41:03 +02:00
860d3967ae
Bug 17729: Replace IsItemOnHoldAndFound
This subroutine can easily be replaced with
$item->holds->filter_by_found->count \o/

Test plan:
Confirm that the old sub and $item->holds->filter_by_found->count
produce the same query

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:41:02 +02:00
Jennifer Sutton
039b004b8e
Bug 8855: Make receipt page link to invoice page
To test:

Go to the receipts page of an order. Observe that the invoice number
is a clickable link to the corresponding invoice.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Works well and passed the qa tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:41:01 +02:00
93579b7622
Bug 34608: (follow-up) Remove debug statement
Removes:
console.log(waiting_holds_barcodes);

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:41:01 +02:00
caa40bf425
Bug 34608: Deal with null values
default values for sort1 and sort2 is NULL

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:41:00 +02:00
1dc88130d1
Bug 34608: Display dropdown list if linked with AV cat
If at least one AV exists for bsort1 we will show a dropdown list in
the column filter for bsort1. Same for bsort2.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:41:00 +02:00
c52f51b421
Bug 34608: (follow-up) Display authorized values if used
This patch shamelessly steals from Bug 33568 in order to allow the
correct authorized value description to be shown in the JS-generated
table of results for values of borrowers sort1 and sort2.

To test, apply the patch and go to Administration -> Authorized values.

- Add some values, if necessary, to both the 'Bsort1' and 'Bsort2'
  categories.
- Locate some patron records to edit, and set the patron's "Sort 1" and
  "Sort 2" fields.
- Perform a patron search which will return those patron records.
  - Confirm that the correct authorized value description is shown
    instead of the authorized value code.
- Delete all values from the 'Bsort1' and 'Bsort2' authorized value
  categories.
- Return to your patron search and confirm that "Sort 1" and "Sort 2"
  values are still being shown, though now it's the "raw" code.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:40:59 +02:00
44f7f404fc
Bug 34608: Add sort1 and sort2 to patron search results
This patch adds the option of displaying patron "sort1" and
"sort2" statistical fields in the patron module's main search
results. The fields are hidden by default in the updated table
configuration.

To test, apply the patch and restart services.

- Go to Patrons and perform a search.
- You should not see columns for sort1 and sort2.
- Under the "Columns" button you should see options to display sort1 and
  sort2. Confirm that they work to show and hide the columns.
- Confirm that the sort1 and sort2 columns are sortable and searchable.

- Go to Administration -> Table settings.
- Under Patrons -> member, toggle the sort1 and sort1 "hidden by
  default" checkboxes and save the configuration.
- Return to patron search results to confirm that the columns are now
  shown by default.

Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:40:58 +02:00
eca1cb153b
Bug 31161: Unit tests
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:40:58 +02:00
3e33648693
Bug 31161: (QA follow-up) Remove FIXME
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:40:57 +02:00
95932d5ddc
Bug 31161: Mark hidden records as deleted
If a bib record is hidden by OpacHiddenItems,
mark it as deleted in the OAI-PMH, so that it's metadata
is not consumed in a new OAI-PMH harvest, and it's marked
for removal if the metadata was consumed in previous harvested.

Test plan:
0. Setup
vi /etc/koha/sites/kohadev/oai.conf
format:
  marcxml:
    metadataPrefix: marcxml
    metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
    schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
    include_items: 1

Set sysprefs:
OAI-PMH: Enable
OAI-PMH:ConfFile: /etc/koha/sites/kohadev/oai.conf
OAI-PMH:AutoUpdateSets: Enable
OAI-PMH:AutoUpdateSetsEmbedItemData: Enabled

OpacHiddenItems:
barcode: [3999900000001]
OpacHiddenItemsHidesRecord: Hide

Adminsitration->OAI set configuration->New set
Choose anything for setSpec and setName
On new set: Actrion->define mappings
Field: 952
Subfield: p
Operator: is equal to
Value: 3999900000001

perl misc/migration_tools/build_oai_sets.pl -r -v -i

1. koha-plack --restart kohadev
2. Go to http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml
3. Confirm KOHA-OAI-TEST:1 is marked as deleted and not metadata visible
4. Go to http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListIdentifiers&metadataPrefix=marcxml
5. Confirm KOHA-OAI-TEST:1 is marked as deleted
6. Go to http://localhost:8080/cgi-bin/koha/oai.pl?verb=GetRecord&metadataPrefix=marcxml&identifier=KOHA-OAI-TEST:1
7. Confirm record is marked as deleted and no metadata visible
8. View Sets and confirm the record appears in the set but as deleted record
9. Change OpacHiddenItemsHidesRecord syspref to "Don't hide" and repeat above steps
10. Confirm that the record metadata is now visible and the record is not marked as deleted

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:40:57 +02:00
541199edf8
Bug 37524: (QA follow-up) Tidy affected block in checkouts.js
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:40:56 +02:00
Emmi Takkinen
45e7bdaff7
Bug 37524: Do not attempt to renew check outs if there is nothing to renew
If patrons loans are not renewable and one hits "Renew all"
button in patrons "Check out" page, Koha is redirected to
"Export data" tool. This happens because when there is
nothing to renew call to function renew_all produces error:
"Uncaught TypeError: renew_all(...) is undefined". This
patch prevents call to this function and adds alert to
inform user that there are no items to be renewed.

To reproduce:
1. Find patron with check outs which renewals count has hit
the maximum limit of renewals.
2. Press "Renew all" button.
=> Koha is redirected to "Export data" tool.
3. Apply this patch.
4. Try to renew check outs again.
=> Alert pop up is displayed.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:40:56 +02:00
6bcc82815d
Bug 37587: (QA follow-up) Tidy reserve/placerequest.pl
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:40:55 +02:00
Emily Lamancusa
e1517fc8c8
Bug 37587: Fix priority of multiple item-level holds
The rank parameter is passed per biblio record, not per item. When
placing multiple item-level holds on one bib record, only $rank[0] is
defined.

To test:
1. System preference and circulation rule setup
    i. Set the system preference DisplayMultiItemHolds to Enable
    ii. Edit the default circulation rule to allow 5 holds per record
2. Find or create a bib with 4 or more items
3. Place several bib-level holds
4. Place 4 or more item-level holds at once on that same record
    i. Search for a patron to place the holds for (not one of the
       patrons you used in step 3)
    ii. Select "Hold a specific item"
    iii. Check the checkboxes for 4 or more items
    iv. Click Place hold
--> Note that one of the new item-level holds is at the end of the list
    as it should be, but the rest are out of order
5. Cancel the item-level holds from step 4
6. Apply patch and restart_all
7. Repeat step 4
--> All the new item-level holds are now at the end of the list

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:40:54 +02:00
Phil Ringnalda
1264ece1f9
Bug 37913: Remove more unreachable code in aqcontract.tt
When you successfully delete an acquisitions contract, you are redirected to
the page with the vendor details, which shows contracts for that vendor, which
shows you that the contract you deleted was deleted.

The aqcontract.tt template has a block in [% IF ( delete_confirmed ) %] (which
is never set) that thinks it will show you a '<h1>Contract deleted</h1>' and
make you click an OK button. That block has never been shown, but the button
is in a form which POSTs without an 'op' param, which is now forbidden by the
CSRF code, and will be caught by a test once bug 37728 updates the test.

There's nothing visible to test, so the test plan just makes sure nothing
blows up and you can still delete a contract.

1. Nothing will change, so start with the patch applied
2. Acquistions - click the Search button to search for vendors
3. New -> Contract
4. Give it a name, a start date, and an end date, and Save
5. In the list of contracts for My Vendor, click the Delete button for
   the contract you created
6. In the confirmation page asking if you wanted to delete, click 'Yes,
   delete contract'
7. Note that you are at acqui/supplier.pl?booksellerid=1, the details page
   for the vendor, and your contract isn't listed at the bottom of the page,
   and especially that you weren't shown a page that just said "Contract
   deleted."

Sponsored-by: Chetco Community Public Library
Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:40:54 +02:00
711c399222
Bug 37916: Convert plugin install button to form
This patch takes the usual approach of converting linked buttons to form
with the csrf token included.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 10:40:53 +02:00
1740a293eb
Bug 37757: (follow-up) Adjust existing tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2024-09-13 16:16:01 -03:00
ea17ce2ffa
Bug 37818: (follow-up) Remove failing XXX tests from Installer.t
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 16:18:26 +02:00
23b00bdc06
Bug 37917: Add some wait time to RecordSources_spec.ts for the intercepted request responses
This patch introduces the `cy.wait(500)` we use in several other Cypress
tests when an (intercepted) API request is made. This is very important
when tables are being rendered as DataTables is particularly bulky and
prone to take longer to finish loading the components if the CPU load is
a bit high.

I wasn't able to reproduce the problem very often, but you can test
yourself:

1. Run:
   $ ktd --shell
  k$ run_cypress --spec t/cypress/integration/Admin/RecordSources_spec.ts
2. Run it many times
=> FAIL: At some point it fails, you can overload your computer to try
3. Apply the patch
4. Repeat 2
=> SUCCESS: No failures :-D
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 16:06:29 +02:00
846ab3a0f1
Bug 36595: (follow-up) Conditionals and consistency
Added a conditional to only display email if there's actualy a
notice_email_address present.

Updated the address used to match the address displayed.

Not sure how to resolve the translation issue.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Removed "Hold item:" from subject line as it would not translate.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 16:06:28 +02:00
d321dc6934
Bug 35402: Fix cypress test csrf.ts
The tests were failing because of the class having changed from
message to alert.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 16:06:27 +02:00
c038bbfd0b
Bug 37636: Remove sort of pending_checkouts by timestamp
Renewals or automatic renewal attempts can change the timestamp of an issue and cause a sort
on this field to functionally randomize the order of checkouts returned.

Prior to bug 19935 the GetPendingCheckouts routine returned items in issuedate order.

Removing the sort on timestamp will return the previous behaviour and provide a more predictable sorting

To test:
1 - Checkout some items to a patron
2 - Print a checkout slip - items are in the order they were checked out
3 - Renew an item,print the slip again it is now at the top of the list
4 - Apply patch, restart_all
5 - Print slip again - the items are now ordered in the order they were checked out.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 16:06:27 +02:00
3b0f4ad5e8
Bug 37636: Unit test
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 16:06:26 +02:00
Emily Lamancusa
1f4be98d7f
Bug 37797: Change cancel button to a link styled as a button
On the confirmation page for deleting a budget, change "Do not delete"
from a form submission to a link (styled to look like a button) in order
to avoid errors from POSTing with no op.

To test:
1. Go to Acquisitions > Budgets
2. Create a test budget
3. Attempt to delete the test budget
4. On the confirmation page, click "No, don't delete"
--> An error appears saying that the form was POSTed with no op!
5. Apply patch
6. Repeat steps 3-4
--> You are linked back to the Budgets page. The budget was not deleted.

Signed-off-by: Chloe Zermatten <chloe.zermatten@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 16:06:26 +02:00
982ba9e8a1
Bug 37757: DBRev 24.06.00.028
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 16:06:25 +02:00
d50aa6aa72
Bug 37757: (follow-up) Warn on bad values and survive
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 16:06:24 +02:00
b262e350f1
Bug 37757: Make notice_email_address() handle EmailFieldPrimary values more robustly
This patchset makes:

* The EmailFieldPrimary value 'OFF' be replaced by an empty string
* Koha::Patron->notice_email_address() handle the empty case more
  gracefully

To test:
1. On main, manually set the EmailFieldPrimary syspref to empty
   $ ktd --shell
  k$ koha-mysql kohadev
   > UPDATE systempreferences SET value='' WHERE variable='EmailFieldPrimary';
2. Enable `AutoEmailNewUser`
3. Create a new user
=> FAIL: Koha explodes like:
```
The method Koha::Patron-> is not covered by tests!

Trace begun at /kohadevbox/koha/Koha/Object.pm line 992
Koha::Object::AUTOLOAD('Koha::Patron=HASH(0xaaaae37ac550)') called at /kohadevbox/koha/Koha/Patron.pm line 1662
Koha::Patron::notice_email_address('Koha::Patron=HASH(0xaaaae37ac550)') called at /kohadevbox/koha/members/memberentry.pl line 448
...

4. Apply this patches
5. Run:
  k$ updatedatabase
=> SUCCESS: Update succeeds
6. Restart all and retry creating a patron
=> SUCCESS: It worked!
7. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 16:06:24 +02:00
79ffb8841b
Bug 37757: Update EmailFieldPrimary value
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 16:06:23 +02:00
24f84f11a2
Bug 37757: Unit tests
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 16:06:23 +02:00
c0ff193986
Update contributor list with some new contributors
Final stats update will be done before 24.11 release.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 16:06:22 +02:00