koha.git
15 months agoBug 33161: Add +strings support to GET /items and /items/:item_id
Tomas Cohen Arazi [Tue, 7 Mar 2023 23:51:35 +0000 (20:51 -0300)]
Bug 33161: Add +strings support to GET /items and /items/:item_id

This patch introduces the `api_strings_mapping` method to the
*Koha::Item* class, and makes the API spec for the following routes:

* GET /items
* GET /items/:item_id
* GET /acquisitions/orders

accept the new `+strings` parameter that can be passed through the
`x-koha-embed` header and was introduced by bug 26635. In the case of
/acquisitions/orders, you will need to use

x-koha-embed: items+strings

I introduce it here to highlight the flebility we introduced with bug
26635.

The `api_strings_mapping` method has its roots on the cool
`columns_to_str` method already present. The main differences:

* It is aware of the `public_read_list` for attributes so no hidden
  information is exposed.
* Attribute names get mapped for consistency with the API (e.g.
  `homebranch` is converted into `home_library_id`, etc).
* The data structure it returns includes information about the source
  for the descriptions (e.g. it it is an authorised value, then `type`
  will be `av`, and the related category information is returned so
  dropdowns and such can be built. The same goes for other types as
 `library`, `item_type` and `call_number_source`.

To test:
1. Apply this patch
2. Reload everything
3. Play with your favourite REST tool (e.g. Postman)
4. Try:
GET http://localhost:8081/api/v1/items
x-koha-embed: +strings
=> SUCCESS: You get a list of items, they include the new _strings
structure, and the contents make sense!
5. Repeat with a specific item:
GET http://localhost:8081/api/v1/items/14
x-koha-embed: +strings
=> SUCCESS: It all makes sense!
6. Sign off :-D

Sponsored-by: Virginia Polytechnic Institute and State University
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
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 dab02607028fadc0e8864102a9a59c7e8fb6c775)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 3831: Add a warning to about page when there is no FA framework
Nick Clemens [Fri, 3 Mar 2023 20:41:21 +0000 (20:41 +0000)]
Bug 3831: Add a warning to about page when there is no FA framework

The feature is effectively disab;ed throughout Koha when this framework
is deleted. There do not appear to be any other side effects.

We should report this on the about page for informatinal purposes

To test:
1 - Apply patch
2 - Check about page, no change
3 - sudo koha-mysql kohadev
    UPDATE biblio_framework SET frameworkcode = 'FB' WHERE
    frameworkcode = 'FA'
4 - Refresh about page
5 - Note new warning
6 - sudo koha-mysql kohadev
    UPDATE biblio_framework SET frameworkcode = 'FA' WHERE
    frameworkcode = 'FB'
7 - Refresh about page
8 - No warning

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a2fa4fcc03583ef3e6a6a299b4c0e0f3145ca32d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32734: (QA follow-up) Make use of $c->objects->to_api
Tomas Cohen Arazi [Mon, 13 Mar 2023 18:06:44 +0000 (15:06 -0300)]
Bug 32734: (QA follow-up) Make use of $c->objects->to_api

This is using plain `$biblios->to_api` but as of bug 33080, the new
helper should be used instead. This patch fixes that.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a8daacac2c0e80c70d3665a2016cbb20b16bcf5e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32734: (QA follow-up) Remove stray method
Tomas Cohen Arazi [Mon, 13 Mar 2023 17:58:21 +0000 (14:58 -0300)]
Bug 32734: (QA follow-up) Remove stray method

On bug 33083 we introduce a better way to implement a reusable method
for the same functionality.

This patch just removes the one in `Koha::Biblios` and the result should
be the same as the one inherited from  `Koha::Objects::Record::Collections` will be picked instead.

To test:
1. Run:
   $ prove t/db_dependent/Koha/Biblios.t \
           t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 79e3fd1640dd2dc96f9157745224a84c4e0cf632)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32923: (follow-up) Fix x-koha-embed from EHoldings/*/*
Jonathan Druart [Fri, 17 Mar 2023 14:07:37 +0000 (15:07 +0100)]
Bug 32923: (follow-up) Fix x-koha-embed from EHoldings/*/*

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 70fcbce07f2e44d40853e4b423aa1b13cfb713de)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33151: Improve translation of string in cities.tt and desks.tt
Owen Leonard [Mon, 6 Mar 2023 18:02:28 +0000 (18:02 +0000)]
Bug 33151: Improve translation of string in cities.tt and desks.tt

This patch adds a <span> tag around a string in both cities.tt and
desks.tt in order to improve translatability.

To test apply the patch and run the translation script to update the .po
files, e.g.

perl misc/translator/translate update fr-FR

Check the updated .po files:
 - Before the patch you would have found 'msgid "%s Searching: %s %s %s'
 - After the patch you should find 'msgid "Searching: %s'

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 289400379213dea3169ba30196ff4ef8f87a4b03)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32804: (QA follow-up) Typo ahs and fix ImportBatch.t
Marcel de Rooy [Fri, 17 Mar 2023 08:43:32 +0000 (08:43 +0000)]
Bug 32804: (QA follow-up) Typo ahs and fix ImportBatch.t

Resolve:
    #   Failed test 'Item's biblioitemnumber has not changed'
    #   at t/db_dependent/ImportBatch.t line 407.
    #
    #          got: '4261'
    #     expected: '2371'

Do not compare $item1->biblionumber with $original_biblioitemnumber :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bf8e0a394fb1704345e8cc4cae45d86c31e596ef)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32804: (follow-up) Test that id's have not changed
Nick Clemens [Fri, 3 Mar 2023 12:18:40 +0000 (12:18 +0000)]
Bug 32804: (follow-up) Test that id's have not changed

Rather than assuming biblionumber and biblioitemnumber are the same, we
should test that they have not changed form their original values

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 520db70bf1cdedf658527887957fc25ed921da5f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32804: Do not adjust biblionumber when replacing items during import
Nick Clemens [Thu, 2 Feb 2023 20:16:49 +0000 (20:16 +0000)]
Bug 32804: Do not adjust biblionumber when replacing items during import

This patch adjust the item matching at import to confirm that for a duplicate itemnumber or barcode
matches an existing item in the DB and uses the original biblionumber when updating the item.

When ordering in a consortium the items may be moved around, duplicate biblios added, and various matches found.
We should not allow importing of items to move them from 1 biblio to another, but  we should allow the imports
to succeed and assume itemnumber or barcode matches are authoritative. The responsibility for correct matching of items to biblio should fall on the creator of the files

To test:
 1 - Be using the sample data in koha testing docker
 2 - Stage the sample file on this report
 3 - Match on KohaBiblio(999$c) / Item processing: replace
 4 - Note the biblio match is "The complete novels / Austen, Jane"
 5 - View the staged marc, note the barcode 39999000004090 in an item
 6 - Search for that barcode
 7 - You find biblio "Five novels : complete and unabridged / Gustave Flaubert"
 8 - Import the file
 9 - Check the db:
     SELECT * FROM items WHERE biblionumber != biblioitemnumber;
10 - Note the mismatch
11 - Fix the item and set it as 'Music' type
     UPDATE items SET biblionumber = biblioitemnumber, itype='MU' WHERE biblionumber != biblioitemnumber;
12 - Apply patch, restart all
13 - Stage and import the file with the same settings
14 - Confirm the item is modified on its original biblio (99) and that item type is Book again
15 - Change itemnumber to avoid itemnumber match and reset type
     UPDATE items SET itype='MU', itemnumber=999 WHERE itemnumber=212;
16 - Stage and import with the same setttings
17 - Confirm the marcode match worked and item is updated to book on original record
18 - Delete the original item
19 - Stage and import the file with the same settings
20 - The item is successfully created
21 - Stage and import, but item processing option is 'add'
22 - Confirm 1 item ignored
23 - Check the db
     SELECT * FROM import_items WHERE barcode=39999000004090
24 - Confirm there is a line with 'error' and duplicate_barcode

JD amended patch
-        # We assume that when replaicing tiems we do not want to move them - the onus is on the importer to
+        # We assume that when replacing items we do not want to move them - the onus is on the importer to

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.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 eeb115440a22ed035d8720ac53b7fbd0e5fd8afe)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32804: Add unit tests
Kyle Hall [Mon, 6 Feb 2023 16:55:48 +0000 (11:55 -0500)]
Bug 32804: Add unit tests

