Commit graph

50629 commits

Author SHA1 Message Date
7af0354964 Bug 28012: (QA follow-up) Add numeric imput mode to display order field
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 49138a6df7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9be82743f1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:08:53 +00:00
Joonas Kylmälä
aa3415ff3f Bug 28012: Creating numbering pattern: mark mandatory fields required
If any of these fields were missing, notably the Numbering formula
then saving the new numbering pattern silently failed, it didn't give
any error but it didn't save any new pattern either.

Note that there is a plan to make description field optional, so even
if it currently is mandatory on the DB level we leave it optional
here (and due to people using production DB's in non-strict mode which
allows this to be optional).

To test:
  1) After applying this patch make sure all the 3 fields must be
  filled in
  /cgi-bin/koha/serials/subscription-numberpatterns.pl?op=new
  page and it cannot be saved without those.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a69b5e6ee9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 77e7e11c3a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:08:53 +00:00
Joonas Kylmälä
8a9f2a05e0 Bug 28012: Use definedness test instead of bool when checking whether to null fields
Saving a new numbering pattern didn't work without having to fill all
the fields, even those that are not mandatory.

To test:
 1) Go to /cgi-bin/koha/serials/subscription-numberpatterns.pl
    and try creating a new pattern, notice that only Name and
    Description are mandatory after applying this patch
 2) Make sure editing existing numbering patterns still works

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 97aab6a98e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d4a81e4c2a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:08:53 +00:00
Julian Maurice
97939c87b7 Bug 35588: Tidy up t/db_dependent/AuthorisedValues.t
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 002e02710b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d95aa51639)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:05:02 +00:00
8c82b57649 Bug 35588: Scope authorised value desc lookup according to field/subfield
This patch ensures that the authorised value descriptions looked up
are for the correct field/subfield designated in the CSV profile.

Test plan:
0. Do not apply the patch yet!
1. Go to http://localhost:8081/cgi-bin/koha/tools/csv-profiles.pl
2. Add a CSV profile with the default values and using the following
for the "Profile MARC fields":
000|001|003|005|006|007|008|010|015|016|020|022|040|050|082|100|110|
111|130|240|243|245|246|247|250|260|300|336|337|338|440|490|500|501|
505|520|530|600|610|611|630|648|650|651|690|700|710|711|856|887|942|995

3. Create a new List
4. Add all the database's bibs to that list using SQL like the following (where the shelfnumber equals the number for your list):
insert into virtualshelfcontents (shelfnumber,biblionumber,borrowernumber) select 1,biblionumber,51 from biblio;

5. Go to that list in the staff interface
6. Download that list using your CSV profile

7. Apply the patch
8. koha-plack --reload kohadev

9. Download that list using your CSV profile
10. Note that the output is a little slower, but still quick enough.
11. Note that the output is a bit different. For records like "Gairm",
the output will end in "1" instead of "Yes". This is correct, because
this subfield isn't an authorised value!!!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f53ebe874e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6688687d93)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:05:02 +00:00
b9d05a7e3f Bug 35579: Add unit test
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ca754a2c5e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 548c9ce885)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:02:28 +00:00
1c8291f8ae Bug 35579: Cache authorised value lookup by MARC field
This patch adds a "get_descriptions_by_marc_field" method
which caches AuthorisedValue descriptions when searched by
MARC field, which is used when exporting MARC to CSV.

