Commit graph

49945 commits

Author SHA1 Message Date
64077f45fc Bug 34445: Set default budget in addorderiso2709.pl
This patch allows the default budget to be used as a fallback if no budget is selected. Currently the default budget is set using lines 129-133 but then is never used.

QA follow-up:
- perl tidied
- budget_codes changed to budget_ids for consistency

Test plan:
1) Apply patch
2) restart_all
3) Follow the steps from the bug description
4) Order lines should be added properly

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Rearranged comments
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b3427f71ae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 216542e4a6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:46:33 +00:00
Laura Escamilla
cc105e01ac Bug 34340: Changed "Tendered" to the correct input id which is "Collected"
Must also apply bug 34332 - fixed a syntax error for the pos email template

To test:
1. Configure your Koha to enable the point of sale system (i.e. enable syspref,
   set up a register, set up an item to sell).
2. Complete a transaction in the POS system.
3. Click on the “Email receipt” button next to the “Print receipt” option and
   enter an email address and confirm that the email is sent.
4. Check the “Tendered” field. It is showing up as 0.00 and not reflecting the
   actual amount that was tendered.
5. Apply patch
6. Repeat steps 2 & 3
7. The emailed receipt is now showing the correct tendered amount.
8. Sign off!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f2ecb1e9be)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3dea2272e5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:36:52 +00:00
c31d976174 Bug 30362: Fix GetSoonestRenewDate to really return soonest renew date
This change fixes GetSoonestRenewDate so that it returns the soonest
renew date as calculated using "No Renewal Before" and "NoRenewalBeforePrecision".
In the past, it would only return the soonest renew date if "$now" was
lesser than it, which would typically only happen when using an "exact"
precision rather than a "date" precision.

Test plan:
0. Apply the patch
1. prove t/db_dependent/Circulation.t

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f8c474019d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8fc3531e07)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:36:51 +00:00
4e90014d79 Bug 30362: Fix unit test
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 95aa1c3da5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b0fa0150b8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:36:51 +00:00
038e88a4bd Bug 30362: Unit test
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 145788398a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a419589998)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:36:50 +00:00
eae39cc26f Bug 34567: Correct colors for advanced cataloging editor status bar
This patch updates the advanced cataloging editor CSS so that the
"status bar" footer below the editor has colors consistent with the
staff interface redesign.

To test, apply the patch and clear your browser cache if necessary.

- Enable the EnableAdvancedCatalogingEditor preference if necessary.
- Go to Cataloging -> Advanced editor.
- At the bottom of the screen below the editor the "status bar" should
  have a green border that matches color in the header search bar.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3ed9168315)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8e473cb69a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:36:50 +00:00
e75c29a01c Bug 34601: [22.11.x]Fix edit/delete links on suggestion.tt
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:36:50 +00:00
46bc558c8e Bug 34627: CMS pages do not correctly display the opaccredits footer
This patch corrects the page structure of CMS pages in the OPAC so that
the contents of the footer, including opaccredits, OpacKohaUrl, and the
language selection bar, are displayed correctly.

This patch contains indentation changes, so ignore whitespace when
viewing the diff.

To test you should have these settings:

- OpacKohaUrl enabled in system preferences
- Some content in the opaccredits HTML customization region
- Some content in the OpacNav HTML customization region
- At least one translation installed and enabled
- The opaclanguagesdisplay preference enabled
- The OpacLangSelectorMode set to "only footer" or "both top and footer"

- Apply the patch and go to Tools -> Pages and create a page with the
  display location "OPAC."
- Open the OPAC link for your newly-created page and confirm that the
  page looks correct:
  - The "main" region with the white background should contain the
    breadcrumb navigation, the sidebar OpacNav content, and the contents
    of your CMS page.
  - The opaccredits and OpacKohaUrl content should appear below that
    region.
  - The language selection footer should be at the bottom of the page.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d5dc65867)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0b12a5fa84)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:36:49 +00:00