JD amended patch
-    is( $item1->homebranch, $library->branchcode, "Item was overlayed succesfully" );
+    is( $item1->homebranch, $library->branchcode, "Item was overlaid successfully" );

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.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 8f5d3612ee74e48293667af90a03f714d87e062a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33059: Fix capitalizatoin of AV sample category descriptions
Katrin Fischer [Thu, 23 Feb 2023 21:21:02 +0000 (21:21 +0000)]
Bug 33059: Fix capitalizatoin of AV sample category descriptions

* Fixes capitalization
* Standardizes on e-book (see https://www.oxfordlearnersdictionaries.com/definition/english/e-book)
* Standardizes on audiobook (see https://www.oxfordlearnersdictionaries.com/definition/english/audiobook)

To test:
* This is a little difficult to test. What you'd need to do:
* Apply the patch
* Drop your database, recreate it, run the web installer
* Make sure to select the optional AV along with the mandatory to install
* Log into Koha after finishing the installer and go to administration >
  authorised values
* Review the existing sample values for incorrect capitalization in
  the different categories

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8e4d5279703be5f8e9313f2e497bfa98b58e422c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33100: (QA follow-up) Trivial QA fixes
Tomas Cohen Arazi [Fri, 17 Mar 2023 12:51:09 +0000 (09:51 -0300)]
Bug 33100: (QA follow-up) Trivial QA fixes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 057e6c2bc8f7d88ff2e86f1abab97a705e2917a3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33100: Remove all punctuation at end of record
Nick Clemens [Tue, 7 Mar 2023 20:05:36 +0000 (20:05 +0000)]
Bug 33100: Remove all punctuation at end of record

This could potentially be overkill - if you have two records that only
differ in ending punctuation, you might get a false result - I don't
know how likely that is ( as I have mentioned before '!!!' is a band )

This seems a reasonable fix

To test:
1 - Set sysprefs as in bug 33159
2 - Edit a record, biblionumebr 3 is fine
3 - Add a comma to end of author subfield a
4 - Save and note relinked
5 - Apply patch, restart all
6 - Save again
7 - Linked to original record

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 928a4cb465d7891157b1b061d144db6a808ada14)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33100: Unit test
Nick Clemens [Tue, 7 Mar 2023 20:05:28 +0000 (20:05 +0000)]
Bug 33100: Unit test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 749045366310fe4269bb1c39a93adc5eb20a4f22)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33235: Fix cypress tests
Pedro Amorim [Wed, 15 Mar 2023 15:23:37 +0000 (14:23 -0100)]
Bug 33235: Fix cypress tests

Some inconsistencies leftovers from 32495 and 32997 were causing cypress tests to fail, this fixes them.

* Apply patch
* Run cypress tests and verify all pass

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 16e6d937632301e233d5b90b6588940eb2226636)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32495: (follow-up) Remove required property
Matt Blenkinsop [Wed, 1 Mar 2023 10:46:20 +0000 (10:46 +0000)]
Bug 32495: (follow-up) Remove required property

This follow-up removes the required property from the text area as this
was missed previously.

Test plan:
1) In the ERM module, add a new agreement and observe that the Description field is required
2) Apply patch
3) Repeat step 1 but this time the Required flag will not be visible.
4) Submit the form with the Description field blank - the submission
   should work

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0307c1bbff089312618608785414c92fc1549823)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32495: Mis-matched required fields in UI and api
Matt Blenkinsop [Mon, 9 Jan 2023 15:12:18 +0000 (15:12 +0000)]
Bug 32495: Mis-matched required fields in UI and api

The "description" field is marked as required in the UI when creating a new Agreement. This flag has been removed to match the API where it is not a required field. Is Perpetual has not been marked as required as it is a checkbox with a default selection so will always provide a value.

Test plan:
1) In the ERM module, add a new agreement and observe that the Description field is required
2) Apply patch
3) Repeat step 1 but this time the Required flag will not be visible.

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 e1b7591effa22f787bbf175aeb170f343ce07498)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33082: Add yellow buttons and page sections to 'copy order' pages
Katrin Fischer [Mon, 27 Feb 2023 21:44:09 +0000 (21:44 +0000)]
Bug 33082: Add yellow buttons and page sections to 'copy order' pages

When creating a new order from an existing order (copy),
there was no page section on the search results and the
submit buttons were not yellow (primary).

To test:
1. Make sure you have budgets, funds and vendors
2. In Acquisitions, search for a vendor
3. Create a basket
4. Add an order to that basket (Order from new (empty) record is easiest)
5. Add to the basket again, choosing the "From existing orders (copy)" option
6. Search for you previous order
7. The table of ordres has no white background (missing page-section) and
   the "Next" button is not yellow
8. Check the order and click Next
9. The "Duplicate orders" button is not yellow
10. Apply patch
11. Verify buttons are now yellow and the table has a white background

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 f1a274c79cb827737a57686a51a8fef72c1eff75)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33263: Fix random failure in patrons_search.t
Jonathan Druart [Fri, 17 Mar 2023 10:57:22 +0000 (11:57 +0100)]
Bug 33263: Fix random failure in patrons_search.t

There is a missing wait_for_ajax. After we click "next", we need to make
sure we are using the correct response.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e81e2c9ed552cc5fa07d474a6a9d44ba0e751390)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32983: Fix dropdown list when search for EBSCO's packages
Jonathan Druart [Wed, 8 Mar 2023 14:53:15 +0000 (15:53 +0100)]
Bug 32983: Fix dropdown list when search for EBSCO's packages

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5c3693bbd2109a780c5fdb5af31d36841ea6c1fc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33058: Update "fines" to "charges" for viewing a guarantees charges
Katrin Fischer [Thu, 23 Feb 2023 20:26:23 +0000 (20:26 +0000)]
Bug 33058: Update "fines" to "charges" for viewing a guarantees charges

Charges includes fines and fees, while fines are mostly
negative. Changing this according to our terminology
guidelines.

To test:
* Make sure the patron category of your patron is set
  to be 'can be guarantee' in administration
* Set  AllowStaffToSetFinesVisibilityForGuarantor and
   AllowPatronToSetFinesVisibilityForGuarantor to allow
* Set OpacPrivacy to allow
* Edit your patron, give it a guarantor and
  look at the "Show fines to guarantors setting" and hint
* Save and look at the label of the field on the details tab
* Go to the OPAC and log in
* Check the Privavy tab for the option to allow the guarantee
  to see your charges
* Apply patch. Verify:
  * System preference descriptions changes
  * Option and label names have changed in all steps above

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 3f848e4d244ce4fa5f9f8a6d507c79de704592b5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32180: Add required class to labels in ERM
Lucas Gass [Wed, 15 Mar 2023 20:39:27 +0000 (20:39 +0000)]
Bug 32180: Add required class to labels in ERM

To test:
1. Apply patch, yarn build
2. Add/edit Agreemnets, make sure all required fields have a red 'required' label
3. Check 'Add new period', 'Add new user', 'Add new license', 'Add new related agreement'.
4. Add/edit Licenses, make sure all required fields have a red 'required' label.

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 2dd0a14571e59b9e4740f323e038decfef0919e2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33056: Terminology: change 'fine' to 'charge'when making a payment or writeoff
Katrin Fischer [Thu, 23 Feb 2023 20:42:54 +0000 (20:42 +0000)]
Bug 33056: Terminology: change 'fine' to 'charge'when making a payment or writeoff

In the development meeting of Feb 22, 2023, we decided to change 'fine' to 'charge' when referring to various types of fees ('fine' should be limited to overdue fines).

To test:
0. Go to patron's account accounting tab, Make a payment section
   --> It will read: X has no outstanding fines.
   0.1 Create a manual invoice
   --> Use "Write off all" button, verify confirmation message says 'fines'
1. Add a manual fee to a patron's account
   1.1. Go to a patron's account > Accounting tab
   1.2. Click 'Create manual invoice'
   1.3. Enter an amount
   1.4. Click 'Save'