Test plan:
0. Do not apply the patch yet!
1. Go to http://localhost:8081/cgi-bin/koha/tools/csv-profiles.pl
2. Add a CSV profile with the default values and using the following for the "Profile MARC fields":
000|001|003|005|006|007|008|010|015|016|020|022|040|050|082|100|110|111|130|240|243|245|246|247|250|260|300|336|337|338|440|490|500|501|505|520|530|600|610|611|630|648|650|651|690|700|710|711|856|887|942|995|952|952$c
3. Create a new List
4. Add all the database's bibs to that list using SQL like the following (where the shelfnumber equals the number for your list):
insert into virtualshelfcontents (shelfnumber,biblionumber,borrowernumber) select 1,biblionumber,51 from biblio;
5. Go to that list in the staff interface
6. Download that list using your CSV profile
7. Apply the patch
8. koha-plack --reload kohadev
9. Download that list using your CSV profile
10. Note that the output is the same, but that the output completes much more quickly after applying the patch

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 78c0e8df8d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 423c240339)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:02:27 +00:00
Julian Maurice
f4eb54dd6b Bug 31694: Add missing TT filters
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 47ffdaf6f4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a3e35b0548)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 21:55:16 +00:00
Kevin Carnes
b2f77bd7bb Bug 31694: (follow-up) Use values for operations to avoid translation issues
To test:
    * Try adding a preset rule that has an operation with different translations
      for the column and the pull down (e.g. Outrepasser for fr-CA)
    * Without the patch it appears as Custom (e.g. Personnalisé)
    * With the patch it appears correctly (e.g. Outrepasser)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e9c7f84896)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a0db31d75f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 21:55:16 +00:00
Shi Yao Wang
4c83ac6e5c Bug 31694: (follow-up) Fix preset display issue
Preset column should now display the right preset.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 35ddacf397)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d6511233b8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 21:55:16 +00:00
Katrin Fischer
5297dfd361 Bug 31694: (follow-up) Further improve translatability
To test:
* Add rules fo different modules and with different settings
* Verify the saved module description for a saved rule matches the pull down
* Verify the saved filter matches the pull downs (especially for source and patron category)

Also:
* Renames 'User category' to 'Patron category'
* Remove some values from translations, that shouldn't be translated, like value attributs for options.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b1cd199aaa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4595fdf0de)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 21:55:16 +00:00
Caroline Cyr La Rose
b9402cb596 Bug 31694: MARC overlay rules presets don't change anything if presets are translated
This patch corrects option value names in MARC overlay rules to prevent
them from being translated.

To test:
1. Install a new language
1.1. In a terminal, run the following commands
gulp po:update
cd misc/translator
./translate install xx-XX
1.2. Go to Administration > Global system preferences
1.3. Search for language
1.4. In the language syspref check the box for the language you just installed
1.5. Save
2. In the staff interface in English, go to Administration > Record
overlay rules
3. In the column 'Preset' try the various options, note that the
'Added', 'Appended', 'Removed', and 'Deleted' settings change depending
on the chosen preset
4. Change the interface language
5. Redo step 3, notice that if the preset name is translated, the other
settings don't change
6. Apply patch
7. Redo step 3, the presets should now change the settings

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c5a98fe574)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1da66ccc14)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 21:55:16 +00:00
278dcab1cf Bug 31297: DBIC 2024-01-12 20:38:37 +00:00
41c774c365 Bug 31297: DBRev 23.05.07.001 2024-01-12 20:35:34 +00:00
50c3887541 Bug 31297: Allow null value for description in subscription_numberpatterns
To test:
1 - Go to Serials
2 - Add a enw subscription
3 - Select Vendor and record, click next
4 - Select Numbring pattern: Number, or any to populate forms
4 - Click 'show advanced pattern'
5 - 'Modify pattern'
6 - Add a new name
7 - 'Save as new pattern'
8 - Nothin happens
9 - Check logs:
    C4::Serials::Numberpattern::AddSubscriptionNumberpattern(): DBI Exception: DBD::mysql::st execute failed: Field 'description' doesn't have a default value at /kohadevbox/koha/serials/create-numberpattern.pl line 58
10 - Apply patch
11 - Update database
12 - Restart all
13 - Click save again
14 - Success!

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Removed wrong 'out' from atomic update file.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f9b57c5342)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1732236027)
2024-01-12 20:33:25 +00:00
e68c682914 Bug 35489: [23.05.x] Add a hidden input for itemnumber even if item has no barcode
This page is a single form, all fields must have inputs to avoid data loss/mismatch

To test:
1 - Find a record in the catalog and add or edit items to have one item with a barcode and one without
2 - Place an item level hold on the item with no barcode
3 - Place another hold for a different patron on the item with a barcode
4 - From the holds table add an expiration date to the hold with a barcode and save
5 - Note the hold on the item with no barcode is now on the item with a barcode and the other hold is now a next available hold
6 - Delete the holds
7 - Apply patch
8 - Repeat 2-4
9 - Confirm the itemnumbers for the holds have not changed

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 14:42:36 +00:00
Julian Maurice
bf43544a52 Bug 35557: Remove references to unused PREF_LocalCoverImages
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f7ea515bcc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 31a356afd3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 21:08:48 +00:00
51433f2569 Bug 35557: Remove LoadResultsCovers
The JS function LoadResultsCovers is not used from the Staff interface.

