Commit graph

49131 commits

Author SHA1 Message Date
b51b1276fe Bug 33355: Update forms markup to be in line with interface patterns
https://wiki.koha-community.org/wiki/Interface_patterns

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 715a3ec635)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:27:13 +00:00
6a1a2b4113 Bug 33355: Fix is_perpetual radio buttons in AgreementsFormAdd
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 43ff73c01d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:23:13 +00:00
f1bc806ade Bug 33490: Add test
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 80d73b87c4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:22:37 +00:00
0c5fc3cf6d Bug 33490: Fix ambiguous query error
Doing actual testing with some agreements with expired periods, this was returning a 500 error

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a94026741c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:22:20 +00:00
8be16d36b7 Bug 33490: Rollback computed
Use a watch instead

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e52f862553)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:21:43 +00:00
2ca8630ac9 Bug 33490: Use computed values
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e3576f67d9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:21:24 +00:00
754f632174 Bug 33490: Improve max date handling
It fixes:
1. /agreements?by_expired=true do no longer explode
2. Fill date with today's date when we setup the component and when we
hit "filter"

However there are a couple of things totally wrong:
1. We should not need is_fp_disabled, we could be able to use
  :disabled="!filters.by_expired"
in the template, but it does not work
2. We should not need to deal with filters.max_expiration_date the "old
JS way", but should use a Vue computed value instead. I've failed at
that

I think those 2 problems have the same root, the way we deal with
filters in data() is wrong, and we may be loosing the ref at some point.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e3286c4b0b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:21:04 +00:00
61d4a4ffa4 Bug 33490: Make url consistent
This ensures we populate the max_expiration_date param on the browser
url for consistency with selected dates.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f9cb6b823e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:20:44 +00:00
5bf3631a4a Bug 33490: Prevent 400 on agreements?by_expired=true
We need to update the filter THEN update the current route

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 90ed8a26c5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:20:28 +00:00
4b22dff729 Bug 33490: Unit tests
This patch adds cypress tests for the filter by expired functionality in
the ERM Agreements page.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6f68b350ba)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:20:10 +00:00
ca90c16ea9 Bug 33623: Move ULSearchParams into http-client.js
Remove unused getAll methods in erm-api-client.js
Make use of new getAll query in AgreementRelationships

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b7feb64619)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:19:34 +00:00
6af609ba9c Bug 33623: Encode URL params for getAll
We must encode properly URL parameters when building the REST API routes

Can be tested easily using
const client = APIClient.erm
client.licenses.getAll({ "me.name:%ff%" })

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2ec95963f6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:19:16 +00:00
d3f1c687f7 Bug 33408: Fix template literal
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3296cf37f4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:18:14 +00:00
ae278ce2f3 Bug 33408: Move providers into syspref array
ERMProviders is a sys pref, place it in sysprefs

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 741ccb6e44)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:17:43 +00:00
ac5e350ead Bug 33408: Add storeToRefs to ERMStore
It makes it so that any changes to the local property
is also reflected in the store and other components are
made aware of the new value. No need to explicitly
change both local property and store property values.

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 1610a1d163)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:17:27 +00:00
9d2efd3ad6 Bug 33408: Store sysprefs in a new ERM store
We need the sysprefs' values to be shared between the components

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 a94178217b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:17:10 +00:00
33e19bc35c Bug 33408: We need only one this.loaded call
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 b01094030a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:16:40 +00:00
b6d543fc27 Bug 33408: Remove obsolete tests and template sys pref code
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 0f01c16ba1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:16:18 +00:00
8c410fdec3 Bug 33408: Prevent access to erm module by URL if sys pref is disabled
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 0efb53b3a2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:16:01 +00:00
f6ca974ea7 Bug 33408: Extend defaultCommandTimeout for cypress
Sometimes the initial page load takes more than 4 seconds.

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 c482119a4e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:15:43 +00:00
86d99a5613 Bug 33408: Mock ERM sysprefs from cypress tests
Sponsored-by: BULAC - http://www.bulac.fr/
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 2579b95db9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:15:25 +00:00
9c40c695c8 Bug 33408: Fetch sysprefs from svc/config/systempreferences
It will be easier to mock/set them from cypress tests.

Sponsored-by: BULAC - http://www.bulac.fr/
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 9be7dab4a1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:15:07 +00:00
7eabf447d1 Bug 33335: (QA follow-up) Polishing and comments
Just send the codes and descriptions only to client.
Adding a few comments to the reduce construction.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 020bc275b0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:08:12 +00:00
04ce17dde5 Bug 33335: Use To.json to serialize
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 706cd01ba2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:07:51 +00:00
Marius Mandrescu
e528bb87c7 Bug 33335: Fix JavaScript error on the MARC overlay rules page
The "MARC overlay rules" page doesn't display or work correctly
if a patron category code contains a "-".