ff6cb81dbe Bug 34505: Patron invalid age in search_for_data_inconsistencies.pl skip expired patrons
Bug 26311 added patron invalid age in search_for_data_inconsistencies.pl
But this is not relevant for expired patrons, especially in child categories.
Check should skip expired patrons

1) Set a non-expired patron with invalid age
2) Run misc/maintenance/search_for_data_inconsistencies.pl
=> Check you see the patron
3) Edit patron to be expired
4) Run misc/maintenance/search_for_data_inconsistencies.pl
=> Check you do not see the patron

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] If we do not want to test valid age for expired patrons, you should
obviously test expired first. Reversing the order in the test.
Putting it in the search criteria would be nicer but leads to more
complicated code.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c26dff61e7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 22674a7ddf)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:54 +00:00
722ce8a403 Bug 34356: Make sort order always default to correct column
To test:
1- Check out an item to a patron
2- View checkout history, default sort is on 'Date due'
3- Enable RecordStaffUserOnCheckout
4- View checkout history, default sort is on 'Checked out by'
5- Apply patch
6- Table should sort to 'Date due' no matter what the sys pref is set to

Signed-off-by: Jason <jrobb@sekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit edad82662c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 80cc0c03aa)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:53 +00:00
63337f2c52 Bug 34386: Fix inconsistencies in Cities and tows page titles, breadcrumbs, and header
This patch updates the cities administration page so that page title,
breadcrumb navigation, and headings are consistent with each other and
with other parts of Koha.

To test, apply the patch and go to Administration -> Cities and towns.
Check each variation of the page to confirm that page title, breadcrumb
navigation, and heading are correct.

- Main page (listing cities)
- New city
- Edit city
- Delete city

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8460158f6b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2fb195eedf)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:53 +00:00
c6559d89cf Bug 34379: Fix label of new library group button
This patch corrects the label on the button for creating a new library
group, changing it from "Add group" to "New group" for consistency.

To test, apply the patch and go to Administration -> Library groups.
Confirm that the button is now labeled "New group" and that it
still works to trigger the library group creation modal.

Signed-off-by: Andrew <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 879f7db9e8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e67e3bdf73)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:53 +00:00
fe5aed4597 Bug 34385: Correct page heading of transport cost matrix page
This patch corrects the main heading on the transport cost matrix page
so that it matches the page title and breadcrumb navigation.

To test, apply the patch and go to Administration -> Transport cost
matrix. Confirm that the page heading reads "Transport cost matrix."

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c7daaa901b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9c54bee813)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:52 +00:00
0b6456b8f8 Bug 25023: Claims returned dates not formatted according to dateformat preference
This patch updates the code for rendering the claims returned table on
the checkout and patron detail pages. Now the dates are formatted using
the global js-date-format.inc code.

To test, apply the patch and make sure the claims returned feature is
enabled by setting a value in the ClaimReturnedLostValue system
preference.

- Check out some items to a patron.
- Under the checkouts tab, mark several checkouts as "Claim returned."
- Open the claims tab.
- The dates in the "Created on" column should be formatted according to
  your dateformat system preference.
  - Change the dateformat preference and return to the checkouts page.
    Confirm that the claims tab shows dates formatted correctly.
- The "created on" and "updated on" columns should sort correctly with
  any dateformat setting. You may have to directly modify the dates in
  the database in order to have the right data for testing this.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1156b3683b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b72c5e9465)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:51 +00:00