It is supposed to load the local cover images in JS but actually we are embedding the thumbnail in the img tag.

Test plan:
Confirm that LoadResultsCovers was called but had no effect.
Note that the selector ^local-thumbnail only exists in shelfbrowser.inc

but results.js is only used from results.tt (not shelfbrowser.inc)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4e66aa8065)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 43fb9f9c7a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 21:07:33 +00:00
fdf3e77e01 Bug 35547: Show public "staff only" lists in addbybiblionumber.pl
When adding an item to a list from catalogue/detail.pl, we can see the
latest 10  public lists. If all those lists are set as "staff only" for
"Allow changes to contents from" they will not show up in the
addbybiblionumber.pl popup. This is because the query in the popup does
not look for "staff only" lists while the "Add to list" button does.

Test plan:
1) Create 11 "staff only" lists as staff member A
2) Log in as staff member B
3) Find a record, click the "Add to list" button, note you can see lists
   2 through 11 here
4) In the pulldown, choose the "More lists" option
5) Note those lists are not visible in the "Choose list" pulldown under
   "Select an existing list"
6) Apply this patch
7) Restart all the things!
8) Click the "More lists" option again
9) Those lists should now be in the pulldown!

Signed-off-by: sabrina <kiehl@mpis.mpg.de>
Signed-off-by: Mikko Liimatainen <mikko.liimatainen@turku.fi>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5961e5c2a3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 39b75d3da0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 21:05:54 +00:00
5efb2416c3 Bug 35619: Fix validation error alignment in change password form
Bug 31829 made a change to the change password form in the staff
interface to accommodate a gap in the CSS following the staff interface
redesign. This gap has been fixed, so we don't need a double class on
the fieldset.

With this change, the "hint" div can also be put back into place.

To test, apply the patch and locate a patron record in the staff
interface.

 - Click the "Change password" button on the patron detail page.
 - Confirm that the form layout looks correct.
 - Enter mismatched passwords in the "New password" and "Confirm new
   password" fields and click "Save"
   - The validation error message should be aligned to the right of the
     input field.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 46b0b41e09)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7378b18f78)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 21:02:46 +00:00
59cdb045da Bug 35455: Remove = in ICU for indexing/searching
This change more closely aligns ICU and CHR so that ICU also
removes the = character. This fixes issues in ICU when searching
with a : which gets transformed into a =. Without this change,
the Analytics features won't work for titles with a colon in them.

Test plan:
0. Apply the patch and import bibs from Bugzilla (using Staged MARC tools)
1. cp ./etc/zebradb/etc/phrases-icu.xml /etc/koha/zebradb/etc/phrases-icu.xml
2. cp ./etc/zebradb/etc/words-icu.xml /etc/koha/zebradb/etc/words-icu.xml
3. vi /etc/koha/zebradb/etc/default.idx
Change "charmap word-phrase-utf.chr" to "icuchain words-icu.xml" for "index w"
and "icuchain phrases-icu.xml" for "index p"
4. koha-zebra --stop kohadev
5. pkill zebrasrv
6. koha-zebra --start kohadev
7. koha-rebuild-zebra -a -b -f -v kohadev

