koha.git
2 months agoBug 36142: recallsview template param for opac-recall.tt
Pedro Amorim [Wed, 21 Feb 2024 13:03:13 +0000 (13:03 +0000)]
Bug 36142: recallsview template param for opac-recall.tt

Test plan:
1) Enable UseRecalls
2) Visit OPAC confirm recall page:
<opac_url>/cgi-bin/koha/opac-recall.pl?biblionumber=76
3) Notice left-side menu 'Recalls history' is not active
4) Apply patch. Repeat.

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>
2 months agoBug 36452: correct display of patron message
Philip Orr [Thu, 28 Mar 2024 10:34:32 +0000 (10:34 +0000)]
Bug 36452: correct display of patron message

To test:
1. Before applying the patch:
2. In the staff interface, navigate to a patron
3. Add a new staff message that contains multiple lines (e.g. using
   enter for the next line)
4. Save the message and check the display.
   It will be a single line.
5. Apply the patch and navigate back to the
   patron
6. The message should now be displayed as multiple lines.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36409: DBRev 23.12.00.016
Katrin Fischer [Fri, 5 Apr 2024 09:41:19 +0000 (09:41 +0000)]
Bug 36409: DBRev 23.12.00.016

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36409: Fix capitalization for AcquisitionsDefaultEMailAddress and SerialsDefaultE...
Emily Lamancusa [Wed, 27 Mar 2024 14:51:34 +0000 (10:51 -0400)]
Bug 36409: Fix capitalization for AcquisitionsDefaultEMailAddress and SerialsDefaultEMailAddress

Replace all instances in files with correct capitalization for the
sysprefs:
SerialsDefaultEMailAddress
AcquisitionsDefaultEMailAddress

Test plan:
1. Apply patch
2. Run database update
3. Go to Administration > System Preferences > Acquisitions
-> Confirm correct capitalization for AcquisitionsDefaultEmailAddress
   (should be "Email", not "EMail")
4. Go to Administration > System Preferences > Serials
-> Confirm correct capitalization for SerialsDefaultEmailAddress
   (should be "Email", not "EMail")
5. Use git grep to confirm no remaining instances of "EMail" in the code
   (other than the new dbrev, original dbrev and original release notes)
   e.g. git grep --files-with-matches "EMail"
6. Confirm the test plan for Bug 20755 still works

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36409: Dbrev for existing installations
Emily Lamancusa [Wed, 27 Mar 2024 14:45:55 +0000 (10:45 -0400)]
Bug 36409: Dbrev for existing installations

Dbrev to change EMail to Email for SerialsDefaultEMailAddress and
AcquisitionsDefaultEMailAddress

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36462: remove extra Home breadcrumb item
Andreas Roussos [Fri, 29 Mar 2024 06:59:41 +0000 (07:59 +0100)]
Bug 36462: remove extra Home breadcrumb item

In the Staff interface, when viewing (or editing) the authority MARC
subfield structure for a particular field, the Home button breadcrumb
on the top left of the screen appears twice.

This patch fixes that.

Test plan:
1) Try to view (or edit) the authority MARC subfield structure for
   a particular field. Notice the 'Home' breadcrumb button/icon is
   appearing twice.
2) Apply this patch.
3) Refresh the page, the 'Home' breadcrumb icon should now appear
   only once.

Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36439: Remove duplicate section in columns_settings
Andreas Jonsson [Wed, 27 Mar 2024 14:15:16 +0000 (15:15 +0100)]
Bug 36439: Remove duplicate section in columns_settings

   The patch for bug 33575 was carelessely applied so
   the holds section was overwritten by a duplicated
   section which cause the table configuration for
   the holds-to-pull table to be missing.

   Test plan:

   * Place a hold on a record that has items (so there is at least one hold to pull)
   * Go to the page "holds to pull" and verify that the column settings are present
     to the left above the table (<cog wheel icon> Columns).

     NOTE: the column settings are cached, so you need to reset memcached
     between tests if you want to test with and without the patch.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36384: Fix 'Used saved' typo in guided reports
Tomas Cohen Arazi [Thu, 21 Mar 2024 12:16:39 +0000 (09:16 -0300)]
Bug 36384: Fix 'Used saved' typo in guided reports

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36516: Fix useless warning from translation script
Jonathan Druart [Thu, 4 Apr 2024 09:13:04 +0000 (11:13 +0200)]
Bug 36516: Fix useless warning from translation script

I lost too much time trying to know what the translation script outputs
  sh: 1: Syntax error: end of file unexpected

To recreate:
touch 'koha-tmpl/intranet-tmpl/prog/en/modules/<' (yes, don't ask!)
koha-translate -i de-DE --dev kohadev
or
koha-translate -u de-DE --dev kohadev

And you get the shell error without any ideas what's happening!

With this patch applied you will not get any errors because the quote
will actually copy the file (what is expected).

But without the quote the cp command will fail and the explanation will be
displayed
sh: 1: Syntax error: end of file unexpected
Cannot copy /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/< to /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/de-DE/modules/< at /kohadevbox/koha/misc/translator/tmpl_process3.pl line 385.

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>
2 months agoBug 35708: Update default system preference for AutoRenewalNotices
Brendan Lawlor [Thu, 4 Apr 2024 19:47:49 +0000 (19:47 +0000)]
Bug 35708: Update default system preference for AutoRenewalNotices

Test plan:
1. Apply test plan and restart everything
2. Confirm AutoRenewalNotices defaults to patron messaging preferences

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36173: (follow-up) Tidy
Nick Clemens [Tue, 2 Apr 2024 11:54:53 +0000 (11:54 +0000)]
Bug 36173: (follow-up) Tidy

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36173: Display basket info when cancelling an order
Jonathan Druart [Tue, 27 Feb 2024 13:00:06 +0000 (14:00 +0100)]
Bug 36173: Display basket info when cancelling an order

The basketno is missing from the 2 links in acqui/parcel.tt

Better to retrieve the basketno from the order in the controller.

Test plan:
Create an order, receive it
On the parcel view notice that the "Cancel order" link leads to a
confirmation page that does not contain the info of the basket.
It's fixed with this patch applied.

Note: Don't fully receive, but 'Receive shipment' from vendor, choose an invoice, and cancel the order from the list to be received

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36268: Add a mock for ReplyToDefault
Marcel de Rooy [Thu, 7 Mar 2024 10:09:13 +0000 (10:09 +0000)]
Bug 36268: Add a mock for ReplyToDefault

Test plan:
Without this patch, add email address in that pref.
Run Letters.t. It fails.
Now apply patch and run test again. Should pass.

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>
2 months agoBug 36469: Fix conflict between _header.scss and addbiblio.css tab style
Owen Leonard [Mon, 1 Apr 2024 12:22:15 +0000 (12:22 +0000)]
Bug 36469: Fix conflict between _header.scss and addbiblio.css tab style

addbiblio.css adds padding to tab panes specific for that interface, and
the header search form should not pick up that style. This patch adds
some specificity to _header.scss to avoid unwanted padding.

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).