This happens because of the JavaScript function in
"marc-overlay-rules.tt" line 469. This causes an error
"Uncaught SyntaxError: missing : after property id".

Test plan:
1. Go to Administration > Patron categories.
2. Make sure you don't have a patron category code that contains
   a "-".
3. Go to Administration > Record overlay rules.
4. The table should display correctly, and you can add, edit
   and delete rules.
5. Return to Patron categories.
6. Add a new patron category with a "-" in the patron category code.
7. Return to Record overlay rules page:
   => The page doesn't display and load correctly (see the attached
      image) - the normal DataTables header and footer aren't
      displayed, and you can't add, edit or delete overlay rules.
  => If you turn on web developer tools, an error is displayed in the
     console: "Uncaught SyntaxError: missing : after property id".
8. Apply the patch.
9. Repeat the step 7, the Record overlay rules page should now
   display correctly and you should be able to add, edit and
   delete rules.
10. Sign off.

Signed-off-by: David Nind <david@davidnind.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 351e380a14)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:07:31 +00:00
9adac1f4d4 Bug 32129: (QA follow-up) Avoid duplicate calculation
This patch stores the output from ->check_recall() (a Koha::Recall
object or undef) and reuses afterwards, on a ternaty operator.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 62f176d079)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:05:07 +00:00
Aleisha Amohia
a104de7094 Bug 32129: Use patron category when checking if item can fill recall
This patch uses the patron category of the patron who requested the most
relevant recall to check for more specific circulation rules relating to
recalls. This ensures that patrons who are allowed to place recalls are
able to fill their recalls, especially when recalls are not generally
available for all patron categories.

To test:
1) Go to Administration -> System preferences and enable UseRecalls
2) Go to Administration -> Circulation and fines rules and set a general
All/All rule and a Category A/Itemtype A rule. All values can be set
however you like except for these recalls rules:

All/All rule:
Recalls allowed: 0
Recalls per record: 0
On shelf recalls allowed: if any unavailable

Category A/Itemtype A rule:
Recalls allowed: 5
Recalls per record: 5
On shelf recalls allowed: if any unavailable

3) Find an item of Itemtype A. Check it out to Patron A (any category).
4) Log into the OPAC as Patron B (of Category A). Find the item and
place a recall on the item.
5) Back in the staff interface, check in the item. This should trigger
the recalls process so you can allocate the item to Patron B's recall,
however the pop-up box to confirm the recall does not show. This is the
bug.

6) Apply the patch and restart services

7) Check in the item again. Confirm the pop-up box to confirm the recall
shows and you are able to allocate the item to Patron B's recall.
8) Confirm tests pass t/db_dependent/Koha/Item.t

Sponsored-by: Auckland University of Technology
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6cf8c901f5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:04:45 +00:00
5c81f385ae Bug 33710: Ignore how-to related files
Related to https://gitlab.com/koha-community/koha-testing-docker/-/issues/378

If we merge it we will want to hide how-to.pl and how-to.ptt

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a2da8744ef)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:03:55 +00:00
e3c420ab76 Bug 30687: Allow pickup location to be forced when override is allowed
This is Julian's patch with some extra cleanup to reduce repeated code

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: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab93008da7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 13:01:46 +00:00
c15e5068d0 Bug 32993: Holds priority changed incorrectly with dropdown selector
Test Plan:
1) Find record with at least 3 holds.
2) Change first holds priority as 2, Priority is changed to 3.
3) Try to change priority back to 1, Priority is changed to 2.
4) Apply this patch
5) Reload the page
2) Change first holds priority as 2, Priority is changed to 2.
3) Try to change priority back to 1, Priority is changed to 1.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Hinemoea Viault <hinemoea.viault@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 7d9e4cf415)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:59:26 +00:00
285c20e0c5 Bug 33320: Add spacing in Patron modification requests
* Go to the OPAC, log into your account
* Make changes to your personal details and save
* Go to the staff interface and use the link on the start page to
  moderate the change request
* At the top of the list you'll see something like:

Without this patch:
  Ignore|Patron details