519de43634 Bug 34219: Allow getAll to receive additional URL parameters
It's not possible to pass additional URL parameters. We need it at least for bug 32474.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f1078daf8f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6f9dd5e449)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:51 +00:00
6ae9e92b89 Bug 34331: Use register from userenv if parameter not passed
To recreate:
1. Enable the "EnablePointofSale" syspref.
2. Set the "UseCashRegisters" syspref to use.
3. Create 3 new registers (Register A, B and C) with a float amount of $25.
4. Under POS, configure 3 new debit types (i.e. Copies, Earbuds, Friends Donation)
-- You can leave the default amounts blank, or add an amount if desired.
-- Set "Can be manually invoiced?" and "Can be sold?"
5. Under point of sale make a $5 sale of copies under Register A.
6. Under point of sale make a $10 sale of earbuds under Register B.
7. Under point of sale make a $100 sale of Friends Donation under Register C.
8. At circ/set-library.pl set your register to Register A.
9. Go back to POS and view the "Transaction history for Register A" - it shows the correct amount of $5 sold in copies.
10. Go back to circ/set-library.pl and change your register to Register B.
11. Go back to POS and view the "Transaction history for Register B" - it shows the incorrect transaction history. It is showing the transaction history for Register A.
12. Go back to circ/set-library.pl and change your register to Register C.
13. Go back to POS and view the "Transaction history for Register C" - it shows the incorrect transaction history. It is showing the transaction history for Register A.
14. Apply patch, repeat. The correct transactions should now show.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bd28eae578)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8103059faf)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:50 +00:00
285e2a73d6 Bug 34341: Revert Bug 34072: Holds queue search interface hidden on small screens
This patch undoes the changes made by 34072 because they have had a more
far-reaching effect than was expected. I have never been able to
reproduce Bug 34072 before the patch.

To test, apply the patch and rebuild the staff interface CSS.

- Go to Circulation -> Holds queue
- Try adjusting the width of the browser window to confirm that it is
  responsive at various widths.
- When the viewport width is below 768 the page layout will adjust, and
  the contents of the sidebar will drop below the table of holds. This
  is consistent with other pages in the staff interface.
- Check that the corrected CSS has resulted in a correction to the
  layout of submit buttons in forms:
  - For example, in Administration -> Cities and towns -> New city.
  - Before the patch there was no padding between the submit button and
    the white fieldset containing the form fields.
  - After the patch the correct padding has been restored.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8d78ba7ff2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a6e5504aff)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:11:32 +00:00
021e03d8f0 Bug 34533: jsdiff library missing from guided reports page
This patch restores the inclusion of the jsdiff JS library on the guided
reports page when displaying saved SQL reports. This fixes a JS error in
the browser console when the user tries to use our automatic update on
SQL reports which use an older syntax.

The patch also corrects a problem with svc/convert_report which was
causing an error when trying to display the diff information.

To test, apply the patch and restart services.

- Go to Reports -> Create from SQL.
- Add a report which is based on an older db structure. The example I
  found was:

  SELECT biblionumber,
  ExtractValue(marcxml,'//datafield/@tag/text()[substring(.,1,1) = "5"]') as 'notes'
  FROM biblioitems
  HAVING notes <> ''

- Save the report and go to the list of saved reports. There should be
  an "Update" column in the table, with a message about your newly-added
  report:

  "This report seems obsolete, it uses biblioitems.marcxml field."

- Clicking the "Update SQL" button should trigger a modal window that
  shows the before an after versions of the report. There should be
  no error in the browser console. Unfortunately the diff will not
  display because of a separate bug in svc/convert_report

Signed.off-by: Jessie Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f2be2cedc5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 13bc2848a1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:11:32 +00:00
4b88e53ffc Bug 34565: Label mismatch in MARC21 006 and 008 cataloging plugins
This patch modifies the JS which builds the table of options for
populating MARC21 fields 006 and 008 when using the cataloging plugin.

To test, apply the patch and go to Cataloging -> New record.