- Go to Cataloging -> New record (using the basic MARC editor).
  - The style of the MARC edit form should look correct.
  - The header search form should look correct
- Test other pages with tabs to confirm that there are no other unwanted
  side-effects, e.g. Circulation -> Check out; Advanced catalog search;
  Bibliographic detail page.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36031: Remove obsoleted script
Marcel de Rooy [Thu, 8 Feb 2024 08:41:25 +0000 (08:41 +0000)]
Bug 36031: Remove obsoleted script

Since it is not up to date, we should remove it.
The folder structure changed and this would need digging into SELinux to update that side as well.
In other words, remove this until someone finds time do it. But dont let it here in its current outdated state.

No test plan here.

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>
2 months agoBug 36395: Remove useless fetch in admin/marc_subfields_structure.pl
Jonathan Druart [Thu, 21 Mar 2024 14:52:52 +0000 (15:52 +0100)]
Bug 36395: Remove useless fetch in admin/marc_subfields_structure.pl

Since (a long time ago!)
  commit 62aa3f4292d83bc9304e296de5f0830e28510492
  Bug 17216: Use Koha::AVC from mss.pl

This $sth2 is never fetched, we are retrieving the AV cat using
Koha::AV::Categories

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35868: Warning sign for using a patron category that is limited to another librar...
Fridolin Somers [Thu, 21 Mar 2024 14:08:38 +0000 (15:08 +0100)]
Bug 35868: Warning sign for using a patron category that is limited to another library has moved to other side of page

Bug 31422 implemented a warning sign, when a patron has a patron category that you are not allowed to set due to library limitations on the code.
It should appear right next to the field, but might appear on the other side of the page now being easily missed.

This patch simply removes the float:right CSS rule.

To test:
* User's login branch and home library is: Centerville
* Patron category "B - Board" is limited to Franklin
* Create a new patron: Board doesn't show
* Edit an existing patron with another patron category: Board doesn't show
* Edit a patron with Board category from Centerville
=> Check the warning icon with the tooltip is close to the category select

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 27198: Fix syntax in marc21-retrieval-info-auth-dom.xml
David Cook [Fri, 11 Dec 2020 04:42:39 +0000 (04:42 +0000)]
Bug 27198: Fix syntax in marc21-retrieval-info-auth-dom.xml

This patch fixes the syntax in marc21-retrieval-info-auth-dom.xml,
so that one can use the Zebra special retrieval elements documented
at https://software.indexdata.com/zebra/doc/special-retrieval.html

These are very useful when troubleshooting issues with authority
records in Zebra.

Test plan (using KTD):
1. yaz-client unix:/var/run/koha/kohadev/authoritysocket
2. Enter these commands:
   . base authorities
   . format xml
   . elements zebra::snippet
   . find e
   . show 1
3. Result = diagnostic message:
     Diagnostic message(s) from database:
        [25] Specified element set name not valid for specified database
             -- v2 addinfo 'zebra::snippet'
4. Apply the patch
5. Copy updated file: sudo cp debian/templates/marc21-retrieval-info-auth-dom.xml
   /etc/koha/marc21-retrieval-info-auth-dom.xml
6. Stop and restart zebra (no need to rebuild the Zebra index):
   . sudo koha-zebra --stop kohadev
   . sudo pkill zebrasrv
   . sudo koha-zebra --start kohadev
7. Repeat commands in step 2.
8. Result from show 1 = XML output:
    Sent presentRequest (1+1).
    Records: 1
    Record type: XML
    <record xmlns="http://www.indexdata.com/zebra/">
      <snippet name="Any" type="w">Gontarski, S. <s>E</s></snippet>
    </record>nextResultSetPosition = 2
   Elapsed: 0.013929

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36442: Fix typo in EDIFACT messages list
Per Larsson [Fri, 23 Feb 2024 13:29:48 +0000 (14:29 +0100)]
Bug 36442: Fix typo in EDIFACT messages list

To test:
1) Create an edifact message
2) Go to the acquisition EDIFACT messages page and
   verify the basket link is broken
3) Apply patch
4) Verify the link now works

Sponsored-by: Gothenburg University Library
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35599: Fix Pronouns and HidePersonalPatronDetailOnCirculation
Fridolin Somers [Mon, 25 Mar 2024 14:53:10 +0000 (15:53 +0100)]
Bug 35599: Fix Pronouns and HidePersonalPatronDetailOnCirculation

Bug 10950 adds a pronouns text field to the patron record.
Currently it is hidden by system preference 'HidePersonalPatronDetailOnCirculation'.

This patch moves pronouns outside this system preference influence.

Test plan:
1) Add pronouns to a patron
2) Set system preference 'HidePersonalPatronDetailOnCirculation' to "Don't hide"
3) Check you see pronouns in circulation page
   /cgi-bin/koha/circ/circulation.pl?borrowernumber=X
4) Set system preference 'HidePersonalPatronDetailOnCirculation' to "Hide"
5) Refresh circulation page
=> Without patch pronouns are hidden
=> With patch pronouns are displayed

Signed-off-by: Hebah <hebah@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35685: Fix after creation actions
Pedro Amorim [Wed, 3 Jan 2024 12:01:36 +0000 (12:01 +0000)]
Bug 35685: Fix after creation actions

Test plan:

1) Install FreeForm and enable ILLModule, run:
  bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Configure ILLModuleDisclaimerByType, visit:
  /cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=ILLModuleDisclaimerByType
  Click "edit" and paste the example code into the sys pref value
3) Create a new OPAC ILL request, visit:
  /cgi-bin/koha/opac-illrequests.pl?method=create&backend=FreeForm
4) Dont put a type or branch, click 'Create', on the next screen click 'Submit'
5) Notice it explodes
6) Apply patch and repeat. It no longer explodes and now shows an error message.

7) (After FQA): Create a normal request, input type and library, submit the type disclaimer
8) Run:
echo "select * from illrequestattributes;" | koha-mysql kohadev
9) Notice type_disclaimer_date and type_disclaimer_value are correctly saved

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>
2 months agoBug 23296: Set patron branchcode when preparing non-digest version
Lucas Gass [Thu, 25 Jan 2024 21:54:21 +0000 (21:54 +0000)]
Bug 23296: Set patron branchcode when preparing non-digest version

To test:
1. APPLY PATCH
2. Set up circ rules to allow for auto renewals.
3. Set AutoRenewalNotices to 'according to message prefs'
4. Make a branch specific version of the the AUTO_RENEWAL notice.
5. Find a patron belonging to that branch and set the message prefs to allow for a AUTO_RENEWAL. But no digest option!
6. Check some things out and make sure they are eligble for auto renewal.
7. Run the cron.
8. Make sure the patron gets the branch specific notice.
9. Delete the branch specific notice.
10. DO 6-7 again.
11. Make sure they now get the all library notice.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Tidied one line.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36507: Allow non-superlibrarians to set desk and register
Lucas Gass [Wed, 3 Apr 2024 21:46:08 +0000 (21:46 +0000)]
Bug 36507: Allow non-superlibrarians to set desk and register