2. Pay an individual charge
   2.1. Click 'Make a payment'
   2.2. Click the 'Pay' button next to an individual charge
   --> In the browser tab title, it says 'Collect fine payment for ...'
   --> In the breadcrumbs, the last section is 'Pay an individual fine'
   --> The heading of the page is 'Pay an individual fine'
   --> The heading inside the payment tab is 'Pay an individual fine'
   2.3. Click 'Cancel' and go back to the 'Make a payment' tab
3. Pay an amount toward all charges
   3.1. Click 'Pay amount'
   --> In the browser tab title, it says 'Collect fine payment for ...'
   --> In the breadcrumbs, the last section is 'Pay an amount toward all fines'
   --> The heading of the page is 'Pay an amount toward all fines'
   --> The heading inside the payment tab is 'Pay an amount toward all fines'
   3.2. Click 'Cancel' and go back to the 'Make a payment' tab
4. Pay an amount toward selected charges
   4.1. Click 'Pay selected'
   --> In the browser tab title, it says 'Collect fine payment for ...'
   --> In the breadcrumbs, the last section is 'Pay an amount toward selected fines'
   --> The heading of the page is 'Pay an amount toward selected fines'
   --> The heading inside the payment tab is 'Pay an amount toward selected fines'
   4.2. Click 'Cancel' and go back to the 'Make a payment' tab
5. Write off an individual charge
   5.1. Click the 'Write off' button next to an individual charge
   --> In the browser tab title, it says 'Collect fine payment for ...'
   --> In the breadcrumbs, the last section is 'Write off an individual fine'
   --> The heading of the page is 'Write off an individual fine'
   --> The heading inside the payment tab is 'Write off an individual fine'
   5.2. Click 'Cancel' and go back to the 'Make a payment' tab
6. Write off selected charges
   6.1. Click 'Writeoff selected'
   --> In the browser tab title, it says 'Write off an amount for ...'
   --> In the breadcrumbs, the last section is 'Write off an amount toward selected fines'
   --> The heading of the page is 'Write off an amount toward selected fines'
   --> The heading inside the payment tab is 'Write off an amount toward selected fines'
   6.2. Click 'Cancel' and go back to the 'Make a payment' tab
7. Apply patch and repeat
   --> All fines should now be charges.

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 6d6f763182ef11e8c36a348371925f643a78f686)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33076: Add context to "Quotes"
Katrin Fischer [Mon, 27 Feb 2023 22:13:01 +0000 (22:13 +0000)]
Bug 33076: Add context to "Quotes"

A quote as a part of quoted text and a quote as
part of the acquisition process need to be
translated differently at least in German.
This patch adds context to the terms, so we can
do that.

To test:
* Go to Tools > Quote editor
* Verify the heading of the page reads "Quotes"
* Enable EDIFACT system preference
* Go to Administration > EDI accounts
* Add a new account save
* Verify the table heading reads "Quotes"
* Apply patch - nothing should change

Verify the translation process:
* Run: gulp po:update --lang de-DE
* Verify the "Quotes" appear now separated by
  different context in
  misc/translator/po/de-DE-messages.po

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 2413ab7e7986c39d5469e8f16d7be9d62bd775d8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33126: Markup error in staff interface tab wrapper
Owen Leonard [Fri, 3 Mar 2023 13:40:03 +0000 (13:40 +0000)]
Bug 33126: Markup error in staff interface tab wrapper

This patch makes a minor correction to the tab WRAPPER directives: a
<li> which should be </li>.

The patch also modifies the example WRAPPER markup to correct an error
and clarify usage.

To test, apply the patch and test a page which has been updated to use
tab wrappers: The about page, basket groups, library transfer limits.
Tabs should continue to work as expected.

Before the patch, the about page source will include this:

<li role="presentation" class="active">
    <a href="about_panel" aria-controls="about_panel" role="tab" data-toggle="tab">
       Server information
    </a>
<li>

After the patch the closing </li> will be correct.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c07ada6c851d492ad696250840cb16ed28dc9362)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33183: Error inserting matchpoint_components when creating record matching rules...
Kyle Hall [Thu, 9 Mar 2023 16:35:42 +0000 (11:35 -0500)]
Bug 33183: Error inserting matchpoint_components when creating record matching rules with MariaDB 10.6

The word "offset" is now a keyword. At the very least we need to escape the fieldname with backticks.
It would be nice to switch to Koha::Objects for this module eventually.

C4::Matcher::_store_matchpoint(): DBI Exception: DBD::mysql::st execute failed: You have an error in
your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax
to use near 'offset, length) VALUES ('27', '1', '999'...' at line 2 at /usr/share/koha/lib/C4/Matcher.pm
line 314

Test Plan:
1) Set up Koha with MariaDB 10.6
2) Attempt to create a matching rule
3) Note the error screen
4) Apply this patch
5) Restart all the things!
6) Attempt to create another matching rule
7) No errors this time

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4628d2e81cf97951e978ae1e18a6939767ad2b09)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32734: Add REST endpoint to list biblios
Agustin Moyano [Fri, 17 Feb 2023 01:17:43 +0000 (22:17 -0300)]
Bug 32734: Add REST endpoint to list biblios

This patch adds an endpoint to list biblios

To test:
1. apply patch
2. enable basic auth
3. call to GET /api/v1/biblios with the following Accept headers:
 * application/json
 * application/marcxml+xml
 * application/marc-in-json
 * application/marc
 * text/plain
4. notice how data changes with each Accept header
5. prove t/db_dependent/Koha/Biblios.t t/db_dependent/api/v1/biblios.t
6. sign off

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a4fb1ca3d147dfe2757bba10225088db4236d430)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 31801: Add REST endpoint to modify a biblio
Agustin Moyano [Fri, 23 Dec 2022 21:38:04 +0000 (18:38 -0300)]
Bug 31801: Add REST endpoint to modify a biblio

To test:
1. Apply patch
2. Set RESTBasicAuth preference to true
3. Pick a biblio to modify, and modify it's marc record
4. Make a PUT request to /api/v1/biblios/:biblionumber with one of the following content type header
  - application/marcxml+xml
  - application/marc-in-json
  - application/marc
5. Add the following header in the request 'x-framework-id: <framework id>'
5. Check that the biblio was modified
6. Sign off

Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4438c4da2e742c9383f30ea9850b8f0a1a3b5712)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 31800: Add REST endpoint to add a biblio
Agustin Moyano [Fri, 23 Dec 2022 20:15:29 +0000 (17:15 -0300)]
Bug 31800: Add REST endpoint to add a biblio

To test:
1. Apply patch
2. Set RESTBasicAuth preference to true
3. Make a POST request to /api/v1/biblios with one of the following content type header
  - application/marcxml+xml
  - application/marc-in-json
  - application/marc
4. Add the following header to the request: "x-framework-id: <framework id>"
5. Check that the biblio is created
6. Sign off

Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b5d6ccdf604c82beef627360c45f4cad78739f1b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 29354: Make overdue_notices.pl send .html
Magnus Enger [Mon, 12 Dec 2022 13:41:20 +0000 (13:41 +0000)]
Bug 29354: Make overdue_notices.pl send .html

If you have EmailOverduesNoEmail = Send and specify "--html somedir",
overdue_notices.pl will send a file by email that contains partial
HTML, as a file called attachment.txt. This patch fixes that.

To reproduce in koha-testing-docker:
- EmailOverduesNoEmail = Send
- Make sure you have a loan that was due yesterday, by backdating the
  due date
- Set up an overdue action to send "Overdue Notice" (ODUE) to the
  category you made the loan to above, when a loan is one day overdue
- Run this command:
  $ sudo koha-shell -c "perl misc/cronjobs/overdue_notices.pl -v -t -html /tmp/" kohadev
- Look at the file /tmp/notices-<DATE>.html and make sure it is a full
  HTML document, with <html>, <head>, <body> etc.
- Create a report like this:
  SELECT message_id, letter_id, borrowernumber, subject, CONCAT( '<pre>', content, '</pre>' ) AS content,
    metadata, letter_code, message_transport_type, time_queued, updated_on, to_address, content_type, failure_code
  FROM message_queue
  WHERE subject = 'Overdue Notices'
  ORDER BY message_id DESC