With this patch:
  Ignore | Patron details

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 26b706f4fa)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:59:00 +00:00
Katrin Fischer
78f14f02ed Bug 33167: Fix TT comment for better translatability
We just figured out that multi-line TT comments show up
weirdly in translations and fixed it on bug 33332. So
this just follows the newly established pattern.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8d94235dc4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:57:21 +00:00
ff69e5b3aa Bug 33167: Cleanup staff detail page
This patch begins reduing some of the extra things we are doing in
detail.pl that could easily be handled in the templates - fetching
authorised values and branches etc

It also removes a loop to find items that should be hidden, and instead
uses a searh parameter

The template changes either use item object rather than passed
variables, or utilize plugins to fetch authorised valued

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 d650f8c2a6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:56:58 +00:00
Katrin Fischer
32a6fec7e2 Bug 32766: (QA follow-up) Remove stray p from USE statements
+q[% SET footerjs = 1 %]

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aded943792)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:53:26 +00:00
Thibaud Guillot
21f51b41d9 Bug 32766: (follow-up) Fix translation function
The previous syntax causes a warning during the execution of the translation script

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 f46b3e8f47)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:53:10 +00:00
Thibaud Guillot
2915c0c4c5 Bug 32766: Update some labels for better understanding and translation
examples: 'crayon'->'carchoal' or 'camaiu'->'cameo'
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 1ac15616e3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:52:52 +00:00
0e08645010 Bug 32995: Pass user agent string for OverDrive fulfillment
This patch simply adds the string Koha/VERSION to the fulfillment
request

TO test:
1 - Have OverDrive credentials for testing
2 - Enable all the overdrive options in system preferences
3 - Sign in to opac with an overdrive user and verify you can checkout
  and download titles
4 - Sign off

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Not tested with OverDrive, but change looks harmless enough.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d27a3419cc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:52:05 +00:00
692c928ecb Bug 33699: Typo in identity_provider_domains.tt (presedence)
This patch corrects the typo "presedence" with "precedence."

The patch also corrects some grammar:

"so if the 'library.com' domain will take presedence over
'*library.com'"

...changed to...

"so 'library.com' domain will take presedence over '*library.com'"

I also changed the <div>s inside that block of help text to <p> in order
to improve legibility.

To test, apply the patch and go to Administration -> Identity providers
-> Manage domains (on an existing provider) -> Edit, and click the
"More" button under the "Domain" field.

Confirm that the text is correct.

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 56f6b6b6fc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:51:24 +00:00
165c945b5e Bug 33677: Remove verbose option from koha-worker man
Signed-off-by: Magnus Enger <magnus@libriotech.no>
No more mention of verbose.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1bd49fcab8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:50:59 +00:00
68412485e3 Bug 33642: Fix 'No log found.' in viewlog
It should ease translatability and remove an extra space.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3ca450dbc9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:50:24 +00:00
013cba1d55 Bug 33445: (follow-up) Allow all search fields to be passed through and returned when trying another search
It seems the form didn't populate all fields form data passed in. This patch
corrects that

Signed-off-by: David Nind <david@davidnind.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 9446baecf9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:42:00 +00:00
ee834fbe91 Bug 33445: (follow-up) Pass form values through when clicking 'Try another search'
We didn't include anything except the authid id in the try again form, this
patch extends to cover all the fields

Signed-off-by: David Nind <david@davidnind.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 42b402a2bd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:41:40 +00:00
e0077548da Bug 33445: Pass through form info if present and use record values otherwise
This patch updates the form to pass through values formthe form when searching, and
to use record values if nothing is passed in.

TO test:
 1 - Without the patch, edit a personal name authority record
 2 - Replace 100 subfield a (200 subfield a for UNIMARC) with your own name
 3 - Click "Replace record via Z39.50/SRU search"
 4 - Note that prefilled search field contains the original value, not your name.
 5 - Replace the Author (personal) field with your name in the search form
 6 - choose a search target, and click Search.
 7 - Note that the results of the search are for the original value, not your name
 8 - From the details page of a record, click 'Edit -> Replace record via Z3950'
 9 - Note form is prefilled
10 - Change value as in 5 and search
11 - Note original term was searched
12 - Apply patch, restart all
13 - Repeat searches as before
14 - Confirm that form is prefilled with record or the updated value
15 - Confirm your entered search terms are always searched

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: David Nind <david@davidnind.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 44e868f464)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:41:21 +00:00
e35e1b5869 Bug 33655: z39.50 search no longer shows search in progress
This patch adds an id to z39.50 search interface submit buttons so that
the JavaScript event for changing the cursor can be linked to that
instead of the obsolete class.

The patch also adds code copied from Bug 33233 in order to make the
"waiting" cursor revert to the default if the user uses the back button
to return to the search form.