To test:

1. Turn on UseCirculationDesks
2. Create some desks
3. Login as a non-superlibrarian
4. Try to switch desks, get an error

5. Turn on UseCashRegisters
6. Create some registers
7. As a non-superlibrarian try to change your register, get an error.

8. APPLY PATCH and restart_all
9. Try changing your desk and register again, it should now work.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36521: Checkbox preferences should be allowed to be submitted empty
Pedro Amorim [Thu, 4 Apr 2024 12:35:56 +0000 (12:35 +0000)]
Bug 36521: Checkbox preferences should be allowed to be submitted empty

Visit:
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=i18n_l10n

Uncheck English on both 'language' and 'OPACLanguages'. Save.
Notice "Nothing to save" shows.
Apply patch. Repeat. Notice you can now save with all options empty.

To my knowledge, these 2 language preferences are the only checkbox preferences of this kind (correct me
if I'm wrong please).

I need to add a new system preference for bug 35604 listing all installed ILL backends so the user
may enable or disable each of the backends.
I want that particular system preference to be disabled as a whole if all backends are unchecked, but I was unable
to uncheck all before this patch.

I understand that for languages checkboxes specifically not allowing everything to be empty may make sense (at least
one language should be enabled, after all). But these languages checkbox preferences should be the exception, not the rule,
for this behaviour.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35714: Prevent items not linked with processing with a letter code a to be printed
Jonathan Druart [Tue, 9 Jan 2024 15:47:56 +0000 (16:47 +0100)]
Bug 35714: Prevent items not linked with processing with a letter code a to be printed

Items linked with a processing which does not have a letter code are not
supposed to be printed.
Currently the code is allowing to "print slip" for items when using the
link on top of the table. It results in an error "No letter_code at
/kohadevbox/koha/preservation/print_slip.pl line 45."

Test plan:
Create a processing without a letter code
Add 2 items to the waiting list then add them to a train
Go to the "show train" view
=> notice that you cannot print slip for those items
Create another processing with a letter code
Edit one of the item and set it the new processing
=> A slip for this item can be printed
Edit the other item and the train to make them use the new processing
=> A slip for those items can be printed

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35573: Correctly display warning when placing a hold
Julian Maurice [Wed, 7 Sep 2022 09:24:49 +0000 (11:24 +0200)]
Bug 35573: Correctly display warning when placing a hold

Test plan:

1) Add a basic circulation rule like : 0 hold allowed on patron category
   'A' and set AllowHoldPolicyOverride to 'Allow'
2) Make a hold on a patron belongs to this category
3) Normally you should see a warning on item (override needed) but it's
   not the case
4) Apply this patch
5) Refresh and repeat step 2

This patch comes from an alternative patch on the original bug (I'm including
the original test plan for your information) :

(Bug 30687 - alternative patch): Always allow to force hold pickup location

If AllowHoldPolicyOverride is enabled and only some pickup locations are
available, you still have the possibility to force one of the others
pickup locations.
But when there are zero pickup locations available, that is not
possible.

This patch change that by always displaying the list of pickup locations
when AllowHoldPolicyOverride is enabled.

Test plan:
1. Apply patch
2. Disable AllowHoldPolicyOverride
3. Create a biblio B with an item I at library A.
4. Configure this library A to not be a pickup location
5. Add a "Default holds policy by item type" for item I type where "Hold
   pickup library match" is "item's home library"
6. Try to place a hold on biblio B
   You should not be able to place a hold because there is no valid
   pickup locations
7. Enable AllowHoldPolicyOverride
8. Try to place a hold on biblio B
   You should now see all valid pickup locations in a dropdown list
   (with an exclamation mark in front of each option) with none selected
   by default
9. Verify you can place a title-level hold and an item-level hold

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35573: Revert "Bug 30687: Allow pickup location to be forced when override is...
Thibaud Guillot [Mon, 5 Feb 2024 11:59:06 +0000 (12:59 +0100)]
Bug 35573: Revert "Bug 30687: Allow pickup location to be forced when override is allowed"

This reverts commit ab93008da7eb61b697e4586c679b88c2eebaacd0.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36053: Correct input name for item replacement fields
Nick Clemens [Thu, 8 Feb 2024 20:27:14 +0000 (20:27 +0000)]
Bug 36053: Correct input name for item replacement fields

To test:
1 - Follow test plan and use sample record from bug 35912 ( or similar)
2 - Confirm that when the order is saved the replacement price is $0.00
3 - Apply patch, restart_all
4 - Delete previous orders, and stage and add to basket again
5 - Confirm that upon adding orders to basket the replacement price is saved correctly

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36349: Add tests
Jonathan Druart [Thu, 4 Apr 2024 10:30:47 +0000 (12:30 +0200)]
Bug 36349: Add tests

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36349: Remove passing CGI params from sco/printslip.pl
Jonathan Druart [Thu, 4 Apr 2024 08:23:18 +0000 (10:23 +0200)]
Bug 36349: Remove passing CGI params from sco/printslip.pl

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36349: Fix AutoSelfCheckAllowed
Jonathan Druart [Wed, 20 Mar 2024 09:08:16 +0000 (10:08 +0100)]
Bug 36349: Fix AutoSelfCheckAllowed

Move the check to C4::Auth.

Yes, it's not nice, I didn't expect to add exception to this code, and
it's adding more ugly code to get_template_and_user, but... Suggestions
welcome!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36349: Make sure CSRF token is included for all login scenarios
Nick Clemens [Mon, 18 Mar 2024 16:27:58 +0000 (16:27 +0000)]
Bug 36349: Make sure CSRF token is included for all login scenarios

To test:
1 - In KTD visit:
    http://localhost:8080/cgi-bin/koha/sci/sci-main.pl
2 - Everything should be set for auto self check user etc, just login
    as a patron
    If not (or not using KTD) setup a self check user, enable SCO and
    SCI, set self check patron system preferences, then login with
    patron
3 - 403 Error
4 - Repeat with sco:
    http://localhost:8080/cgi-bin/koha/sco/sco-main.pl
5 - Apply patch, restart all
6 - Try again, both should be successful

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35610: DBIC schema changes
Jonathan Druart [Fri, 5 Apr 2024 06:45:51 +0000 (08:45 +0200)]
Bug 35610: DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 months agoBug 35614: Update cpanfile for Mojolicious::Plugin::OpenAPI v5.09
Tomas Cohen Arazi [Wed, 20 Dec 2023 14:18:40 +0000 (11:18 -0300)]
Bug 35614: Update cpanfile for Mojolicious::Plugin::OpenAPI v5.09