- Run the report and verify there is a line like this in the "content"
  of the newest message:
  Content-Type: text/plain; name=attachment.txt
- A part of the "content" will be a block of several lines of gibberish
  (base64) that look something like "RGVhciAga29oYSwNCg0KQWN...". Copy
  this block of text to somewhere like base64decode.org and decode the
  text. You should see a fragment of HTML, without <html>, <head>,
  <body> etc.

To test:
- Apply the patch
- Run overdue_notices.pl again, with the same arguments as above
- Make sure /tmp/notices-<DATE>.html is still a full HTML document
- Re-run the report, and make sure you now have this in the "content":
  Content-Type: text/html; name=attachment.html
- Decode the base64 and make sure it is now a full HTML document, with
  <html>, <head>, <body> etc.
- Re-run overdue_notices.pl as above, but replace "-html /tmp/" with
  "-csv /tmp/test.csv"
- Make sure /tmp/test.csv and the decoded base64 from the report
  contains CSV data
- Re-run overdue_notices.pl as above, but replace "-html /tmp/" with
  "-text /tmp/"
- Make sure /tmp/notices-<DATE>.txt and the decoded base64 from the
  report contains no HTML

Note:
- The actual text from the different messages will be enclosed in
  <pre>-tags
- If you have HTML in your ODUE message template and run with -v, you
  will have warnings saying "The following terms were not matched and
  replaced"
These are due to Bug 14347, and are not adressed by the current patch.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6d1890fc8e09be2c16677c9a0f4f71e70b3696b4)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 33150: Add specific message for informing about too_soon for renewal.
Andreas Jonsson [Mon, 6 Mar 2023 15:42:05 +0000 (16:42 +0100)]
Bug 33150: Add specific message for informing about too_soon for renewal.

The message "No renewals allowed" is incorrect when it is too soon for renewal,
this patch adds a specific error message.

To test:
- Make sure the system preference  SCOAllowCheckin is set to "allow"
- Go to Koha administration -> Circulation and fine rules
- Edit the rule for all items and change "No renewal before" to 1 and save.
- Check out an item to a borrower (for instance barcode 39999000000719 to the user koha with cardnumber 42).
- Go to self checkout (http://localhost:8080/cgi-bin/koha/sco/sco-main.pl)
- Log in as the user (koha/koha)
- Verify that the error message in the Renew column is "This item cannot yet be renewed."

Signed-off-by: Laura Escamilla <laura.escamilla@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 7f3a35a917412da6fd5eb3211a0ac6ab7c869e4c)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32684: (QA follow-up) Move too_many_lost to Patron
Marcel de Rooy [Wed, 8 Mar 2023 12:45:53 +0000 (12:45 +0000)]
Bug 32684: (QA follow-up) Move too_many_lost to Patron

Alternative implementation outside sub new.

Test plan:
Run t/db_dependent/SIP/Message.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e630624e5e0d6a1c1e14e2715b152be9aa139fe6)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32684: Implement SIP patron status field "too many items lost"
Kyle Hall [Thu, 19 Jan 2023 18:45:07 +0000 (13:45 -0500)]
Bug 32684: Implement SIP patron status field "too many items lost"

The SIP patron status and information responses always return false foe "too many items lost". It would be reasonable to check the count of lost items still checked out to the patron and compare that to a threshold set in the sip config file. Though not all libraries operate in this way, it seems like a good and reasonable implementation as long is it is properly documented.

This patch adds the ability to set the SIP "too many items lost" flag
for a patron based on the number of lost checkouts the patron has where
the lost flag on those items is greater than the given flag value.

For example, one could specify that the flag be set if the patron has
more than 2 items checked out where itemlost is greater than 3.

By default the feature is disabled to retain the existing functionality.
If enabled, the default itemlost minimum flag value is 1 unless
specified.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/SIP/Message.t

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 877f8ed89890d5666608749781b7ac0958900fe8)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 33144: Unescape text from authority lookup for advanced editor
Phil Ringnalda [Mon, 6 Mar 2023 05:24:56 +0000 (21:24 -0800)]
Bug 33144: Unescape text from authority lookup for advanced editor

While the basic editor is happy with an array of subfields it can
stuff into separate fields, the advanced editor needs to get a JS
string back from the authority lookup plugin, because it is going
to just add the whole thing as text. The string has to be HTML
entity encoded, both to not allow XSS and just to not break the
window, but it needs to then be unencoded before being inserted
into the editor.

Test plan:
1. Set the system preference EnableAdvancedCatalogingEditor to
   Enable
2. Edit any Topical Term authority, and at the end of tag 150
   subfield a, add & </script>
3. Cataloging - Advanced editor
4. Press return in the editor to get a new blank line, type 650
   and press tab three times, then type Ctrl-Shift-L
5. Search for your modified authority, and click Choose
6. Verify that the tiny popup opened by the search window finished
   its job and closed itself
7. Verify that your 650 now shows as "‡aAbduction &
   </script>‡vDrama" rather than "‡aAbduction  &amp;
   &lt;/script&gt;‡vDrama."

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e171d5fdd319ec9d955992c9340bb9a1530e3aaf)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32991: Don't display breadcrumb if pref is off
Jonathan Druart [Thu, 2 Mar 2023 10:04:23 +0000 (11:04 +0100)]
Bug 32991: Don't display breadcrumb if pref is off

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 89d374600702f1dea792aa8713e86464bae88cf1)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32991: Remove _is_loading warning, and improve 'ERMModule' disabled warning
Agustin Moyano [Wed, 1 Mar 2023 15:56:55 +0000 (12:56 -0300)]
Bug 32991: Remove _is_loading warning, and improve 'ERMModule' disabled warning

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e4bb554eb5adf30a40dcd54153b4d24618b9164d)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32991: Add cypress tests for the dialog box
Jonathan Druart [Tue, 28 Feb 2023 11:21:54 +0000 (12:21 +0100)]
Bug 32991: Add cypress tests for the dialog box

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dc40b5dd08a60657e4df9f966cf0aa53644ce927)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32991: Don't remove all messages when confirm box is closed
Jonathan Druart [Tue, 28 Feb 2023 10:48:55 +0000 (11:48 +0100)]
Bug 32991: Don't remove all messages when confirm box is closed

If we cancel the confirmation box we should not clear all the messages

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8cee1f287d81eb1693c1bde564a0a1b6d85affd2)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32991: Flag the deletion messages as displayed already
Jonathan Druart [Tue, 28 Feb 2023 10:21:48 +0000 (11:21 +0100)]
Bug 32991: Flag the deletion messages as displayed already

Or they will be displayed again on the next view

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5709727aae2ea1687506752fde2f91d504a91eca)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32991: Fix cypress tests. Added new test for when deleting from show view.
Pedro Amorim [Fri, 24 Feb 2023 16:06:31 +0000 (16:06 +0000)]
Bug 32991: Fix cypress tests. Added new test for when deleting from show view.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 48b39533f6855e8966ce8704985fbb01d99ced51)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32991: Agreements: Add delete dialog to show. Removed FormConfirmDelete component...
Pedro Amorim [Mon, 27 Feb 2023 15:22:48 +0000 (15:22 +0000)]
Bug 32991: Agreements: Add delete dialog to show. Removed FormConfirmDelete component and routes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f98c63820f4fdddfc0402f2911c397ba735f57b5)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32991: Licenses: Add delete dialog to list and show. Removed FormConfirmDelete...
Pedro Amorim [Fri, 24 Feb 2023 17:01:15 +0000 (17:01 +0000)]
Bug 32991: Licenses: Add delete dialog to list and show. Removed FormConfirmDelete component and routes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0e63e366ca0094527699eb4f4b051d0e975e2d1f)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32991: Local Packages: Add delete dialog to list and show. Removed FormConfirmDel...
Pedro Amorim [Fri, 24 Feb 2023 18:30:54 +0000 (18:30 +0000)]
Bug 32991: Local Packages: Add delete dialog to list and show. Removed FormConfirmDelete component and routes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dbb606983c9524efb390a100111e8f2214e09fa0)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32991: Local titles: Add delete dialog to list and show. Removed FormConfirmDelet...
Pedro Amorim [Mon, 27 Feb 2023 11:08:35 +0000 (11:08 +0000)]
Bug 32991: Local titles: Add delete dialog to list and show. Removed FormConfirmDelete component and routes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 70a4d4e0b42e7a1b789565806c292b691fa3481b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32991: Allow for a confirmation title, message, accept_label and cancel_label...
Pedro Amorim [Mon, 27 Feb 2023 15:09:41 +0000 (15:09 +0000)]
Bug 32991: Allow for a confirmation title, message, accept_label and cancel_label in Dialog.vue

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a8d6d80ad58f864bab7513d7d6f57275984dba39)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32991: accept is a callback, rename accept to accept_callback
Pedro Amorim [Fri, 24 Feb 2023 17:10:03 +0000 (17:10 +0000)]
Bug 32991: accept is a callback, rename accept to accept_callback

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5ceccfe0ad22b7773acf281e769b6b921d8f2610)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32991: Style the dialog to be in line with rest of Koha; Fix duplicate HTML eleme...
Pedro Amorim [Fri, 24 Feb 2023 11:32:29 +0000 (11:32 +0000)]
Bug 32991: Style the dialog to be in line with rest of Koha; Fix duplicate HTML element ID

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 46a72d54a0a05134c52378d7b4a5d9769162a47b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32991: Add a confirmation message
Jonathan Druart [Fri, 17 Feb 2023 10:45:43 +0000 (11:45 +0100)]
Bug 32991: Add a confirmation message