8. Search for "Awesome title" and open the detail page
9. Note that the "Analytics: Show analytics" line shows up
10. Click that link
11. Note that it opens the "Cool article" record and it displays
"In: Awesome title: awesome subtitle"
12. Click that link
13. Note that it opens the "Awesome title" record

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7375d82c40)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5035e12440)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 21:00:20 +00:00
e38316dd1f Bug 35493: Do not show housebound roles as collapsible unless the housebound module is on
To test:
1. HouseboundModule - disabled
2. CollapseFieldsPatronAddForm, add 'Housebound roles'
3. Edit/create a patron.
4. Notice the useless Housebound roles link at the top of the page
5. APPLY PATCH
6. Try 1 - 3 again, this time no Housebound roles at the top ( Show collapsed fields )
7. Turn on HouseboundModule and make sure it now shows

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 49f30ad6ed)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 83c18ad1c6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:58:39 +00:00
David Nind
af02963e9a Bug 34644: (follow-up) Additional edits to description
Linked system preference in description to cross reference, and
and removed the spaces in the bracketed text.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5cd21f1139)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8d724b82c1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:55:31 +00:00
0da801226b Bug 34644: replacementprice is support by MarcFieldsToOrder but is not listed
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 341b90b2ee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 26fb50672f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:55:31 +00:00
6fb592522d Bug 34644: Improve readability of sysprefs
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 61e8073b02)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b5b2d1b678)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:55:31 +00:00
5f0299f543 Bug 34644: Add clarifying text to sysprefs to indicate that MarcFieldsToOrder is a fallback to MarcItemFieldsToOrder
Clarify that fields will fall back to MarcFieldsToOrder from MarcItemFieldsToOrder.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 884039bd5a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5b54a01fa8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:55:31 +00:00
74bda07f03 Bug 35600: Prevent checkouts table to flicker
The checkouts table is displayed in the DOM then hidden in JS, then we show it if the cookie is set.

This patch makes the table hidden by default, and show it if/when needed

Test plan:
Check an item out, see the checkouts list view
Play with "Always show checkouts automatically", refresh the page
=> UI should behave better than before this patch

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6c8beb2f2e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 703ee190d9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:50:55 +00:00
993931eb9e Bug 35491: Add logging to RevertWaitingStatus
This patch simply adds a logaction line to RevertWaitingStatus

To test:
1 - Enable HoldsLog
2 - Place a hold
3 - Fill the hold
4 - Revert the waiting status
5 - Note there is no action log added
6 - Apply patch
7 - Repeat 2-4
8 - Confirm you now have a MODIFY action logged for the reversion

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4e42f1182d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5ca5900f91)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:48:14 +00:00
0b1a1261ff Bug 33847: Database update replaces undefined rules with defaults rather than the value that would be used
Bug 29012 introduces a database update that sets the default values for rules that are required but undefined. This functionally changes the results of the circulation rules.

Instead, this update should find value that is being used for that rule combo and use that as the rule value, only using the default in the case that the derived rule doesn't exist or has a null value.

Test Plan:
1) Check out Koha 22.05.05
2) Create a default all/all/all rule, 3 other rules. Ensure they all have Loan period set to 7, with one of the non-default rules having a Loan period of 14.
3) Delete all but one of the non-default rules with the following query:
   Delete from circulation_rules where rule_name  = 'issuelength' and ( rule_value != 14 and not ( branchcode is null and categorycode is null and itemtype is null ) ) limit 2;
4) Check out 254f721320
5) Run updatedatabase.pl and restart
6) Note the rules were recreated with the value 0
7) Repeat steps 1-4
8) Apply this patch
9) If you're using the same database, set the version to 22.0600023 and restart
10) Run updatedatabase.pl
11) Note the rules were recreated, but the value is the derived value from the all/all/all rule!

Signed-off-by: Kevin Carnes <kevin.carnes@ub.lu.se>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>

Bug 33847: Rewrite to use SQL

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Squashed, and added reference to new bug too
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f6f2d1ae41)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8b04a3f642)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:38:48 +00:00
8af088069a Bug 30287: (follow-up) Make unit test more reliable in ktd
This patch mocks NoticeCSS earlier to ensure we're not inadvertantly
failing due to a local setup in ktd having added to the preference.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 12e90c8b7d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 52772da921)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:34:51 +00:00
87588c477c Bug 30287: (follow-up) Unit test for html_content
This patch adds a unit test for the new `html_content` method introduced
to Koha::Notice::Template in the previous patch.