This patch updates the following libraries, as required by Koha:

* Mojolicious::Plugin::OpenAPI
* JSON::Validator

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ sudo cpanm --installdeps .
=> SUCCESS: Dependencies updated correctly
3. Run:
  k$ prove -r t/db_dependent/api/v1/ \
              t/db_dependent/Koha/REST/
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36269: Elasticsearch: publisher-location (pl) should use260a/264a
Thomas Klausner [Thu, 7 Mar 2024 16:56:13 +0000 (17:56 +0100)]
Bug 36269: Elasticsearch: publisher-location (pl) should use260a/264a

Currently the index `pl` points to 008/15-17. It should
(additionally/instead?) point to 260a and/or 264a.

Test plan (for koha-testing-docker with ElasticSearch via `ktd --es7 up`)

Verify the old/broken behaviour:

* Go to Staff/Advanced Search
* Select "Publisher Location" and enter "cau", start search
* You will get some hits (~16), eg "Perl best practices / Damian Conway", which has 008 of "051222s2005 caua b 001 0 eng d" with "cau" on 15-17
* Edit this record (cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=5)
* Inspect 260$a, which should containt "Sebastopol, CA :"
* Go back to Advanced Search and search for  "Publisher Location" = "Sebastopol"
* No hits!

Apply the patch!

* exit ktd and stop it (ktd --es7 down; ktd --es7 stop)
* start it again
* Go to Staff / Administration / Search Engine Config (Elasticsearch)
* Click on the Tab "Bibliographic records" and search/filter for "pl"
* you should see 3 entries for "pl", with Mapping values of "008_/15-17", "260a" and "264a"
* Go to Search,
* Select "Publisher Location" and enter "cau", start search
* same hits as befor
* Search again, but for "Sebastopol"
* Now you'll get 9 hits!!

Bonus: Test 264a

* Got to Admin / MARC bibl framework, select BKS -> MARC structure
* search for tag "264", edit subfields
* in tabs a, b, c: Check the "Editor" Checkbox (Visibility)
* Save changes
* find a book, eg again "Perl best practices" and edit it
* find field 264 and enter "Test" into  264a, Save
* Depending on your setup, you might have to manually re-index the book:
  * enter ktd: ktd --shell
  * reindex the one book (via --bn) or all (might also need a -d)
    /usr/share/koha/bin/search_tools/rebuild_elasticsearch.pl -v -b -d
* Go again to Advanced Search, Publisher Location = "Test"
* You should find the book

If your NOT running ktd, you might be able to just edit the ElasticSearch Mappings to add / change the mapping for "pl" to point to "260a".

One rather harsh way to do this (which I needed to do, because the ES Mappings UI did not work for me) is via this SQL:
update search_marc_map set marc_field='260a' where marc_field='008_/15-17';

Sponsored-by: Steiermärkische Landesbibliothek
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>
2 months agoBug 35129: Return 400 if _per_page=0 passed
Tomas Cohen Arazi [Mon, 18 Mar 2024 15:49:20 +0000 (12:49 -0300)]
Bug 35129: Return 400 if _per_page=0 passed

This patch adds a safe guard for when consumers pass _per_page=0 to
endpoints. This condition is checked for on a centralized place and
avoid reaching the controller in such scenarios that would provoke a
division by zero exception.

To test:
1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/pagination.t
=> FAIL: We expect a 400, but get a 500 instead
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! No more explosions for this!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35129: Regression tests
Tomas Cohen Arazi [Mon, 18 Mar 2024 15:48:55 +0000 (12:48 -0300)]
Bug 35129: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36341: (QA follow-up) Use future inclusive on staff side too
Nick Clemens [Mon, 1 Apr 2024 17:33:52 +0000 (17:33 +0000)]
Bug 36341: (QA follow-up) Use future inclusive on staff side too

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36341: Add futureinclusive to future holds
Martin Renvoize [Mon, 18 Mar 2024 11:35:13 +0000 (11:35 +0000)]
Bug 36341: Add futureinclusive to future holds

This patch adds the flatpickr-futureinclusive data to the input field
for "Hold starts on date" in the OPAC.

We also add 'flatpickr-future' data to the input field for expiration
date as it also doesn't make sense to allow this to be a past data
either.

Test plan
1) Attempt to place a hold on an item from the OPAC
2) Expand the 'Show more options' dropdown
3) Note that without the patch 'Hold not needed after' allows setting to
   a date in the past.
4) Enable `AllowHoldDateInFuture` and `OPACAllowHoldDateInFuture` system
   preferences
5) The 'Hold starts on date' option should now appear if you refresh
   your hold placing page in the OPAC.
6) Note that the above input also allows setting a past date
7) Apply patch
8) Neith input should allow past dates now.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36432: Remove circular dependency from Koha::Object
Julian Maurice [Tue, 26 Mar 2024 15:19:41 +0000 (16:19 +0100)]
Bug 36432: Remove circular dependency from Koha::Object

Koha::Object depends on Koha::DateUtils, which depends on C4::Context,
which depends on Koha::Config::SysPref, which depends on... Koha::Object

Apart from the circular dependency, the dependency on C4::Context alone
is problematic as it loads a bunch of modules that are not needed at all
in Koha::Object (YAML::XS and ZOOM for instance).
As Koha::Object is used as a base for a lot of modules, we should take
care to only load the minimum required.

This patch moves some date parsing code to specific modules:
- Koha::DateTime::Format::RFC3339
- Koha::DateTime::Format::SQL

and it uses them in Koha::Object and Koha::DateUtils where it is
possible.

Test plan:
1. Do not apply the patch yet and run the following command:
   `perl -cw Koha/Object.pm`
   It should print several warnings about redefined subroutines, meaning
   there is a circular dependency.
2. Apply the patch
3. Run `perl -cw Koha/Object.pm`. It should only say:
   "Koha/Object.pm syntax OK"
4. Run the following command:
    prove \
        t/DateUtils.t \
        t/Koha/DateTime/Format/RFC3339.t \
        t/db_dependent/Koha/Object.t

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36394: Fix 'Filter' selection in new line
Nick Clemens [Mon, 1 Apr 2024 15:34:44 +0000 (15:34 +0000)]
Bug 36394: Fix 'Filter' selection in new line

All other fields in the new line use data-id instead of name, this fixes an inconsistency

To test:
1 - Before this patch select some values, set filter to punctuation - hit 'Add'
2 - Punctuation vlaue is cleared
3 - After patch add a new line and confirm 'Filter' value is saved

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36394: Fix footers behaviour on the ES mapping page
Jonathan Druart [Thu, 21 Mar 2024 13:16:23 +0000 (14:16 +0100)]
Bug 36394: Fix footers behaviour on the ES mapping page

In the footers of the tables of the search fields and mappings,
the options selected are not consistent.
Additionally they are not reset correctly when a new line is added.