- Click the plugin trigger link next to the 006 input field (you may
  need to click the tag to expand it.
- In the table of input fields, test that clicking the label, e.g. "Type
  of material", "00 - Form of material," etc,  moves focus to the
  corresponding form field.
- Perform the same test on the plugin-popup for field 008.

Signed-off-by: Andrew <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fb48155cc4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ae8937fb8d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:11:32 +00:00
Andreas Roussos
21f76d8340 Bug 29578: Upgrade the jQuery highlighter plugin
Under certain conditions, the jQuery term highlighter
can break and in the process make the "Highlight" /
"Unhighlight" button disappear altogether. This affects
catalog searches in both the OPAC and the Staff Client,
with UNIMARC-based instances affected the most as the
"Highlight" / "Unhighlight" button disappears if you
perform a specific OPAC search (see Test plan below).

This patch fixes that by upgrading the highlighter
plugin to its latest version for both the OPAC and
the Staff interface. Then, the changes from commit
2e4b574074 (Bug 5844) are applied to the plugin code.
Also, Koha uses "term" instead of "highlight" as the
class name for the <span> highlighting elements, so
the plugin code is modified for that aspect, too.
Finally, the plugin file is renamed to reflect the
version change (v3 -> v5) and all references to the
old filename in the Template files are updated.

Test plan:

0) In a UNIMARC instance, catalogue two books using
   the titles given below (Title subfield = 200$a):

   Book 1: Συλλογής των εν επιτομή τοῖς πάλαι γεωγραφηθέντων
   Book 2: Επιτομή της ιστορίας των Βαλκανικών Πολέμων (1912-1913)

1) OpacHighlightedWords and StaffHighlightedWords
   should both be set to "Highlight".

2) Search the OPAC for "επιτομή των" (without the
   quotes). In the results page, notice that:

   a) You get an Uncaught DOMException error in the
      web browswer's JavaScript Console (press F12):
      "Failed to execute 'splitText' on 'Text': The
      offset 3 is larger than the Text node's length."
   b) the "Highlight" / "Unhighlight" button vanishes
   c) some search terms matches are not highlighted
      (for example "των" in the 2nd Book)

3) Repeat the same search in the Staff interface.
   In the results page, notice that:

   a) You get an Uncaught DOMException error in the
      web browswer's JavaScript Console (press F12):
      "Failed to execute 'splitText' on 'Text': The
      offset 3 is larger than the Text node's length."
   b) Even though some terms are highlighted, the
      button still says "Highlight"
   c) some search terms matches are not highlighted
      (for example "των" in the 2nd Book)

4) Apply this patch.

5) Repeat the searches (you may have to press CTRL-F5
   to reload the JavaScript code). This time the
   "Highlight" / "Unhighlight" button is displayed
   in the OPAC, and all your search terms should be
   highlighted in yellow. Toggling the highlight
   should cause no problems, and there shouldn't be
   any errors logged in your browser's Console.

Signed-off-by: Christian Nelson <christian.nelson@uwasa.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bee56606a6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f98e4faee2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:11:31 +00:00
Kevin Carnes
c3dd4d8e32 Bug 27496: Accessibility: Navigation buttons are poorly described by screen readers
This patch adds aria-haspopup and aria-expanded attributes to the language
    and welcome user buttons so that screen readers will know that they cause a
    popup menu to be displayed.

    To test:
    1. Use an installation with at least 2 active languages
    2. Log in the OPAC
    3. Use a screen reader (e.g. ChromeVox in Chrome) and use the tab key to
       navigate to the language and welcome user buttons while noticing that
       they are described as "Button collapsed" and "Button", respectively
    4. Alternatively, inspect the buttons and notice that they are missing
       aria-haspopup and aria-expanded attributes
    5. Apply the patch
    6. Observe that these buttons now are described as "Popup button collapsed"
       or that they contain the aria-haspopup and aria-expanded attributes like
       the lists button
    7. Sign off

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e0007bf362)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c3c0f9eb12)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:11:31 +00:00
99c091f423 Bug 34509: Use select2 to load vendors on basket creation
This patch moves the dropdown to use select2 and avoids loading all
vendors at page load.

To test:
 1 - Create some extra vendors in your system, ideally over 20
 2 - Search for a vendor in acquisitions
 3 - Click 'New->basket'
 4 - Note the dropdown of all vendors
 5 - Choose a vendor and create a basket
 6 - Apply patch
 7 - Repeat
 8 - Note only a partial list of vendors is loaded
 9 - Search in the dropdown and confirm vendors are returned