To test, apply the patch and go to Cataloging -> New from Z39.50

- Fill in a search term and click the submit button
- Your cursor should change to a "waiting" cursor while the search is
  performed, before you're redirected to the results.
- From the results page, clicking the back button (or right-clicking the
  page and choosing "Back") should return you to the search form and
  your cursor should be a standard pointer.

Perform the same test from:

- Acquisitions -> Vendor -> Basket -> Add to basket -> From an external
  source
- Authorities -> New from Z39.50/SRU

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d6f0723ce)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:40:08 +00:00
Katrin Fischer
42b8f60bf4 Bug 32937: Make Zebra ignore the copyright symbol in searches
It's common to catalog the year with the copyright symbol attached
to it. This creates some issues with search that we can fix by
adding the © to the list of characters Zebra ignores in search.

To test:
* Search for any existing publication year with ©, example: ©1951
* Verify your record is not found
* Add the copyright symbol to a record, verify it's now found with ©,
  but not without
* Apply patch
* On ktd:
  * sudo cp -i /kohadevbox/koha/etc/zebradb/etc/word-phrase-utf.chr  /etc/koha/zebradb/etc/word-phrase-utf.chr
  * sudo koha-zebra --restart kohadev
  * sudo koha-mysql kohadev
  * DELETE FROM biblio WHERE biblionumber = 369;
  * The reindex woudl fail for me with this broken record present.
  * sudo koha-rebuild-zebra -f kohadev
* Repeat searches, the records should be found when searching
  with and without ©.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c39d4ea0b2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:39:14 +00:00
emlam
276bd9af4b Bug 32627: Calculate expirationdate relative to waitingdate
Hold::set_waiting should calculate the MaxPickupDelay expiration date
based on waitingdate rather than the current date, to avoid resetting
the expirationdate on a hold that was already waiting.

To test:
1. Place a hold and check in the item so the hold will be set to Waiting
2. Confirm that the expiration date is correct based on the
   ReservesMaxPickupDelay setting
3. Adjust your system clock to one day later
4. Check in the item again and confirm the hold
5. Note that the expiration date has changed
7. Apply patch and restart_all
8. Repeat steps 1-4. Confirm that the expiration date is calculated
   correctly, and does not change when the item is checked in again
9. Reset your system clock to the current date
10. Set ExcludeHolidaysFromMaxPickupDelay to Use the Calendar
11. Add an upcoming holiday to the calendar
12. Repeat steps 1-4. Confirm the expiration date correctly accounts for
    the holiday, and does not change when the item is checked in again

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 21bcb6e855)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:38:23 +00:00
112f27f61e Bug 33684: Make mandatory date fields required when editing a patron
Date fields in BorrowerMandatoryField are not required by the validation
form when a new patron is added or modified.

This is because the 'required' prop does not exist on the input element
when the flatpickr instance is created.
We should either add it in the DOM directly (tt), but it will require to
do it "manually" for each date fields, or add it when we add it to the
inputs. This patch implements the second option.

Test plan:
1. Add "dateofbirth" to syspref BorrowerMandatoryField.
2. Add patron and leave date of birth input field empty.
3. Save.
=> Form is not submitted and you are asked to fill in a date of birth

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

https://bugs.koha-community.org/show_bug.cgi?id=33648
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ae3d6f1876)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:34:18 +00:00
360b4f94b4 Bug 33403: Fix Letters.t if number pattern with id=1 does not exist
Bad assumption in DB, we should create the data we need

Test plan:
> delete from subscription_numberpatterns;

prove t/db_dependent/Letters.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 49803c311b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:33:41 +00:00
ef4b61dd08 Bug 26403: (QA follow-up) Add missing debit and credit types to includes
This adds the missing debit and credit types to the includes, namely:
DISCOUNT, PURCHASE, PAYOUT, and VOID.

I sorted them as they appear in the GUI (alphabetically) so it's a little
easier to spot missing ones.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c76533c5a1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:26:49 +00:00
d6632c1d1c Bug 26403: Use accounts include in account management pages
This patch updates the credit and debit types management pages to use
the proper includes for handling system type translations.  This is how
it should have been done in the first place on the original bugs that
introduced the management of these types but for some reason I think it
got dropped during the QA process leading to confusion around these
system types with their fixed descriptions.

To test:
1. Apply patch
2. Apply the translations
   ./misc/translator/translate install xx-XX
3. In the staff interface, go to Administration > Credit types
   --> They should be translated
4. Go to Administration > Debit types
   --> They should be translated

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bd8d019d32)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:26:31 +00:00