Test plan:
0. Do not apply to recreate the problem
1. Go to the ES mapping page
2. Click tab "Bibliographic records"
3. At the bottom, notice the Yes/No dropdown lists
=> They are inconsistent, sometimes 'Yes', sometimes 'No'
4. Click Add
=> Values are kept

5. Apply this patch
6. Repeat 1, 2, 3
=> No (first option) is always selected
7. Click Add after you modified some values
=> "No" is selected

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36376: (QA follow-up) Tidy
Nick Clemens [Mon, 1 Apr 2024 12:53:01 +0000 (12:53 +0000)]
Bug 36376: (QA follow-up) Tidy

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36376: Display library limitations alert in patron's messages
Fridolin Somers [Wed, 20 Mar 2024 17:29:02 +0000 (18:29 +0100)]
Bug 36376: Display library limitations alert in patron's messages

Bug 31422 added a warning message when library limitations issue in patron edition page.
We should add this patron's messages in circ and details pages.
Like age limitations.

Test plan:
1) User's login branch and home library is: Centerville
2) Patron category "B - Board" is limited to Franklin
3) Edit a patron with Board category from Centerville
4) A message appears "The patron's current category (Board) is limited to other libraries."

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36461: Advanced editor should disable RequireJS timeout with waitSeconds: 0
Phil Ringnalda [Thu, 28 Mar 2024 22:02:38 +0000 (15:02 -0700)]
Bug 36461: Advanced editor should disable RequireJS timeout with waitSeconds: 0

We aren't actually doing any error handling with the RequireJS waitSeconds
config, just leaving the advanced editor hanging on loading if it times out,
so instead we should disable it.

Test plan:

1. Set the preference EnableAdvancedCatalogingEditor to Enable
2. Load the Cataloging module home page in Firefox and open Firefox's
   Web Developer Tools, and in the Network tab change from "No Throttling"
   to "Regular 2G"
3. In the Cataloging page, click Advanced editor, and watch it attempt to
   load for 30 seconds, followed by a setTimout error in the devtools console,
   and then wait as long as you can stand for anything but the "Loading,
   please wait..." to happen in the web page. Nothing ever will.
4. Apply the patch, restart, set EnableAdvancedCatalogingEditor back to
   Enable, turn throttling on, load the Advanced editor again, and note that
   even though it will take a minute or more to load through the throttling,
   the editor does actually load.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36421: Make sure pre-controller errors are correctly logged
Tomas Cohen Arazi [Wed, 27 Mar 2024 12:29:31 +0000 (12:29 +0000)]
Bug 36421: Make sure pre-controller errors are correctly logged

If something explodes in Koha::REST::V1::Auth chances are that no logging will happen.

This patch makes sure they are!