10 - Select a vendor and create the basket

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 77ee1ca743)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f9cd9cca6a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:11:30 +00:00
c37d1877b2 Bug 34434: Terminology: Biblio should be bibliographic
This patch corrects several more instances where the templates use the
term "biblio" where it should use "bibliographic."

To test, apply the patch and confirm that these instances read
correctly:

- About -> Special thanks... -> Mines Paristech: "bibliographic
  frameworks"
- Acquisitions -> Vendor -> Receive shipments: "Record count" in the
  table of shipments.
- Catalogue -> Bibliographic record details -> Labeled MARC: "Labeled
  MARC record" heading.
- Circulation -> Holds to pull: Error message, "hold has been placed at
  the bibliographic record level."
  * I'm not sure how one can trigger this error message.
- Tools -> Log viewer -> Filter by "Catalog" and "Add": "Bibliographic
  record..." link in the "Object" column.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5749df1e3a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 25cead0d67)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 09:46:43 +00:00
Katrin Fischer
5c35ace5c4 Bug 34436: (QA follow-up) Move spans to surround full text
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ad41643d5a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a2ee4312cb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 09:46:42 +00:00
26740cc57d Bug 34436: Some breadcrumbs lack <span> for translatability
This patch modifies several templates which were updated recently so
that breadcrumbs markup could be built using template wrappers. The
patch wraps strings in <span> in cases where it is necessary to make
them translatable.

To test, apply the patch and view the following pages to confirm that
the breadcrumbs still show up correctly:

- Administration -> MARC bibliographic framework
  - Add framework
  - Edit framework
  - Delete framework
- Administration -> Share content with Mana KB
- Administration -> Circulation and fine rules
- Authorities ->
  - Add authority
  - Edit authority
- Catalog -> Advanced search
  - Bibliographic detail page
    - Must have EasyAnalyticalRecords enabled.
    - Edit -> Link to host record
- Patrons
- Reports -> Average loan time
- Serials -> Serials home

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8933036742)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit edaf57c73e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 09:46:42 +00:00
Katrin Fischer
8c0c469215 Bug 34345: (QA follow-up) Fix some more occurrences
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 19f9240759)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 876e970f4e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 09:46:41 +00:00
9c1594d05f Bug 34345: 'Circulation and fine rules' vs 'Circulation and fines rules'
This patch corrects two instances of the phrase "Circulation and fines
rules" in favor of the more common "Circulation and fine rules" for
consistency's sake.

To test, apply the patch and go to Administration.

- In the description under the "Circulation and fine rules" link it
  should read, "Define circulation and fine rules..."
- Open the Circulation and fine rules page and confirm that the link in
  the sidebar menu is correct.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 452ac93b92)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5c878a6430)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 09:46:41 +00:00
0ba308d463 Update release notes for 22.11.09 release
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-28 13:11:38 +00:00
8aceeb4a2b Increment version for 22.11.09 release
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-28 13:01:15 +00:00
abb2143205 Fix translations for Koha 22.11.09
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-28 12:48:17 +00:00
Koha translators
0f279cce8f Translation updates for Koha 22.11.09
(cherry picked from commit 1a9b57e55848827d647dbb0e9095d64845ce01c7)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-28 12:25:27 +00:00
0f05cc4395 Bug 34024: (QA follow-up) Allow pickup location changing for in transit holds
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a05dff84eb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7293368dfe)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-28 10:21:17 +00:00
c1a0603de1 Bug 34024: Unit tests
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3870b5a068)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 918c6ddb05)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-28 10:21:10 +00:00
c46aa8af33 Bug 34024: Block changing pickup location for found holds
This patch adds a check on holds for 'found' statuses. Holds with the
following statuses have special workflows in Koha, and overwritting
their pickup locations yields uncertain scenarios:

* Waiting: the item has probably been put on a special shelve
* In transit: the item is travelling to a new destination, and changing
  the pickup location should include some validations, and probably
  generate some notifications. At least.