Test
1) Run the new unit test ;P

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c260f4a374)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f89d178b06)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:34:51 +00:00
93b98dda14 Bug 30287: (follow-up) Add content wrap matching send time
This patch adds a new method to the Koha::Notice::Message class to wrap
content in the same way we currently do at email send time. We then
update the notice preview to use this method so we're embedding
NoticeCSS into that iframe. This means the generated preview should now
exactly match how your notice will display in email clients including
any CSS you may have placed within NoticeCSS.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Fixed typo in POD of html_content

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a09986ea51)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1dc3332504)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:34:51 +00:00
0a1088372b Bug 30287: Conditionally render notice preview
This patch adds conditional formatting based on whether the notice was
generated from an HTML template or a plaintext one. We simply drop the
'html_line_break' filter for the case where the notice should already be
html formatted.

I was tempted to replace the html_line_break for plaintext formatted
notices too as I believe this closer resembles how we actually output
such generated notices.. but I decided that should be for another bug.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f83b9ab1ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ebf8e267ac)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:34:51 +00:00
318bb230b2 Bug 35309: Remove DT's fnSetFilteringDelay
On bug 35284 we added the delay on the column filters using dt's
throttle builtin function.

From doc:
https://datatables.net/plug-ins/api/fnSetFilteringDelay
"""
Please note that this plug-in has been deprecated and the dt-init searchDelay option in DataTables 1.10 should now be used. This plug-in will not operate with v1.10+.

Test plan:
Note that column filtering still work as before (test on different
tables, see bug 35284 for the list)

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8bb8282d68)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 967ed52dd2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:31:48 +00:00
41f9cf7274 Bug 35405: Remove noise from MARC::Record in SearchAuthorities
We are calling ->field with an undef parameter.
MARC::Record does not like that and says:
  Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202.
For now, a fix at our side.

Test plan:
Run SearchAuthorities without passing an authtypecode.
Without this patch, it results in a warning per hit.
With this patch, the noise should be gone.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ac02c1d2ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 30213b67ae)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:26:30 +00:00
24f067b0cf Bug 35204: Prevent an expired password from throwing a 500 error
Currently when a patron with an expired password is authenticated via the API a 500 error is returned rather than a 400 "Validation failed" error. This patch catches the return value for an expired password and returns the validation failure before the patron search is attempted.

Test plan:
1) Choose a patron and set their password expiry date to a date in the past
2) Send a request to auth/password/validation as an authenticated user with that patron's details
3) The response should be a 500 error
4) Apply patch
5) Repeat steps 1-3 and this time the response should be a 400 code with an error message of  "Password expired"

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f3bb885052)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit df9d4b0f55)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:24:31 +00:00
1fc5a820bb Bug 35204: Add unit tests
prove t/db_dependent/api/v1/password_validation.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 711f9a041a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 86be92a608)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 20:24:31 +00:00
05fa291d71 Bug 35496: (QA follow-up): tidy up code
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5d0732252a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f1c2269488)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 18:52:26 +00:00
745655bddd Bug 35496: Open article requests tab by default on opac-user.pl after placing an article request
To test:
1 - Turn on ArticleRequests
2 - Place an  Article Requests on the opac
3 - Note after placing the request the URL is:
    http://localhost:8080/cgi-bin/koha/opac-user.pl#opac-user-article-requests
4 - Note the article request tab is not active
5 - APPLY PATCH and restart_all
6. Try steps 2 - 4 again, this time the article request tab should be open by default.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 33ba9c2701)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7ad7038936)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 18:50:58 +00:00
d088c35445 Bug 35495: Open holds tab by default on opac-user.pl after cancelling a hold
To test:
1 - Go to the opac-user.pl page for a user with some holds and cancel a hold.
2 - Note after placing the hold the URL is:
    http://localhost:8080/cgi-bin/koha/opac-user.pl?#opac-user-holds
3 - Note the holds tab is not active
4. APPLY PATCH and restart all
5. Now after cancelling a hold, the refreshed page should have an active hold tab.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cc9e40869a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d4c0bd27f7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 18:49:18 +00:00
e25394dbe7 Bug 35492: Open holds tab by default on opac-user.pl after suspending a hold
To recreate:
1. Go to the opac-user.pl page for a user with some holds and suspend
   a hold.
2. Note after placing the hold the URL is:
   http://localhost:8080/cgi-bin/koha/opac-user.pl?#opac-user-holds
3  Note the holds tab is not active
4. APPLY PATCH and restart all
5. Now after suspending a hold, the refreshed page should have an active
   hold tab.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9076f0ba3d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3259bcf979)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 18:47:51 +00:00
82a44fa5cd Bug 35488: Open holds tab by default on opac-user.pl after placing a hold
1 - Place a hold on the opac
2 - Note after placing the hold the URL is:
    http://localhost:8080/cgi-bin/koha/opac-user.pl?#opac-user-holds
3 - Note the holds tab is not active
4 - APPLY PATCH and restart_all
5 - Try steps 1 - 3 again, this time the holds tab should be opened.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d8bd46d0d7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ce728a04f9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 18:45:26 +00:00
5dfb5312c2 Bug 35428: Remove temporary files for gulp po tasks
gulp po:update will generate 1 /tmp/koha-* directory per task.

We need to remove them when the script does not longer need them.

Test plan:
0. Do not apply this patch
1. ls -ltr /tmp
2. gulp po:update --lang es-ES
3. ls -ltr /tmp
=> Notice new koha-* directories
Repeat 2, 3
4. Apply this patch and try again
=> No new directories when the job is done

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ba7b62d1fc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a4a2d02d3c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 18:14:27 +00:00
31ad2ffd00 Bug 35498: Allow tab to indent lines and trigger autocomplete
This patch allows the tab key to indent lines as well as trigger autocomplete.

Test plan:
1) Apply patch, navigate to reports and create a new SQL report
2) Click in the text editor and press tab, it should indent and then trigger the autocomplete options
3) Type something to select from the autocomplete box and press tab - it should autocomplete that option
4) Type any word and then press space. Now press tab and it should indent again

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f9b3866ebf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ef1255372d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 18:12:36 +00:00
d4f30b3191 Bug 35310: Show current renewal value of the currently active check out
Test plan, with the previous 2 patches applied:

1) Checkout an item to Koha user, barcode 39999000003192
2) Renew that barcode
3) Visit the items page of the biblio record, click on 'View' in front of 'Current renewals'
/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76
4) Notice it shows the renewals as expected
5) Return the same item: 39999000003192
6) Repeat 1) to 3). Notice it shows 2 current renewals even tho only 1 corresponds to the currently active check out
7) Renew again. Notice it shows 3 current renewals even tho only 2 correspond to the currently active check out
7) Apply this patch. Notice it now only shows 2 current renewals

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e756faf860)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b242a03a30)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 18:08:05 +00:00
7ed002e676 Bug 35310: Only show 'Current renewals' link if item is currently checked out
1) Checkout an item to Koha user, barcode 39999000003192
2) Renew that barcode
3) Visit the items page of the biblio record, click on "View" in front of "Current renewals"
/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76
4) Notice it shows the renewals as expected
5) Return the same item 39999000003192
6) Repeat 3). Notice it never loads renewals and network console shows HTTP error 400
7) Apply this patch. Repeat the test plan. Notice the 'Current renewals' no longer shows for the item because it is no longer checked out, so whatever past renewals are no longer 'current'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ebba646b46)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 467626119a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 18:08:05 +00:00
f042890e5f Bug 35310: Only show 'Current renewals' <li> entry if there are current renewals
'Current renewals' is always showing, even if empty.

Test plan:
1) Checkout an item to Koha user, barcode 39999000003192
2) Renew that barcode
3) Visit the items page of the biblio record, click on "View" in front of "Current renewals"
/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76
4) Notice all items have the 'Current renewals' label entry, but only the checked out item in step 1) has the 'Current renewals' label entry
5) Apply patch. Notice only the item with current renewals is showing the 'Current renewals' label entry with the respective value.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 942c4a0535)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9eacb4b40f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-04 18:08:05 +00:00
b24bee519e Update release notes for 23.05.07 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-03 14:56:46 +00:00
0bfb50bffb Increment version for 23.05.07 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-03 14:06:44 +00:00
918a4c0879 Bug 34091: Fix typo log-modules in help for cleanupdatabase.pl
This parameter is actually --log-module.

Test plan :
Run misc/cronjobs/cleanup_database.pl -h
Confirm you see --log-module

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 289e06edea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 22d44fd2f2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2023-12-14 21:23:57 +00:00