To test:
1. Make sure you do NOT have 36420 on your tree
2. Make sure you are looking at the logs:
   $ ktd --shell
  k$ koha-plack --restart kohadev; tail -f /var/log/koha/kohadev/*.log
3. Use Postman or similar for hitting some known endpoint. Use
   the user's cardnumber instead of the userid. On a default KTD launch, the
   generated user's cardnumber is '42'.
   GET /patrons
=> FAIL: You get a 500 error (expected, fixed on 36420) but no useful logging found.
4. Apply this patch
5. Ctrl+c on the logs and re-run the command
6. Repeat 3
=> SUCCESS: You get a 500, but you also get the exception information logged!
7. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[OK] prove t/db_dependent/api/v1/items.t t/db_dependent/api/v1/unhandled_exceptions.t
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36227: Remove item group option if there are no items
Lucas Gass [Wed, 6 Mar 2024 00:32:03 +0000 (00:32 +0000)]
Bug 36227: Remove item group option if there are no items

To test:
1. Test from OPAC. Any item group without items in it should not display as an option in the "Request specific item group:" dropdown

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36227: Add warning when item group has no holdable items
Lucas Gass [Wed, 6 Mar 2024 00:02:31 +0000 (00:02 +0000)]
Bug 36227: Add warning when item group has no holdable items

To test:
1. Enable EnableItemGroups and EnableItemGroupHolds
2. Find a bib and add an item group but do not attach any items to the item group.
3. Place a hold from the staff interface.
4. Under  Hold next available item from an item group you see the option for your item group, select it and place the hold.
5. It's a hold that can not be filled
6. APPLY PATCH
7. How on the hold page under  Hold next available item from an item group there is a 3rd column called 'Holdable items'.
8. Your item group, without any items, should have a disabled radio button and a warning "No holdable items in this item group."
9. Add items to your item group.
10. Now on the hold page in the new 'Holdable items' you should see links for each item, make sure those links work.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36294: Replace 'book' in system preference descriptions
Katrin Fischer [Sun, 17 Mar 2024 21:41:28 +0000 (21:41 +0000)]
Bug 36294: Replace 'book' in system preference descriptions

Some system preference descriptions have been updated in order
to replace "books" with items, checkouts or bibliographic records.

To test:

* Check system preference descriptions for following system
  preferences with and without the patch applied:
  * virtualshelves
  * AutoSwitchPatron
  * SyndeticsSeries
  * OPACFineNoRenewals
  * OpacRenewalAllowed
* If they read better than before, sign off :)

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36187: Corrected set data.patron_id in select_suggestor()
Lucas Gass [Fri, 1 Mar 2024 15:46:04 +0000 (15:46 +0000)]
Bug 36187: Corrected set data.patron_id in select_suggestor()

To test:
1. Make a new suggestion in the staff interface and attempt to set the "Created by" patron to someone other than the logged in user.
2. Submit the suggestion.
3. select suggestedby from suggestions where suggestionid = X; ( Where X is the suggestionid )
4. The value is NULL
5. On suggestion/suggestion.pl the "Suggested by" column is blank.
6. APPLY PATCH
7. Try 1 - 3 again. This time the suggestedby should be correctly set.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35610: DBRev 23.12.00.015
Katrin Fischer [Thu, 4 Apr 2024 12:51:41 +0000 (12:51 +0000)]
Bug 35610: DBRev 23.12.00.015

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35610: (QA follow-up): tidy up code
Victor Grousset/tuxayo [Wed, 27 Mar 2024 01:35:39 +0000 (02:35 +0100)]
Bug 35610: (QA follow-up): tidy up code

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35610: Set branchcode to NULL before adding the FK
Jonathan Druart [Mon, 25 Mar 2024 15:51:01 +0000 (16:51 +0100)]
Bug 35610: Set branchcode to NULL before adding the FK

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35610: Add FK on old_reserves.branchcode
Jonathan Druart [Wed, 20 Dec 2023 09:35:17 +0000 (10:35 +0100)]
Bug 35610: Add FK on old_reserves.branchcode

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36244: (follow-up) Remove atomicupdate
Katrin Fischer [Wed, 3 Apr 2024 16:13:38 +0000 (16:13 +0000)]
Bug 36244: (follow-up) Remove atomicupdate

Something went wrong on creating the DBRev. Cleaning up.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 24879: (follow-up) Fix test suite
Fridolin Somers [Wed, 27 Mar 2024 09:20:03 +0000 (10:20 +0100)]
Bug 24879: (follow-up) Fix test suite

Running cataloguing pluings (in cataloguing/value_builder) now requires
authentification.

This patch adds in failing unit tests a mock of C4::Auth::check_cookie_auth

Test with:
prove t/db_dependent/FrameworkPlugin.t t/db_dependent/Koha/UI/Form/Builder/Biblio.t t/db_dependent/Koha/UI/Form/Builder/Item.t t/db_dependent/Serials.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36323: Move koha_perl_deps.pl to misc/devel
Fridolin Somers [Mon, 18 Mar 2024 15:32:57 +0000 (16:32 +0100)]
Bug 36323: Move koha_perl_deps.pl to misc/devel

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 24879: Exclude koha_perl_deps.pl
Jonathan Druart [Fri, 15 Mar 2024 09:19:16 +0000 (10:19 +0100)]
Bug 24879: Exclude koha_perl_deps.pl

And tidy.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 24879: Use perl shebang to list the exec
Jonathan Druart [Thu, 14 Mar 2024 15:53:35 +0000 (16:53 +0100)]
Bug 24879: Use perl shebang to list the exec

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 24879: Add check_cookie_auth when missing
Jonathan Druart [Thu, 14 Mar 2024 15:19:06 +0000 (16:19 +0100)]
Bug 24879: Add check_cookie_auth when missing

This can certainly be improved to adjust the permissions, but at least
they are no longer opened to the world..

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 24879: Adjust tests
Jonathan Druart [Thu, 14 Mar 2024 15:17:55 +0000 (16:17 +0100)]
Bug 24879: Adjust tests

Installer scripts cannot be run from the UI:
debian/templates/apache-shared-intranet.conf:RewriteRule ^/cgi-bin/koha/(C4|debian|etc|installer/data|install_misc|Koha|misc|selenium|t|test|tmp|xt)/|\.PL$ /notfound [PT]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 24879: Remove installer/externalmodules.pl
Jonathan Druart [Thu, 14 Mar 2024 15:14:17 +0000 (16:14 +0100)]
Bug 24879: Remove installer/externalmodules.pl

It is not used, if we need it back it must be moved to misc.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 24879: Add new test to catch missing auth statement
Jonathan Druart [Tue, 17 Mar 2020 10:54:12 +0000 (11:54 +0100)]
Bug 24879: Add new test to catch missing auth statement

in intranet scripts

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36322: Redirect docs dir to 404
Jonathan Druart [Thu, 14 Mar 2024 15:42:08 +0000 (16:42 +0100)]
Bug 36322: Redirect docs dir to 404

http://localhost:8081/cgi-bin/koha/docs/CAS/CASProxy/examples/proxy_cas.pl

Test plan:
Hit the link
=> Erk
Copy the apache config to /etc/koha/apache-shared-intranet-git.conf
restart_all
Hit the link
=> 404

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35960: Use .val() instead of string concat to prevent potential XSS
Julian Maurice [Thu, 1 Feb 2024 08:15:23 +0000 (09:15 +0100)]
Bug 35960: Use .val() instead of string concat to prevent potential XSS

Test plan:
1. Log out
2. Go to /cgi-bin/koha/mainpage.pl#somestring"with<html>char
3. Open the brower's inspector and find "auth_forwarded_hash" input
4. Make sure the value attribute is there and corresponds to the URL's
   fragment. It should be URI-encoded.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36244: DBRev 23.12.00.014
Katrin Fischer [Wed, 3 Apr 2024 14:27:42 +0000 (14:27 +0000)]
Bug 36244: DBRev 23.12.00.014

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36244: Add atomic update to check for affected notices
Kyle M Hall [Thu, 7 Mar 2024 16:10:35 +0000 (11:10 -0500)]
Bug 36244: Add atomic update to check for affected notices

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Fixed some typos in bug numbers and text.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36244: Do template toolkit processing first
Andreas Jonsson [Thu, 7 Mar 2024 09:12:25 +0000 (09:12 +0000)]
Bug 36244: Do template toolkit processing first

To avoid injection of template toolkit code
from database fields that are controlled by
untrusted sources.

Test plan:

* review subtest 'Template toolkit syntax in
  parameters' in t/db_dependent/Letters.t
* Run the unit test:
  prove t/db_dependent/Letters.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36244: Unit test for tt syntax in parameters
Andreas Jonsson [Thu, 7 Mar 2024 09:07:49 +0000 (09:07 +0000)]
Bug 36244: Unit test for tt syntax in parameters

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36302: members-home.pl defers loading, member.pl does not
Pedro Amorim [Tue, 26 Mar 2024 12:29:09 +0000 (12:29 +0000)]
Bug 36302: members-home.pl defers loading, member.pl does not

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36302: Reinstate defer_loading
Pedro Amorim [Mon, 25 Mar 2024 17:14:01 +0000 (17:14 +0000)]
Bug 36302: Reinstate defer_loading

defer_loading is now a patron_search_js BLOCK param - default on

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36447: Circ rules slow to load when many itemtypes and categories
Kyle M Hall [Thu, 28 Mar 2024 14:55:05 +0000 (10:55 -0400)]
Bug 36447: Circ rules slow to load when many itemtypes and categories

It seems that we loop all categories and item types to build the circ
matrix. We should only loop over values that have actually been used
in circulation rules.

Test Plan:
1) Create 1000 itemtypes and category codes. You can use the following
   script:

   use t::lib::TestBuilder;
   my $builder = t::lib::TestBuilder->new();
   $builder->build( { source => 'Category' } ) for 0..1000;
   $builder->build( { source => 'Itemtype' } ) for 0..1000;

2) Note the lengthy load time for smart-rules.pl
3) Apply this patch
4) Restart all the things!
5) Reload the page
6) Note the much faster load time!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36159: (QA follow-up) Tidy code
Kyle M Hall [Fri, 29 Mar 2024 11:21:20 +0000 (07:21 -0400)]
Bug 36159: (QA follow-up) Tidy code

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36159: Add unit test
Kyle M Hall [Thu, 28 Mar 2024 10:36:25 +0000 (06:36 -0400)]
Bug 36159: Add unit test

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36159: (QA follow-up): Simplify code to supress warnings
Kyle M Hall [Thu, 28 Mar 2024 10:20:29 +0000 (06:20 -0400)]
Bug 36159: (QA follow-up): Simplify code to supress warnings

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36159: Patron imports record a change for non-text columns that are not in the...
Kyle M Hall [Fri, 1 Mar 2024 14:50:07 +0000 (09:50 -0500)]
Bug 36159: Patron imports record a change for non-text columns that are not in the import file

When importing patrons we assume a default of '' for borrower columns not supplied in the file.

When saving we compare the new object we built to the one form the database - for columns are that are not text type we get undef from the db and '' in the object we make. This means we see a difference and log into the BorrowersLog:

   "date_renewed" : {
      "after" : "",
      "before" : null
   },
   "dateofbirth" : {
      "after" : "",
      "before" : null
   },
   "debarred" : {
      "after" : "",
      "before" : null
   },
   "flags" : {
      "after" : "",
      "before" : null
   },
   "gonenoaddress" : {
      "after" : "",
      "before" : null
   },
   "lost" : {
      "after" : "",
      "before" : null
   },
   "password_expiration_date" : {
      "after" : "",
      "before" : null
   },
   "sms_provider_id" : {
      "after" : "",
      "before" : null
   }
}

This can mean a lot of useless logging in sites that do automated imports

Test Plan:
1) Enable 'BorrowersLog' system preference
2) Import the borrowers file attach do this bug report file, matchig on cardnuber, and overwriting
   Contents of the borrowers file are :
surname,firstname,branchcode,categorycode,cardnumber,dateenrolled,patron_attributes,lastseen
Acosta,Ednb,CPL,PT,23529001000463,02/01/2013,,
3) Check the logs, note the modification of columns that have no date
4) Import the file again with the same settings
5) Note the new action log
6) Apply this patch
7) Restart all the things!
8) Import the file again with the same settings
9) Note no new action log was created!

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36368: (QA follow-up) Remove unneeded line
Marcel de Rooy [Fri, 29 Mar 2024 08:23:57 +0000 (08:23 +0000)]
Bug 36368: (QA follow-up) Remove unneeded line

As Emmy stated on comment9, this line is indeed unneeded (and wrong).
A successful cud-insert/cud-save does not come here.
And it is set for add_form, edit_form and duplicate later on.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36368: Declare template param "op" after variable $op is set
Emmi Takkinen [Wed, 20 Mar 2024 13:33:21 +0000 (15:33 +0200)]
Bug 36368: Declare template param "op" after variable $op is set

If an error occurs while adding new patron, after fixing the error and
hitting save, patron entry page reloads to "Modify patron" section
and error "Patron not found. Return to search" is displayed. But no
patron is saved.

This happens because we declare template param op too early in the
code and it receives value "cud-insert" instead of "add_form" as it should.

To test:
1. Add new patron and cause an error (wrong age etc.).
2. Attempt to save patron, error message is displayed.
3. Fix your errors and attempt to save again.
=> Error message "Patron not found. Return to search" is displayed and new
patron is not saved to database.
4. Apply this patch.
5. Repeat steps from 1 to 3.
=> Saving patron should now work.
=> To be save, test if modifying patron also works as it should.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34886: Comment failing tests
Pedro Amorim [Fri, 9 Feb 2024 09:55:35 +0000 (08:55 -0100)]
Bug 34886: Comment failing tests

These tests highlight the fact that the 'place hold' button visibility in the
search results page **does not** match the 'place hold' button visibility in
the detail page, given the same conditions.
Since that this is a known behavior, these tests should be commented out as they
are failing by design.

prove t/db_dependent/selenium/opac_holds.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34886: (QA follow-up) chmod, remove POD
Marcel de Rooy [Fri, 22 Mar 2024 10:23:15 +0000 (10:23 +0000)]
Bug 34886: (QA follow-up) chmod, remove POD

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34886: Add selenium tests
Pedro Amorim [Thu, 1 Feb 2024 15:42:12 +0000 (14:42 -0100)]
Bug 34886: Add selenium tests

Tests added to cover different use cases and combinations of circulation rules values for authenticated and unauthenticated users
At the moment, 2 tests are failing, documented on the [DO NOT PUSH] commit.
These 2 failing tests fail for the search results page but pass on the detail page counterpart. Ideally they should match, for consistency sake.
But this may be the use case "details page should be more correct, results page is always an approximation" mentioned by Nick.

More test combinations may be added in the future.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34886: Adjust other opac detail scripts
Nick Clemens [Thu, 28 Sep 2023 13:14:54 +0000 (13:14 +0000)]
Bug 34886: Adjust other opac detail scripts

Same chanegs as before, but for MARC and ISBD details pages

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>
2 months agoBug 34886: Adjust holdability checks on opac details page
Nick Clemens [Thu, 28 Sep 2023 12:27:21 +0000 (12:27 +0000)]
Bug 34886: Adjust holdability checks on opac details page

This patch tries to simplify some of the logic here to match that on the search results. When we don't have a patron, we fallback to determining if an item can be held buy determining whether there are any items that don't have holds disallowed at the all libraries level. We also remove items with non-holdable statuses like withdrawn etc (and check some system preferences)

If we don't have a patron, then we are done, however, if we do, then we need to check each item against the policies related to that patron.

This patch also removes two checks at the end:
CountItemsIssued($biblionumber)
$biblio->has_items_waiting_or_intransit

These seem to be from bug 4319 - however, those rules are checked by IsAvailableForItemLevelRequest and are only relevant when we have a patron. These checks essentially assumed 'onshelfholds' policy of 'If any unavailable' For consistency sake I think we should follow the same logic as the results page.

To test:
1 - Find a record with two items, of different types, set a 'Default checkout, hold and return policy' of 'No holds allowed'
2 - Search opac, not logged in, and verify neither the results page or details page shows the place hold button
3 - Delete that rule, make both items withdrawn
4 - Search opac, not logged in, and verify neither the results page or details page shows the place hold button
5 - Mark one item as not withdrawn
6 - Search opac, not logged in, and verify both the results page or details page shows the place hold button
7 - Log in to opac
8 - Search opac, logged in, and verify both the results page or details page shows the place hold button
9 - Place an 'On shelf holds policy' rule for that patron category of 'If any unavailable'
10 - Search opac, logged in, and verify the results and details page shows the place hold button
11 - Set the other item to not withdrawn
12 - Search opac, logged in, and verify the results page shows the place hold button, but details does not
13 - Try various other scenarios - details page should be more correct, results page is always an approximation

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>
2 months agoBug 36418: opac/svc/club: switch content-type to application/json
Victor Grousset/tuxayo [Thu, 28 Mar 2024 17:53:16 +0000 (18:53 +0100)]
Bug 36418: opac/svc/club: switch content-type to application/json

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36418: Catch more cases where header response should be application/json
Lucas Gass [Thu, 28 Mar 2024 15:13:59 +0000 (15:13 +0000)]
Bug 36418: Catch more cases where header response should be application/json

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36418: Set header response content type to application/json - svc
Jonathan Druart [Tue, 26 Mar 2024 07:41:21 +0000 (08:41 +0100)]
Bug 36418: Set header response content type to application/json - svc

We need to set the content type to application/json for the svc scripts
returning json

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36418: Explicitly set response to json
Lucas Gass [Mon, 25 Mar 2024 16:30:51 +0000 (16:30 +0000)]
Bug 36418: Explicitly set response to json

To test:
1. Add some checkouts and load the issues-table
2. Select 'Check in' checkbox for that item and click "Check in selected items"
3. The row becomes read and reads "Unable to check in"
4. Reload the page, the item has actually checked in

5. Try the 'Renew' checkbox and click "Renew selected items"
6. It just spins and spins.
7. Reload the page, the item has actually renewed.
8. APPLY PATCH and restart_all
9. Try the steps again and this time everything should work properly.
10. tests these URLs
http://localhost:8081/cgi-bin/koha/svc/recall
http://localhost:8080/cgi-bin/koha/svc/club/enroll
http://localhost:8081/cgi-bin/koha/svc/mana/increment : empty response

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36302: Restore passing deferLoading to DT
Jonathan Druart [Wed, 27 Mar 2024 07:33:56 +0000 (08:33 +0100)]
Bug 36302: Restore passing deferLoading to DT

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35346: Update template logic to display 'Essential'
Martin Renvoize [Thu, 16 Nov 2023 13:20:58 +0000 (13:20 +0000)]
Bug 35346: Update template logic to display 'Essential'

This patch updates the cookie consent template logic to always display
the 'Accept essential cookies' button and only expose the 'Accept all
cookies' button when there are additional cookies to accept, i.e. when
JSConsents is populated.

Test plan
1) Enable CookieConsent
2) Note you see 'Accept essential cookies' in both OPAC and Staff client
   until you have accepted them
3) Add a cookie to ConsentJS
4) Note that you will now see 'Accept all cookies' as well as the 'Accept
   essential cookies' button.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35347: (QA follow-up): swap "essential" and "all" for OPAC too
Victor Grousset/tuxayo [Sun, 11 Feb 2024 05:34:53 +0000 (06:34 +0100)]
Bug 35347: (QA follow-up): swap "essential" and "all" for OPAC too

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35347: Display 'More information' button regardless of JSConsents
Martin Renvoize [Thu, 16 Nov 2023 13:14:39 +0000 (13:14 +0000)]
Bug 35347: Display 'More information' button regardless of JSConsents

This patch moves the "More informatin" button outside of the JSConsents
block so that you are able to access the information modal regardless of
whether you have tracking cookies added to your configuration or not.

Test plan
1) Enable CookieConsent
2) Note that the 'More information' button now appears in the footer on
   both staff and opac until you have accepted cookies.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34793: (QA follow-up): forgotten 'Cookie consents'=>'Cookies policy'
Victor Grousset/tuxayo [Sun, 11 Feb 2024 06:41:01 +0000 (07:41 +0100)]
Bug 34793: (QA follow-up): forgotten 'Cookie consents'=>'Cookies policy'

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34793: (follow-up) Add table classes to popup
Martin Renvoize [Mon, 20 Nov 2023 08:00:10 +0000 (08:00 +0000)]
Bug 34793: (follow-up) Add table classes to popup

This patch adds the appropriate table classes to the Popup html
customisation block. This ensure we have proper table display formatting
in the modal on the OPAC.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34793: (follow-up) Rename 'Cookie consents' to 'Cookies policy'
Aude Charillon [Fri, 17 Nov 2023 15:35:58 +0000 (15:35 +0000)]
Bug 34793: (follow-up) Rename 'Cookie consents' to 'Cookies policy'

The modal is not always about consent, but rather about displaying the
libraries cookie policy. It makes sense to update the heading to reflect
that.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34793: Add default HTML Customisations for cookie information
Aude Charillon [Fri, 17 Nov 2023 15:30:22 +0000 (15:30 +0000)]
Bug 34793: Add default HTML Customisations for cookie information

This patch adds some default html customisation content for the cookie
consent feature.

Test plan
1) Run through the installer and pick to import the sample news items
2) Confirm that after enabling the CookieConsent preference that the
   default content appears in the cookie bar at the bottom of the page
   and in the modal that appears after clicking 'More information'

Mentored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35882: (QA follow-up) Fix wrapper parameter (panelgroup_id)
Julian Maurice [Tue, 26 Mar 2024 08:38:10 +0000 (09:38 +0100)]
Bug 35882: (QA follow-up) Fix wrapper parameter (panelgroup_id)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35882: Use template wrapper for accordions: Notices
Owen Leonard [Tue, 23 Jan 2024 19:32:03 +0000 (19:32 +0000)]
Bug 35882: Use template wrapper for accordions: Notices

This patch updates the notices template so that Bootstrap
accordion markup for the notice edit view is generated by WRAPPERs.

To test, apply the patch and go to Tools -> Notices.

- Edit any notice.
- The list of message transport types (Email, Print, SMS) should be
  displayed as before: Collapsible panels where clicking the transport
  type heading expands the corresponding information.
- Confirm that changes to notices are correctly saved.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35883: Use template wrapper for accordions: Table settings administration
Owen Leonard [Tue, 23 Jan 2024 19:33:33 +0000 (19:33 +0000)]
Bug 35883: Use template wrapper for accordions: Table settings administration

This patch updates the table settings administration page so that
Bootstrap accordion markup is generated by WRAPPERs.

This patch also makes some changes to fix the automatic scroll when a
table configuration button was clicked.

To test, apply the patch and go to Administration -> Table settings.

- The list of modules should be displayed as before: Collapsible panels
  where clicking the module name heading expands the corresponding
  panel of settings.
- Test that direct links to configurable tables still work correctly:
  - Go to Administration -> Libraries.
  - Click the "Configure" button at the top of the table of libraries.
  - You should be taken to the table settings page.
    - The "Administration" panel should be expanded by default.
    - You should be scrolled down automatically to the "Libraries"
      table.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35880: Use template wrapper for accordions: Patrons requesting modifications
Owen Leonard [Tue, 23 Jan 2024 19:22:12 +0000 (19:22 +0000)]
Bug 35880: Use template wrapper for accordions: Patrons requesting modifications

This patch updates the patrons requesting modification page so that
Bootstrap accordion markup is generated by WRAPPERs.

To test, apply the patch and make sure you have the OPACPatronDetails
system preference enabled.

- Create at least two different patron modification requests:
  - Log in to the OPAC using two different patron accounts, each time
    following the sidebar link for "Personal details."
  - Make some changes to the patron records and submit them.
- In the staff interface, from the home page, click the "Patrons
  requesting modifications" link.
- You should see the list of updates in the same format as before:
  Collapsible panels where clicking the patron name heading expands the
  corresponding information.
- View the detail or checkout page for one of your updated patrons.
  - Click the "Review pending modifications" link.
  - The modifications page should open with that patron's information
    exapanded.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35877: (follow-up) Correct accordion wrapper parameter name
Owen Leonard [Fri, 22 Mar 2024 16:13:34 +0000 (16:13 +0000)]
Bug 35877: (follow-up) Correct accordion wrapper parameter name

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>