* In processing: the item has already been taken out of the shelve for
  some internal processing. Changing the pickup location could interfere
  with this workflow. Overriding this limitation could be introduced
  with care on a separate report.

To test:
1. Apply the unit tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests don't pass. Holds go through (200) instead of being
rejected (409).
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a1b5bd9534)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6b2b54151f)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-28 10:20:34 +00:00
9ed11360d6 Bug 34193: SSLProtocol enable in use versions and disable deprecated versions
This patch changes the default SSLProtocol for the Let's Encrypt
HTTPS template, so that it enables in use versions of TLS while
disabling the deprecated versions of TLS.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 58893f4c0b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 79be336eee)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-28 10:20:05 +00:00
Hammat Wele
9184e2e734 Bug 30846: (follow-up) Unit tests
Signed-off-by: Sam Lau <samalau@gmail.com>

Bug 30846: (Fix) Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 13d3e87503)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f5f4f80977)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-28 10:18:24 +00:00
Hammat Wele
5b5b661cc7 Bug 30846: 'If any unavailable' doesn't consider negative notforlan values as unavailable
When we set up a circulation rule where 'On shelf holds allowed' is 'If any unavailable' and we have a record with one 'Ordered' item, we cannot place this item on hold.

This patch allows placing hold on item with negative not for loan values, when using rule with 'On shelf holds allowed' set to 'If any unavailable'

To test:

1. Set up a circulation rule where on shelf holds are not allowed and force the choosing of an item (to facilitate the test)
    1.1. Go to Administration > Circulation and fines rules
    1.2. In the matrix, add a circulation like this
          - Patron category: All
          - Item type: Books
          - Current checkouts allowed: 10
          - Current on-site checkouts allowed: 10
          - Loan period: 21
          - Holds allowed (total): 10
          - Holds allowed (daily): 10
          - Holds per record (count): 10
          - On shelf holds allowed: If any unavailable
          - OPAC item level holds: Force
    1.3. Click Save
2. Create a record with one 'Ordered' item (or any negative value not for loan status)
    2.1. Go to Cataloging
    2.2. Click New record
    2.3. Fill out the mandatory fields (by default in MARC21: 000, 003, 005, 008,  040, 245, and 942 (942 should be set to Books))
    2.4. Click Save
    2.5. Fill out the following item fields
          - Not for loan: Ordered
          - Koha item type: Books
    2.6. Click Add item
    2.7. Click Normal to go to the detailed record
3. Try to place a hold on the 'Ordered' item
    3.1. From the detailed record, click OPAC view: Open in new window.
    --> Note that the 'Place hold' option is not present
4. Add a second 'Available' item
    4.1. Back in the staff interface tab with the detailed record, click New > New item
    4.2. Make sure the item type is set to Books
    4.3. Add a barcode in p
    4.4. Click Add item
5. Try again to place a hold on the 'Ordered' item
    5.1. Go back to the OPAC tab and refresh the page
    --> Note that the 'Place hold' option is still not present
6. Check out the available item to a patron
    6.1. In the staff interface tab, copy the barcode from the available item
    6.2. Go to Patrons
    6.3. Click on Search
    6.4. Click Check out next to one of the patrons
    6.5. Paste the barcode in the box and click Check out
7. Try again to place a hold on the 'Ordered' item
    7.1. Go back to the OPAC tab and refresh the page
    --> Note that the 'Place hold' option is now present
    7.2. Click Place hold
    --> Note that only the checked out item is available to place on hold, if you click Show unholdable items, it will show the Ordered item, but you can't place a hold on it.
8. Apply the patch
9. Go to the OPAC tab and click on the book title right next to 'Place a hold on' checkbox to go back to the record details.
        --> Note that the 'Place hold' option is still present
        9.1. Click Place hold
        --> Note that you can now place a hold on the 'Checked out' or the 'Ordered' item.
10. Check in the item to make it available again
    10.1. In the staff interface tab, click on 'Show checkouts' button
    10.2. Select the Checked out item and click on 'Renew or check in selected items' button.