Looks easier to have a separate variable for the confirmation box, and
easier for styling as well.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 754c9f2862c63bdfc03a432e498b1b68d4c0c856)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 32991: Improve our Dialog component
Jonathan Druart [Fri, 17 Feb 2023 10:26:38 +0000 (11:26 +0100)]
Bug 32991: Improve our Dialog component

This is picking some improvements made by Agustin on bug 32607.
This patch is only a POC and we should apply this change to the
different delete route.

We will then remove the *FormConfirmDelete components, and the /delete routes

Initially I wanted to have the same behaviour as in other areas of Koha,
and have a separate view for the deletion step. But it's too much
overhead for not much gain.

Additionally we will have to remove messages.js, the aim of this file
was to import the methods to add messages very easily (only 1 import
line). Now we will need 2 lines (it was more when I added messages.js,
because I didn't inject the store). Not a big deal.

Finally, there is something weird in Main.vue we need to fix. The
console is showing a warning
"[Vue warn]: setup() return property "_is_loading" should not start with "$" or "_" which are reserved prefixes for Vue internals."

I had a hard time to display this "loading" modal when the app is
loading all the things it needs. Pinia/store is not available as we are
accessing the methods/actions too earlier. It will be good to fix that
before we decide to move forward with this approach.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0b380ecfa3f462f52758ceadb4e4161c7806dc60)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
15 months agoBug 33214: (RMaint follow-up) Remove tests for unbackported feature
Martin Renvoize [Tue, 14 Mar 2023 14:49:19 +0000 (14:49 +0000)]
Bug 33214: (RMaint follow-up) Remove tests for unbackported feature