11. Try again to place a hold on the 'Ordered' item
    11.1. Go back to the OPAC tab and click on the book title right next to 'Place a hold on' checkbox to go back to the record details.
    --> Note that the 'Place hold' option is still present
    11.2. Click Place hold
    --> Note that only the 'Ordered' item is available to place on hold, if you click Show unholdable items, it will show the Available item and you can't place a hold on it.
12. Delete the available item to keep only the Ordered item
    12.1 in the staff interface tab, click on 'Search catalog' and search for the record
    12.2 click on 'Edit' then 'Edit items'
    12.3 Delete the available item
13. Try to place a hold on the remain 'Ordered' item
    13.1 Go back to the OPAC tab and click on the book title right next to 'Place a hold on' checkbox to go back to the record details.
        --> Note that the 'Place hold' option is present
    13.2. Click Place hold
    --> Note that you can place a hold on the Ordered item.

Signed-off-by: Amaury GAU <amaury.gau@bulac.fr>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a09a926458)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e1d7b41822)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-28 10:17:10 +00:00
3e780ee820 Bug 34289: Add missing class to one condition of the checkin template
The markup of the checkin template varies depending on the conditions of
the operation, and in one case the barcode field was missing the
"barcode" class. This patch adds it.

To test, apply the patch and make sure the finesMode system preference
is enabled.

- Go to returns.pl (/cgi-bin/koha/circ/returns.pl)
- Expand the the options so you see 'Forgive overdue charges'.
- Check that box and check in an item
- After checkin, the barcode field should keep the same style it had
  before the transaction.
- Note: The yellow background of the input when the "Forgive" checkbox
  is checked is to be expected.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4ff9099700)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b88ae2f5d7)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-28 10:08:12 +00:00
a35a226306 Bug 32739: (follow-up) QA Cleanup
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3c90dbcb82)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-28 10:07:15 +00:00
803f435196 Bug 32739: Allow other patron identifier on pwd validation
This patch takes a step forward on the password validation endpoint, by
adding  the `identifier` parameter and making it be allowed
to be the patron's `cardnumber` or the `userid`.

The current `userid` only validation option is kept as-is.

The implementation relies on `C4::Auth::checkpw` to query for the
patron.

To test:
1. Apply this patches
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/password_validation.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 69653a281d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-28 10:07:15 +00:00
b7cc42789d Bug 32739: Unit tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 419d1d4fe9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-28 10:07:15 +00:00
6f7fbad69f Bug 30451: DBRev 22.11.08.002
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bff8349045)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-18 14:21:11 +00:00
bea91f15ef Bug 30451: Update FK constraint on aqorders.subscriptionid
This updates the FK constrant from ON DELETE CASCADE to ON DELETE
SET NULL. This means that if a subscription linked to an order is
deleted, we no longer will also delete the order, but we will just
set subscrptinid in the order to NULL. This will avoid data loss
that can cause the budgets/funds not to add up anymore with the
real espenses of the library.

To test:

Preparation:
* Create 2 subscriptions on different records
* Create a new basket
* Use the "order from subscription" functionality to create order
  lines for both of your subscriptions
* Close basket

Without patch:
* Delete the first subscription
* Verify the order line for this subscription is gone from your basket

Apply patch:
* Run database update and restart_all
* Delete the second subscription
* Verify the order line now remained in the basket

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>

JD amended patch: perl tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 765d3d85b5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 43c55cad8a)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-18 14:19:49 +00:00
bbec4a2513 Bug 34343: Update style of fixed footer navbar in Z39.50 searches
We use a Bootstrap fixed navbar in the footer of two pages: the popup
Z39.50 searches in cataloging and authorities. The style of these
footers needs to be udpated for the new staff interface design.

This patch also changes the style of the "cancel" controls in these
footers from links to buttons. The popup window in cataloging has been
adjusted to be the same size as the one in authorities.

To test, apply the batch and rebuild the staff interface CSS.

- Go to Cataloging -> New from Z39.50/SRU.
  - In the popup window, the form should fit comfortably in the window.
  - The footer should be white with a grey border at the top, with
    Bootstrap-styled buttons aligned to the right.
- Perform the same test in Authorities -> New from Z39.50/SRU
- Install and enable an additional translation so that you can confirm
  that the language-selection footer still has the correct style.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3ac122f47d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 79e8d787a8)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-18 13:50:43 +00:00
5bfec7b741 Bug 31667: Merge 'tip' and 'hint' classes
This patch corrects a few instances of the use of the "tip" class and
replaces them with "hint." The patch also removes the class from the
staff interface CSS.

To test, apply the patch and rebuild the staff interface CSS.

- View a patron account and click the "Routing lists" link in the
  left-hand sidebar.
  - On the subscription routing lists page the "Search subscriptions"
    page label should look correct.
- Go to Reports -> Catalog by item type.
  - The "Select none..." hint should be styled correctly.
- The third instance, in the installer, is only visible if you try to
  install Koha using a MySQL user who doesn't have the correct
  privileges, so may be too much trouble to really test. A check of the
  patch should be adequate.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d8054e30fc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c74d7351b5)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-18 13:50:43 +00:00
Andreas Jonsson
61659ded9b Bug 33140: Use facet label value for mouseover text on facet removal link
This patch updates the facets includes in both the staff interface and
OPAC so that the title attribute on "remove" links uses the full name
rather than the code of the facet. So, library name instead of
branchcode, collection code description instead of authorized value
code.

To test, apply the patch and perform a search in the staff interface.

- Click a facet in the left-hand sidebar which will return more than one
  result.
  - On the reloaded page there should be a link next to that facet: [X].
    Hovering your mouse over it should show "Remove facet [facet name]"
    e.g. "Remove facet Centerville" instead of "Remove facet CPL"
- Test on library facets, item type facets, and collection code facets.
- Perform the same test in the OPAC.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 01a6b2b63b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 75b0912620)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-18 13:50:43 +00:00
3f411535a5 Bug 34305: Account for negative prices on acq details tab
The acquisition detail tab shows the estimated cost while
the order is still pending and the actual price, once received.
At least the tool tip on the table header row says so. This
was not working correctly.

To test:
* Create a basket
* Create a new order line with a negative list price (credit)
* Close the basket
* Verify that the price shows correctly in the acquisition details
  tab on the record
* Receive the order and enter a different negative actual price.
* Reload detail view, verify it still shows the estimated price
* Apply patch, restart_all
* Verify now the correct actual price displays
* Create another basket and order line
* Verify while not yet received, it still shows the estimated price

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 758712dc01)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cc21197125)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-18 13:50:43 +00:00
a2093742fe Bug 34447: Do not export "Actions" columns
In the KohaTable Vue component we should add the noExport class to the actions columns to not export them.

Test plan:
Go to the ERM module, create at least one agreement.
Go to the agreement list view and click "export" to export the table
=> Without this patch the "Actions" column was exported
=> With this patch is no longer there

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 585138f13f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 50dfe2be55)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-18 13:50:43 +00:00
emlam
148eec6bb3 Bug 34435: Remove side effect from get_password_expiry_date
If get_password_expiry_date is passed a DateTime object
as a parameter, it modifies and returns the original
object. This can create possible side effects.

This patch modifies get_password_expiry_date to clone the
DateTime object that it receives as a parameter and
return the modified clone, so that object references can
be passed in safely.

To test:
prove t/db_dependent/Koha/Patron/Category.t

Signed-off-by: Sam Lau <samalau@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dae5607fd1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f067a82e3a)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-18 13:50:43 +00:00
Emily Lamancusa
77f55baa51 Bug 34435: Add unit test
To test:
prove t/db_dependent/Koha/Patron/Category.t

Signed-off-by: Sam Lau <samalau@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4203632582)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ef24af8da3)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-18 13:50:43 +00:00