We haven't backport the strings_map functionality, so we don't need the
fixes to the tests for it here.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32994: Remove breaking css/maps/*.map files from Makefile.PL
Mason James [Tue, 21 Feb 2023 02:01:21 +0000 (15:01 +1300)]
Bug 32994: Remove breaking css/maps/*.map files from Makefile.PL

to test:
 - run makefile, note failure

  $ perl Makefile.PL
  $ make
  $ make install
  webpack 5.74.0 compiled with 3 warnings in 20831 ms
  Done in 36.01s.
  make: *** No rule to make target 'koha-tmpl/opac-tmpl/bootstrap/css/maps/opac-rtl.css.map', needed by 'pm_to_blib'.  Stop.

 - apply patch
 - run makefile, note success

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 587ab3ddb850398cd1ba26b8ff2b9369651b7a67)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 33214: (follow-up) Make tests less fragile
Tomas Cohen Arazi [Mon, 13 Mar 2023 19:53:25 +0000 (16:53 -0300)]
Bug 33214: (follow-up) Make tests less fragile

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 12e3e91c134d9900a9712433618ae891197500e6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33214: (follow-up) Consistency on key names
Tomas Cohen Arazi [Mon, 13 Mar 2023 19:42:26 +0000 (16:42 -0300)]
Bug 33214: (follow-up) Consistency on key names

This patch makes GetAuthorisedValueDesc used cache keys match what we
discussed on the bug, which seems to have been lost on some rebase and
highlighted by failing tests.

I also add some more cache flushes.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 52315d60f38165195b86b49c771d1861084dc9dd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32781: Prevent import from list to fail if package does not exist
Jonathan Druart [Wed, 1 Feb 2023 15:23:59 +0000 (16:23 +0100)]
Bug 32781: Prevent import from list to fail if package does not exist

This is theorical (caught when writting tests) but we need to deal with
it.

Can't call method "resources" on an undefined value at /kohadevbox/koha/Koha/BackgroundJob/CreateEHoldingsFromBiblios.pm line 94.

Test plan:
  prove t/db_dependent/Koha/BackgroundJob/CreateEHoldingsFromBiblios.t
must return green

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 71bf715596769577766cbf8c21972826e766e97f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33214: Make tests use random data and clear the cache
Tomas Cohen Arazi [Mon, 13 Mar 2023 17:29:18 +0000 (14:29 -0300)]
Bug 33214: Make tests use random data and clear the cache

This trivial patch removes some wrongly hardcoded bits, and makes the
tests also clear the cache before and after being run.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit db8261ef5e921de51e6fce0bb3a93f5c3349d040)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 30920: (follow-up) Manually flush caches in tests
Martin Renvoize [Fri, 10 Mar 2023 16:34:26 +0000 (16:34 +0000)]
Bug 30920: (follow-up) Manually flush caches in tests

We can't rely on our cache flushing in either 'store' or 'delete'
triggers as t/lib/TestBuilder::build_object skips the Koha::Object store
and uses direct DB inserts in preference.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b4c9a6cfe23a47cd9a3cb5c6a74c51b36dc15855)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 30920: (follow-up) Cleanup warning from C4::Biblio::GetAuthorisedValueDesc
Martin Renvoize [Fri, 10 Mar 2023 16:33:44 +0000 (16:33 +0000)]
Bug 30920: (follow-up) Cleanup warning from C4::Biblio::GetAuthorisedValueDesc

We simply return early and empty if $value is not passed

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e8d76d6f98d0f28d6f1804a1435da2f4c229441)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 30920: (follow-up) Flush on delete
Martin Renvoize [Fri, 10 Mar 2023 15:26:45 +0000 (15:26 +0000)]
Bug 30920: (follow-up) Flush on delete

We missed the flush on delete triggers for the various caches introduced
here.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f7164385559002216810656fb51f89a3b2892a2b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 30920: (follow-up) Cache key fixes
Martin Renvoize [Fri, 10 Mar 2023 15:11:51 +0000 (15:11 +0000)]
Bug 30920: (follow-up) Cache key fixes

We missed a few places, namely the flushes, when renaming the cache
keys.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d9d79566991dadfaca1a058989d03358a1df6ce)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 30920: (QA follow-up) Use get_dirty_columns to avoid DB query
Tomas Cohen Arazi [Fri, 10 Mar 2023 12:07:26 +0000 (09:07 -0300)]
Bug 30920: (QA follow-up) Use get_dirty_columns to avoid DB query

We can rely on DBIC's get_dirty_columns to check if the descriptions
have changed, and set things for flushing without an extra DB query.

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 a44f03c7156cce4ff1ae55da3772f98e7b5e89b6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 30920: (follow-up) Add missing use
Nick Clemens [Fri, 17 Jun 2022 13:36:13 +0000 (13:36 +0000)]
Bug 30920: (follow-up) Add missing use

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 dde86f08fcc359d57dc94ca5b218ddfb791c342c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 30920: Add caching to GetAuthorizedValueDesc
Martin Renvoize [Thu, 26 May 2022 15:31:30 +0000 (16:31 +0100)]
Bug 30920: Add caching to GetAuthorizedValueDesc

This patch adds caching to C4::Biblio::GetAuthorisedValueDesc for performance.

We cache each hash involved in the method use for description lookup and
we're careful to clear said caches appropraitely on changes.

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 ab866f040dc72da28ed59f3bf16505bfba47ed21)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33211: Fix failing test
Nick Clemens [Mon, 13 Mar 2023 14:39:03 +0000 (14:39 +0000)]
Bug 33211: Fix failing test

This patch updates the selector to use the full class and find the text
type as well

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 587615fd9f63e74fdb42f7832845fe52e3f17a74)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 31858: (RMaint follow-up) Fix test plan
Martin Renvoize [Tue, 14 Mar 2023 07:20:49 +0000 (07:20 +0000)]
Bug 31858: (RMaint follow-up) Fix test plan

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32519: In Elasticsearch mappings table use of search field name and label
Fridolin Somers [Fri, 23 Dec 2022 06:15:09 +0000 (20:15 -1000)]
Bug 32519: In Elasticsearch mappings table use of search field name and label

In Elasticsearch mappings table, in tabs for mappings we should add search field name in addition to label ; in order to find them when searching using DataTable search field. This is very useful when debugging.

Also the lines are sorting alphabetically by search field name.
So I propose to display name and label between parenthesis.
And also add label to the form in last line.

By default label equals name so I display label only if different from name.

Test plan :
1) Go to : Administration > Search engine configuration (Elasticsearch)
2) In first tabe edit a line to change label, for example : author => Auteur
3) Save
4) Go to second tab
5) Check you see a line with 'author (Auteur)' and lines with only name when label equals name
6) Look at last line (addition form)
7) Check you see in combobox : 'author (Auteur)' and lines with only name when label equals name

Signed-off-by: Solene Ngamga <solene.ngamga@inLibro.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 14a2cc60a404709edc97f6daed8ad8e00dd884e8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32952: Standardize action fieldsets in authorities, cataloging, and circulation
Owen Leonard [Wed, 1 Feb 2023 11:58:04 +0000 (11:58 +0000)]
Bug 32952: Standardize action fieldsets in authorities, cataloging, and circulation

This patch updates some templates in authorities, cataloging, and
circulation so that fieldsets with the "action" class are placed outside
the form's main fieldset.

To test, apply the patch and check the following pages to confirm that
changes to form structure look correct:

- Authorities -> Authority search -> Merge
- Catalog -> Search -> Merge records
- Catalog -> Bibliographic record details -> Edit -> Attach item
- Circulation -> Check out to patron -> Batch check out
- Circulation -> Overdues -> Sidebar filter
- Circulation -> Holds to pull -> Sidebar filter

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 b27dd883ca19eb1594507271aa7b8d1bd7caf328)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32683: Convert header search tabs to Bootstrap
Owen Leonard [Thu, 19 Jan 2023 19:04:53 +0000 (19:04 +0000)]
Bug 32683: Convert header search tabs to Bootstrap

This patch updates all search header include files so that they have
Bootstrap tab markup instead of jQueryUI. jQueryUI-related JavaScript is
updated to work with Bootstrap.

To test, apply the patch and rebuild the staff interface CSS. Clear your
browser cache if necessary.

Test that keyboard shortcuts work correctly: Alt-U for circulation,
Alt-R for returns, Alt-W for renewals, and Alt-Q for search. Each
shortcut should either activate the correct search tab (if present on
the page) or redirect you to that page.

Cursor focus should be automatically placed in expanded header search
form, whether it be on page load or when switching tabs.

Test search header forms with additional search options work correctly:
Clicking the "settings" icon should expand the panel with additional
fields.

Test at least one page which uses each include file:

- acquisitions-search.inc
  - Acquisitions and related pages
- adv-search.inc
  - Advanced catalog search
- authorities-search.inc
  - Authorities and related pages
  - Check that the right tab is preselected after each kind of search,
e.g. a search by "Main heading" should return a search results page
where the "Main heading" tab is preselected.
- budgets-admin-search.inc
  - Administration -> Budgets
- cat-search.inc
  - Catalog search results, bibliographic details, etc.
- cataloging-search.inc
  - Cataloging home page and cataloging search results
- checkin-search.inc
  - Circulation -> Check in
- circ-search.inc
  - Circulation -> Check out
- cities-admin-search.inc
  - Administration -> Cities and towns
- contracts-admin-search.inc
  - Acquisitions -> Vendor -> Contracts
- currencies-admin-search.inc
  - Administration -> Currencies
- desks-admin-search.inc
  - Administration -> Desks (must have UseCirculationDesks enabled)
- erm-search.inc
  - ERM (must have ERMModule enabled)
- home-search.inc
  - Staff interface home page
- letters-search.inc
  - Tools -> Notices
- patron-search-header.inc
  - Patron details, patron accounting, etc.
- patrons-admin-search.inc
  - Administratoin -> Patron categories
- prefs-admin-search.inc
  - Administration home page and system preferences
- serials-search.inc
  - Serials and related pages
- suggestions-add-search.inc
  - Not used
- z3950-admin-search.inc
  - Administration -> Z39.50 servers

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 5e6992b600f0b1ee655429e35c6be49416ccfaca)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32886: Set focus for cursor to Code when adding a new restriction
Owen Leonard [Tue, 7 Feb 2023 13:40:29 +0000 (13:40 +0000)]
Bug 32886: Set focus for cursor to Code when adding a new restriction

This patch adds the "focus" class to the form for defining a new patron
restriction so that the cursor focus is automatically added.

To test, apply the patch and go to Administration -> Patron restrictions
-> New restriction.

The cursor should automatically move to the "Code" input field.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 546c47ab3fcd380ee3f7be5902fd969d0ebbc3a8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32746: Standardize structure around action fieldsets in acquisitions
Owen Leonard [Mon, 30 Jan 2023 15:45:32 +0000 (15:45 +0000)]
Bug 32746: Standardize structure around action fieldsets in acquisitions

This patch updates acquisitions templates so that fieldsets with the
"action" class are placed outside the form's main fieldset. A couple of
minor changes have been made to related CSS.

To test, apply the patch and rebuild the staff interface CSS. Go to
acquisitions and check the following pages to confirm that changes to
form structure look correct:

- Open the "Late orders" page from the left-hand sidebar menu and check
  the form in the sidebar.
- Open the "Orders search" form in the search header and submit the form
  without specifying any search criteria. This should bring up a blank
  orders search form.
- Open the "Invoices" page from the left-hand sidebar menu. Check the
  form in the sidebar.
  - Perform an invoice search which will return results.
  - View one of the invoices returned by your search.
  - On the invoice detail age, the "Save" button associated with the
    invoice details at the top should look correct.
  - There should be a box below that with the heading "Adjustments" and
    a link to add an adjustment.
  - When you click "Add an adjustment," a form should be displayed with
    the correct controls at the bottom. Clicking "Cancel" should hide
    the form.
  - Click the "Manage invoice files" link, and check the form on that
    page.
- Locate a vendor and view its details.
  - Check the "Uncertain prices" page, linked from the menu in the
    left-hand sidebar.
  - Open the "Baskets" page from the left-hand sidebar. Click the "Add
    to basket" button for one of the existing baskets.
  - Click "From existing orders (copy)". Check that this form looks
    correct.
  - Open the "Basket groups" page from the left-hand sidebar menu.
    - Click "New basket group" and check that form.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1c8c90611967bd667e1e5e86f871541564d66b4b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33063: Make sure correct subgroup is pre-selected when duplicating reports
Katrin Fischer [Mon, 27 Feb 2023 23:45:12 +0000 (23:45 +0000)]
Bug 33063: Make sure correct subgroup is pre-selected when duplicating reports

When the 'Duplicate' option for reports was used, the all options
would be copied correctly to the new report, but the report sub group.

In this case the templates were created correctly, but the JavaScript
to create the correct pull downs for each group, overwrote the
the selection.

To test:
* Create a some reports with different groups and subgroups and without
* 'Duplicate' your reports and verify that the sub group will always stay empty
* Apply patch
* Verify the correct sub group is now always selected
* Edit/Add some reports to make sure the group/subgroup controls still
  work as expected

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a651ff50a6819396cc24c5f6bc47110cdd001873)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33031: Update OPAC lists page to use Bootstrap markup for tabs
Owen Leonard [Tue, 21 Feb 2023 19:52:28 +0000 (19:52 +0000)]
Bug 33031: Update OPAC lists page to use Bootstrap markup for tabs

This patch updates the OPAC lists page with Bootstrap markup for the
static tabs used to link to private and public shelves. These tabs are
not dependent on JavaScript.

To test, apply the patch and click "Lists" -> "Public lists" in the
OPAC. The "Your lists" and "Public lists" tabs should look correct, and
each should link to the correct view.

Signed-off-by: Jacob O'Mara <jacob.omara@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 65374826d2c749973c08722e94e7647251bbf4da)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 31858: unit tests
Alex Arnaud [Wed, 19 Oct 2022 14:36:18 +0000 (14:36 +0000)]
Bug 31858: unit tests

Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b5e462b5c4631c0fb58aaa40c3f2102bd5fa32e5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 31858: add TT syntax for ACQORDER notices
Alex Arnaud [Wed, 19 Oct 2022 11:42:19 +0000 (11:42 +0000)]
Bug 31858: add TT syntax for ACQORDER notices

Test Plan:
    1) Set your ACQORDER notice content to:
        [%- USE Price -%]
        [% bookseller.name %]
        [% FOREACH order IN orders %]
        Ordernumber [% order.ordernumber %] ([% order.biblio.title %] - [% order.biblio.biblioitem.publicationyear %]) (quantity: [% order.quantity %]) ($[% order.listprice | $Price %] each).
        [% END %]
        Thank you,
        [% branch.branchname %]
    2) Set up a vendor with an email, set contact for email so the "E-mail
        order" button shows on a basket for that vendor
    3) E-mail the basket
    4) Check the content is correct

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 09ceb26b572ac6a0a0f0bc2a5172327d26bc641f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33090: Add page-section to accountline-details
Martin Renvoize [Tue, 28 Feb 2023 16:40:34 +0000 (16:40 +0000)]
Bug 33090: Add page-section to accountline-details

This patch adds page-section containers to the accountlines details
display page.

Note: This patch contains whitespace changes, so use diff accordingly.

To test, apply the patch and locate a patron with charges on their
account (lost item fee, account renewal fee, overdue fine, etc).

- From the patron detail page, click the "Accounting" tab in the sidebar
  menu.
- Click the "Transactions" tab.
- Click the "Details" button for an individual charge.
- On the transaction detail page, confirm that the page sections look
  correct.

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 0ef8e6aff959c54622897f77eded0c3ae6772bf4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33189: Make plugin upload look for .kpz files in file picker
David Cook [Fri, 10 Mar 2023 05:23:24 +0000 (05:23 +0000)]
Bug 33189: Make plugin upload look for .kpz files in file picker

This change configures the file picker to look for *.kpz files instead
of *.* files, which makes it more convenient to locate .kpz files
for upload when uploading plugins.

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/plugins/plugins-upload.pl
2. Click on "Choose file"
3. Note that the file type in the box at the bottom right of the screen
defaults to "KPZ File (*.kpz)
4. If you navigate to a directory that contains .kpz files (like Downloads),
you'll now see directory folders and .kpz files.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bb3fecd0461e91df9a907a85ea58bc5100ad3885)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32675: Fix guarantor selection when simple quote present
Jonathan Druart [Wed, 22 Feb 2023 15:31:54 +0000 (16:31 +0100)]
Bug 32675: Fix guarantor selection when simple quote present

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e4665cc2baabe6bdcd1260492401f07e5f6e3d4f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33173: Save and continue button in standard cataloging module broken
Nick Clemens [Wed, 8 Mar 2023 18:49:57 +0000 (18:49 +0000)]
Bug 33173: Save and continue button in standard cataloging module broken

To test:
1 - Edit a record in the standard editor
2 - Click on to tab 2
3 - Click 'Save and continue'
4 - Error: tab is not defined
5 - Apply patch
6 - Reload page and try again
7 - Fixed!

Signed-off-by: Laura Escamilla <laura.escamilla@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 35e117fb91e794d77b47f8668c0f9e1a1ddd4e63)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32975: Error in package.json's definition of css:build vs css:build:prod
Owen Leonard [Wed, 15 Feb 2023 18:19:14 +0000 (18:19 +0000)]
Bug 32975: Error in package.json's definition of css:build vs css:build:prod

The "css:build" command runs "gulp css && gulp css --view opac",
processes that build CSS in a development context.

The "css:build:prod" currently runs "gulp build && gulp css --view
opac", which runs the production-oriented command "gulp build" (for the
staff interface), but runs "gulp css --view opac" which is the same
devel-environment command as above.

It should be "gulp build && gulp build --view opac"

To test, apply the patch and run the two commands and check these two
files to confirm the difference:

koha-tmpl/intranet-tmpl/prog/css/staff-global.css
koha-tmpl/opac-tmpl/bootstra/css/opac.css

"yarn css:build" should create unminimized versions of those files.
"yarn css:build:prod" should create minimized versions.

Signed-off-by: David Nind <david@davidnind.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 bc43c6e7febd49000696a4e0d3b42580fcb8910e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32609: Use the current yarn.lock to generate node_modules
Jonathan Druart [Wed, 1 Feb 2023 07:47:04 +0000 (08:47 +0100)]
Bug 32609: Use the current yarn.lock to generate node_modules

See comment 34 and https://tree.taiga.io/project/joubu-koha-erm/us/127

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 73b20abfb3f340adb4e1ac1880fb70ae6bfd2d77)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32609: (follow-up) enhance Makefile.PL
David Cook [Tue, 31 Jan 2023 02:31:37 +0000 (02:31 +0000)]
Bug 32609: (follow-up) enhance Makefile.PL

This patch adds a new target to the Makefile which gets
called as the first step of the "all" target. This means
that CSS and JS files get compiled every time "make" is
called.

(Note: Since the "install" target depends on "all", it will
 be re-run at install time.)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 550bb87ecb619dedb5d42a82cde46506e141c26f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32609: (follow-up) Add build-resources.PL
Martin Renvoize [Mon, 30 Jan 2023 16:16:07 +0000 (16:16 +0000)]
Bug 32609: (follow-up) Add build-resources.PL

This patch adds a trivial perl wrapper around the yarn build and calls
it from Makefile.PL.

I 'think' this is all we need to get packaging, dev and standard
installs happy with the lack of our compiled files in source.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6cf1a2654ce561bb20871d40d1878fd63c1f1284)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32609: Add warning to the about page
Jonathan Druart [Wed, 11 Jan 2023 14:42:55 +0000 (15:42 +0100)]
Bug 32609: Add warning to the about page

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4aaf5aa33a1161b2c7385596dd7d8ea881490c43)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32609: Remove CSS and JS compiled files
Jonathan Druart [Wed, 11 Jan 2023 14:20:28 +0000 (15:20 +0100)]
Bug 32609: Remove CSS and JS compiled files

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dcf772cb7026b4ed21caf6b055f8260140dcefdb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32609: Remove CSS and JS compiled files
Jonathan Druart [Wed, 11 Jan 2023 14:20:28 +0000 (15:20 +0100)]
Bug 32609: Remove CSS and JS compiled files

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 10873a572893f83633cb398d7936a7564c1e5e50)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32609: Add compiled css files to gitignore
Jonathan Druart [Wed, 11 Jan 2023 14:00:52 +0000 (15:00 +0100)]
Bug 32609: Add compiled css files to gitignore

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6a1fccbb29bc3897f3853305b898ebec63237d70)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32609: Improve yarn build commands
Jonathan Druart [Wed, 11 Jan 2023 12:46:33 +0000 (13:46 +0100)]
Bug 32609: Improve yarn build commands

We had:
yarn css # Build staff css
yarn css --view opac # Build OPAC css
yarn build # Nothing, was broken
yarn watch # Nothing, was broken
yarn build_js # Build JS/Vue
yarn watch_js # Watch JS/Vue

This patch is suggesting to have something more consistent:
yarn css:build      # Build CSS for OPAC and staff (dev)
yarn css:build:prod # Build CSS for OPAC and staff (prod)
yarn css:watch      # Watch CSS for OPAC and staff (dev)
yarn js:build       # Build JS (dev)
yarn js:build:prod  # Build JS (prod)
yarn js:watch       # Watch JS (dev)
yarn build          # Same as css:build and js:build (dev)
yarn build:prod     # Same as css:build:prod and js:build:prod (prod)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9bdca7f216e525045d3426e67daf1cf815257ad4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32609: Remove JS vars from gulpfile
Jonathan Druart [Wed, 11 Jan 2023 12:45:56 +0000 (13:45 +0100)]
Bug 32609: Remove JS vars from gulpfile

They are not used.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2285b184bb2ba6b97b81862a2dcea3e0b571951d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32492: (follow-up) Add missing HTML filters
Owen Leonard [Mon, 13 Feb 2023 13:37:32 +0000 (13:37 +0000)]
Bug 32492: (follow-up) Add missing HTML filters

Signed-off-by: Owen Leonard <oleonard@myacpl.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 6ca181083405d453a0d54eff309d36c0896c6d79)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32492: Add IDs to the rows of the patron messaging table in OPAC and staff interface
Katrin Fischer [Fri, 10 Feb 2023 22:28:40 +0000 (23:28 +0100)]
Bug 32492: Add IDs to the rows of the patron messaging table in OPAC and staff interface

Sometimes you want to hide notice from the messaging options
becaue the library is not using it. With this patch, we'll
have unique IDs on the <tr> to do so easily.

To test:
* Look at the messaging preferences
  * in the OPAC messaging tab
  * in the staff interface details tab
  * in the staff interface patron edit form
* Verify there are no classes or IDs on the rows or other elements
* Apply patch
* Verify there are nice IDs now on the table rows (tr elements)
  for each message.

Signed-off-by: Owen Leonard <oleonard@myacpl.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 7371ee848ffd12ea92bb5e7c33916b15cb8e54fd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32679: Use different CSS classes for titles of article requests in staff interface
Katrin Fischer [Fri, 20 Jan 2023 13:51:53 +0000 (13:51 +0000)]
Bug 32679: Use different CSS classes for titles of article requests in staff interface

The class article-request-title was used for the column with the
article title as well as for the link with the record title. This could
cause some confusion when changing the table with CSS. This patch makes
it so different CSS classes are used for each.

To test:
* Activate article requests in system preferences
* Make sure circulation conditions have article requets = yes
* Create an article request in staff or OPAC
* View the list of article requests in the patron account in staff
* Add the following line to IntranetUserCSS:
  .article-request-title { display:none; }
* Verify the Title column and the title from Record title (first column)
  have vanished.
* Apply patch: now only the column should vanish, Record title shoudl remain
  visible
* If you want: Verify that the record title has a differently named
  class now.

Signed-off-by: Owen Leonard <oleonard@myacpl.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 974563bfeee29eedbd1b1475fd73599959285cb1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32658: (follow-up) Use more unique variable name to avoid collisions
Owen Leonard [Mon, 6 Feb 2023 16:21:44 +0000 (16:21 +0000)]
Bug 32658: (follow-up) Use more unique variable name to avoid collisions

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d3312fc1c9ee11b0b13781b9a89625f4e8258dc3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32658: Use template wrapper in order from staged file template
Owen Leonard [Tue, 17 Jan 2023 19:28:04 +0000 (19:28 +0000)]
Bug 32658: Use template wrapper in order from staged file template

This patch implements the template WRAPPER system (see Bug 32571) for
building tabs on the page for adding to a basket from a staged
file.

To test you need an active vendor, at least one basket for that vendor,
and a staged MARC file.

Apply the patch and go to Acquisitions -> Vendor -> Basket -> Add to
basket -> From a staged file.

- Click "Add to orders" on one of your staged files.
- On the "Add orders from..." page you should see three tabs, the first
  one active.
- Tabs should look correct and work correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 09717bb20d83fee1b3fee2f3fcd1605a9e5c5489)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33000: (follow-up) Add spans for translatability
Owen Leonard [Thu, 23 Feb 2023 22:29:16 +0000 (22:29 +0000)]
Bug 33000: (follow-up) Add spans for translatability

This patch finds places in the updated breadcrumbs markup where a
translatable string is isolated in a way that makes it hard for the
translation script to find it, and wraps these strings with <span>

This follow-up includes a change to admin/cities.tt as well.

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 95891fe1e80363fb11cbd9a37f6fa5243f37ead9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33000: Use template wrapper for breadcrumbs: Acquisitions part 1
Owen Leonard [Thu, 5 Jan 2023 18:40:06 +0000 (18:40 +0000)]
Bug 33000: Use template wrapper for breadcrumbs: Acquisitions part 1

This patch updates several acquisitions-related templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Acquisitions home
  - Vendor search results
  - Basket details
    - Cancel order
    - Create EDIFACT order
    - Basket edit
    - Basket deletion confirmation
    - Add to basket
      - From a staged MARC file
      - From existing orders (copy)
  - Basket groups (create, edit)
  - EDIFACT messages

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 3e3b27f87dc5c7be117f117113a75de0dad7fef6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33068: Use template wrapper for breadcrumbs: Administration part 3
Owen Leonard [Fri, 6 Jan 2023 16:09:42 +0000 (16:09 +0000)]
Bug 33068: Use template wrapper for breadcrumbs: Administration part 3

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

Note: The patch includes indentation changes, so ignore whitespace
when viewing the diff.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

Administration ->
 - Circulation and fine rules -> Clone rules
 - Table settings
 - Credit types ->
   - New credit type
   - Edit credit type
 - Curbside pickup
 - Currencies and exchange rates ->
   - New currency
   - Edit currency
   - Confirm deletion
 - Debit types ->
   - New debt type
   - Edit debit type
 - Desks ->
   - New desk
   - Edit desk
   - Confirm deletion
 - Did you mean?
 - EDI accounts
   - New account
   - Edit account
   - Confirm deletion

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 dbb3c88cfcbbcdf9bd2d72139948845571229fd5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33155: Fix category and library filters in patron search header
Jonathan Druart [Tue, 7 Mar 2023 12:55:19 +0000 (13:55 +0100)]
Bug 33155: Fix category and library filters in patron search header

Caused by
  commit f1925cf89dbc1039fc48abfabad1472289387148
  Bug 7380: Rename filter to avoid confusion

     [% IF categorycode %]
-        $("#categorycode_filter").val("[% categorycode %]");
+        $("#categorycode_filter").val("[% categorycode_filter %]");
     [% END %]
     [% IF branchcode %]
-        $("#branchcode_filter").val("[% branchcode %]");
+        $("#branchcode_filter").val("[% branchcode_filter %]");
     [% END %]

Forgot to rename the vars in the IF statements

Test plan:
Go to the Koha mainpage
Click "Search patrons" in the headers
Open the filters
Select something for library and category, search
=> The values must be picked for the patron search

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 79e4aabc31c85fc32f2f09599818fd7b4dff117f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32558: (QA follow-up) Move ForkManager to required
Marcel de Rooy [Tue, 7 Mar 2023 12:12:48 +0000 (12:12 +0000)]
Bug 32558: (QA follow-up) Move ForkManager to required

Thx Martin Renvoize for noting this.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8e1556b3fcede038d3a7c38d33d884522d70fc7d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32819: Fix cataloguing/value_builder/stocknumberam123.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32819: Fix cataloguing/value_builder/stocknumberam123.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

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 cc59823fa3cc25f79a4b247d6c66a07dfedbf045)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
16 months agoBug 32815: Fix cataloguing/value_builder/callnumber.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32815: Fix cataloguing/value_builder/callnumber.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

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 aa726e5329cda74f78e97c6ce379cfba93ea26f4)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
16 months agoBug 31665: Set today date for date cataloguing plugin
Jonathan Druart [Wed, 1 Feb 2023 09:47:27 +0000 (10:47 +0100)]
Bug 31665: Set today date for date cataloguing plugin

dateaccessioned.pl must pick today's date when the input gets the focus
on.

Test plan:
Edit an item, or create a new one.
Confirm that today's date is prefilled into the date's input when it's
empty and that it gets the focus on

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Michael Adamyk <madamyk@ckls.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 140493faf71b2545a41032b1d0db5d11f1db5f65)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>