Aleisha Amohia [Wed, 25 Oct 2023 00:40:26 +0000 (00:40 +0000)]
Bug 35147: Add classes to Shibboleth text on OPAC login page
This enhancement makes it easier for libraries to change the Shibboleth-related messages on the OPAC login page.
Libraries can employ OPACUserJS to change the text. For e.g., I can replace the message "If you do not have a Shibboleth account, but you do have a local login, then you may login below." by putting the following in OPACUserJS:
$(".shib_local_text").text("If you do not have a staff member account, but are a member of the library, then you may log in below.");
To test:
1. Go to <your-opac-url>/cgi-bin/koha/opac-user.pl , or disable the OpacPublic system preference. Ensure you are logged out of the OPAC.
2. In the staff interface, search for the OPACUserJS system preference under Koha Administration. Add the following JS and Save:
$(".shib_invalid").text("Test changing the invalid Shibboleth login message.");
$(".shib_title").text("Test changing the Shibboleth login heading.");
$(".shib_url").text("Test changing the Shibboleth account link text.");
$(".shib_local_title").text("Test changing the local login heading.");
$(".shib_local_text").text("Test changing the message that shows if you do not have a Shibboleth account.");
3. Refresh the OPAC and confirm the text changes to reflect your JS. Note: The invalid Shibboleth login will be a bit harder to test, so if you can't test, confirm the HTML in the patch looks correct.
Sponsored-by: New Zealand Council for Educational Research 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 184299c9c84ee35cdd31149214710778648729ad) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7eebf895b9f0f033134be303d5cb71e2028af5c7) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 826aeaf22f36fb3ebacafdacf7c270cc72d8c5fe) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dd34d7df04c8674cf32cf8d7daa001d773213535) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4fa7d59c61b524238b2e30f383ccda44e61e1096) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 57da913eae938a4968d4a9d3074ff807fef0b8cd) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Martin Renvoize [Fri, 27 Oct 2023 10:48:07 +0000 (11:48 +0100)]
Bug 35173: Correctly concat error strings
This patch moves the call to $sftp->error outside of the double quote
string and into a . concat to properly expose the error message as
apposed to outputting 'Net::SFTP::Foreign=HASH(0x559c9118f0c8)->error'
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 43bd124f873ac118a9f87a5b5160ee99dc8b8a47) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4c0191b69023167dba27830904ea6503f248f858) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Lucas Gass [Fri, 6 Oct 2023 15:15:39 +0000 (15:15 +0000)]
Bug 35003: Make cancelled hold requests filter by branch
To recreate:
1. Make sure you have the "Default waiting hold cancellation policy" set to allow via circulation rules.
2. Make several holds at different branches holds and set them to waiting
3. Request to cancel those holds, making sure you cancel some for different branches.
4. Go to waitingreserves.tt and notice that you see all of the holds from all branches.
5. APPLY PATCH and restart services
6. Vist the waitingreserves.tt page and notice that the "Holds with cancellation requests" table can now filters by branch.
7. Use the "View all libraries" and make sure you can see all the holds with a cancellation request.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(cherry picked from commit 67f4fcc204c11998f9110d8ed723fa826c62a5ce) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cb99c788f7c581b148a872c9ed3dcb013c369796) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Tue, 24 Oct 2023 12:01:09 +0000 (12:01 +0000)]
Bug 35141: Prevent link_bibs_to_authorities from dying on invalid metadata
When fetching the record we need to eval in case of exception
To test:
1 - Apply first patch
2 - perl misc/link_bibs_to_authorities.pl
3 - Note it dies on parser error at record 369
4 - Apply this patch
5 - perl misc/link_bibs_to_authorities.pl
6 - The process completes - with warning thrown on record 369
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(cherry picked from commit 706641e747336eeb341172ed3d794d86551a45a9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ed2bb9534a143b6ab894e6ab4e24d8c7dc9fd58e) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Tue, 24 Oct 2023 11:51:29 +0000 (11:51 +0000)]
Bug 35141: Catch ES search exceptions in link_bibs_to_authorities, warn, and continue
This patch simplay adds an eval and a warning to link_bibs_to_authorities to catch any errors while searching and continue linking.
To test:
1 - edit /etc/kohia/sites/kohadev/koha-conf.xml and add to elasticsearch stanza
<request_timeout>0</request_timeout>
2 - perl misc/link_bibs_to_authorities.pl
3 - It dies immediately
4 - Apply patch
5 - perl misc/link_bibs_to_authorities.pl
6 - Now it tries every record, throwing warnings along the way, but completes
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(cherry picked from commit 22c0be31c73249fa534afb209f2a0229f84b7568) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 07cf6fccc0afdab10ac39ae33d6a9841cb1abf30) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Wed, 13 Sep 2023 17:03:32 +0000 (17:03 +0000)]
Bug 34678: Allow new entries to overwrite hold_fill_targets
When using background jobs, there is a possibility of a race condition where two jobs will be updating the holds queue for the same biblio. We should try to minimize those cases (see bug 34596)
In the meantime though, we should prevent jobs possibly dying, and allow the most recent update to succeed.
There is a possibility two updates wil assign different items to the same reserve, and that a reserve could end up in the queue twice, however, whichever one is filled first will delete both entries. as filling the hold deletes by reserve id (see bug 24359)
This patch adds a transaction to delete and then inset the new row
To test:
1 - prove -v t/db_dependent/Reserves.t
2 - It fails
3 - Apply patch
4 - t/db_dependent/Reserves.t
5 - It succeeds!
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(cherry picked from commit bbeab36789d8dd020bc5395d76c54cc2910caf49) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a65964c35b2d38ec7bcd87182e00ae4567aa0ae4) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Fri, 15 Sep 2023 15:11:21 +0000 (15:11 +0000)]
Bug 33662: Add link to acq advanced search to acq navigation
Right now 3 clicks are needed to open the advanced search page
in the acquisitions module.
This adds a link to the advanced search to the left hand
module navigation.
To test:
* Go to acquisitions
* Verify the way is long to advanced search:
At the top: Orders search > config icon > advanced search link
* Apply patch
* Notice new 'Order search' link on the left
* Verify it's way shorter now :)
Sponsored-by: The Research University in the Helmholtz Association (KIT) Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Renamed link from 'Advanced search' to 'Order search'
Adjusted test plan
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 67930244ad5dc4e65e9e040b38d0080cb80b23b9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 156f0eac1e3ca3ff1b33453df2c71849685bd60c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Matt Blenkinsop [Tue, 23 May 2023 14:49:08 +0000 (14:49 +0000)]
Bug 33810: Opac advanced search fields need aria-labels
The OPAC advanced search fields need aria-labels to assist with screen reading. This patch adds labels to both the dropdown selects and the text inputs
Signed-off-by: joubu <xxx@example.org> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 933c779b7d49525a561070dd8d60941f5f000c06) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 62fa8773c19f87c48ce70eb0c4ff8f7e46142a3a) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Laura Escamilla [Thu, 19 Oct 2023 18:25:51 +0000 (18:25 +0000)]
Bug 34954: Fixed typo to 'dateexpiry'
To test:
1. In KTD use grep -rn --exclude=*.po "datexpiry" *
2. Notice that the four locations below are showing the typo:
1. git add koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt
2. git add misc/release_notes/release_notes_18_05_00.html
3. git add misc/release_notes/release_notes_18_05_00.md
4. git add t/db_dependent/Koha/Patrons/Import.t
3. Apply patch. Repeat step 1.
4. Notice that no results show. All instances of the typo have been fixed to dateexpiry.
5. Sign off and have a great day :)
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 d742f29d77ee1e8a6f825678ce879d4a04037c92) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9b87ae61ad81e056ff7f8972ee8deca86666e17b) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
The anonymous patron details page should show an alert message.
1) Configure an existing borrowernumber in system preference 'AnonymousPatron'
2) Go to details page of this borrower :
/cgi-bin/koha/members/moremember.pl?borrowernumber=x
3) Check you see alert 'This is the anonymous patron.'
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi> Signed-off-by: Päivi Knuutinen <paivi.knuutinen@joensuu.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a8e770d9c49a88fbfd46c27b31d3eb2a413a1618) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 83b251e91d418e85d236c945e0edd52e601a7513) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 34910: Do not allow checkout for anonymous patron
The anonymous patron circulation page should show an alert message and not allow check-out.
1) Configure an existing borrowernumber in system preference
AnonymousPatron
2) Go to circulation page of this borrower :
/cgi-bin/koha/circ/circulation.pl?borrowernumber=x
3) Check you see alert 'This is the anonymous patron, so circulation is disabled.'
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi> Signed-off-by: Päivi Knuutinen <paivi.knuutinen@joensuu.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aca49ca14b9f2d009f469144f975cd9fbf098181) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9a64d2c93a97f387f89ae157bc379bf7b1261a4a) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Nind [Sat, 30 Sep 2023 06:27:39 +0000 (06:27 +0000)]
Bug 34966: Terminology - fix add item form (& to and)
This patch updates the add item form in the staff interface to
change the 'Add & duplicate' button to 'Add and duplicate'.
In our terminology guide, & should only be used when
it is part of a proper noun or a common abbreviation:
https://wiki.koha-community.org/wiki/Terminology
Test plan:
1. In the staff interface, search for and select a record.
2. Select New > New item.
3. Note that "Add & duplicate" is one of the action buttons at the
bottom of the add item form.
4. Apply the patch.
5. Refresh the page.
6. Note that the action button is now labelled 'Add and duplicate'.
7. Sign off! 8-)
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katariina Hanhisalo <katariina.hanhisalo@xamk.fi> Signed-off-by: Reetta Pihlaja <reetta.pihlaja@siilinjarvi.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 34897afc593148f30fd1cd6249f34a43643589bb) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Wed, 25 Oct 2023 11:38:27 +0000 (11:38 +0000)]
Bug 33169: (QA follow-up) Fix some icons for lower FA version
In the navigation some icons were missing, because they had changed
names between versions, this restores them. Fixed icons concerned
the navigation items:
Font awesome now provides a different approach to icon styles so you can
specify things like:
```
<i class="fa fa-camera-retro"></i>
```
but also
```
<i class="fa-solid fa-camera-retro"></i>
```
The original implementation had a hardcoded `fa` and having an extra
parameter for the *style* seemed overkill, as we would need to handle
even a list of styles like on this example:
Agustin Moyano [Mon, 6 Mar 2023 19:44:44 +0000 (16:44 -0300)]
Bug 33169: Build breadcrumbs and left-hand side menu from routes definition
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e3f88f0438232ab2c61129466aaa1fb205f4f720) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 31f48a6d19cb6023af7c2fe023b5f39a237d17d0) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Tue, 31 Oct 2023 13:45:08 +0000 (14:45 +0100)]
Bug 35199: (bug 34448 follow-up) Fix error handling in http-client.js
From bug bug 34448.
386 // Submit the form, get 500
387 cy.intercept("POST", "/api/v1/erm/agreements", {
388 statusCode: 500,
389 error: "Something went wrong",
390 });
391 cy.get("#agreements_add").contains("Submit").click();
392 cy.get("main div[class='dialog alert']").contains(
393 "Something went wrong: SyntaxError: Unexpected end of JSON input"
394 );
This is wrong: we are now showing a JS error (SyntaxError) instead of the expected 500: internal server error!
The problem was that a regular 500 does not have anything in the body,
and _fetchJSON didn't handle that ( JSON.parse(text) ).
If the body of the response does not contain anything we need to get the
text from statusText (which contains "Internal Server Error" in case of
500).
Test plan:
1. Make sure all cypress tests pass
2. Confirm the above:
Raise an exception from a given route (/agreements for instance) and
confirm that the error displayed on the interface is correct (ie. not
SyntaxError, but "Error: Internal Server Error")
For QA:
* This change is covered properly in Dialog_spec.ts, no need to redo it in
every other test files.
* Without the following change in count, we see:
"Something went wrong: Error: Error: Internal Server Error" because
setError is called twice. We don't need to set the error from count, it
has been set from _fetchJSON already.
- error => {
- setError(error.toString());
- }
+ error => {}
Bug 35167: Make 'effective_not_for_loan_status' fallback to 0 if itype has it undef
This patch makes the effective not for loan status be set the item value
if not defined at itype level.
To test:
1. Apply the regressions tests patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/items.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(cherry picked from commit b9ea3eb988b116ffc912fad9315533c7774a3754) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 34d08324fcc20c8c83bbbb87f0f1eff0481638f5) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(cherry picked from commit c67d28c5f9136a96bfb665cd13f354af492e3233) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d37fbdb665e598cc630ac351d833d213be222f82) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Fri, 20 Oct 2023 01:15:00 +0000 (01:15 +0000)]
Bug 35111: Ignore SIGPIPE in background jobs worker
This change explicitly ignores SIGPIPE signals in the background jobs
worker.
Daemons like Starman ignore SIGPIPE so it makes sense to explicitly set this.
Differences in the inner workings of MySQL vs MariaDB client libraries have yielded
different behaviours in automatic reconnections and potentially SIGPIPE handling,
so this helps to make the overall behaviour more consistent.
Test plan:
0. Apply patch and run "restart_all"
1. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
2. Click "Save" > "MARCXML"
3. Go to http://localhost:8081/cgi-bin/koha/tools/stage-marc-import.pl
4. Click "Choose file", choose the MARCXML file, click "Upload file"
5. Click "Stage for import"
6. Note the job is marked as "100% Finished"
7. In a separate window run "docker restart koha-db-1"
8. Repeat steps 3-5 for uploading file and running stage for import
9. Note that the job is marked as "100% Finished" as you'd expect
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Added comment on the SIG PIPE line. Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2988c549719197a5a46a94039f7881b3e74e6e19) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b57dfb84bccd81c92e0c9176acf42043e0ac8363) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 486d3582f2f6ec73982dca2082797c55ef78e5e2) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Sun, 29 Oct 2023 14:14:37 +0000 (14:14 +0000)]
Bug 34520: Fix FK for item_groups in reserves for new installations
There was a discrepancy between the database update for reserves
and the kohastructure.sql definition. This makes sure that the
FK is always "ON DELETE SET NULL".
To test:
* Before applying this path
* sudo koha-mysql kohadev
* show create table reserves;
CONSTRAINT `reserves_ibfk_ig` FOREIGN KEY (`item_group_id`) REFERENCES `item_groups` (`item_group_id`) ON DELETE CASCADE ON UPDATE CASCADE
CONSTRAINT `reserves_ibfk_ig` FOREIGN KEY (`item_group_id`) REFERENCES `item_groups` (`item_group_id`) ON DELETE SET NULL ON UPDATE CASCADE
* reset_all (create a new database)
* Check database again:
CONSTRAINT `reserves_ibfk_ig` FOREIGN KEY (`item_group_id`) REFERENCES `item_groups` (`item_group_id`) ON DELETE SET NULL ON UPDATE CASCADE
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 6dd4626711866fbf92b49f88770a6b3bfb75ddca) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d0090275b0fd2cd728183c072765a5a7cfdbbe54) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 34908: Sort item types alphabetically by description when adding a new empty record as an order to a basket
To test:
1. Go to Koha administration -> Item types. Add a new item type "B" with the description "Test" so it will be obvious if it is sorted by the code "B" instead of the description "Test".
2. Go to Acquisitions. Add to a basket from a new empty record
3. In the Catalog details section, note the Item type dropdown. Confirm your "Test" item type, is showing near the top of the list, indicating it has been sorted based on the code "B"
4. Apply patch and restart services. Refresh the page.
5. Open the Item type dropdown again and confirm your "Test" item type is showing in the expected alphabetical order.
NC amended patch - tidied
Sponsored-by: South Taranaki District Council 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 0ef83c041d55cb95a4fd839101135126c3d9854a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0237ad8eb48d7bdeac9648d37ebdbccbb87cf2bc) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Kyle M Hall [Wed, 25 Oct 2023 13:34:53 +0000 (09:34 -0400)]
Bug 35148: before_send_messages plugin hook does not pass the --where option
The before_send_messages plugin hook currently sends all the non-smtp related options with the exception of the --where option. This should be added.
Test Plan:
1) Install the latest version of the kitchen sink plugin (
https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/releases
)
2) Apply this patch
3) Run process_message_queue.pl with a --where option
4) Run the command: ./misc/cronjobs/process_message_queue.pl --where "letter_code='test'"
5) Note the output looks like:
Plugin hook before_send_message called with the params: $VAR1 = {
'verbose' => 0,
'where' => 'letter_code=\'test\'',
'letter_code' => [],
'type' => [],
'limit' => undef
};
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1508e81505f978b473f06b9f8e71a8f22721a7f5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 247b9da1723d08d14a4f413f78b582f5eba8ed63) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Lucas Gass [Mon, 16 Oct 2023 23:03:03 +0000 (23:03 +0000)]
Bug 35069: Fix hold ratios items needed column sorting
This patch adds the data-sort attribute to the "Items needed" column to
ensure proper sorting.
To test:
1. Make a lot of holds.
2. On some holds have a high enough holds/copies ratio so the "Items
needed" has values greater than 10.
3. Sort by that column. Notice the copies with an "Items needed" higher
than 10 do not get sorted correctly.
4. APPLY PATCH
5. Try steps 1 -3 again. Everything should sort properly.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2ce68244991fc90b4606e1aa06e874c9854107a2) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a6c53078a633db278b8a16b5ef7303e34446ee65) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Tue, 24 Oct 2023 13:32:53 +0000 (15:32 +0200)]
Bug 35127: Fix 'Search type' for patron search
We need to fallback on the syspref DefaultPatronSearchMethod but keep
the value when one is passed!
Test plan:
Search for patrons, and use the "search type". Set it to different
values than DefaultPatronSearchMethod and confirm that the value is
kept.
Fix is expected when searching for patrons in the header (use the
options to select a different value and run the search)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.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 e08bf3bb4c4ef8208f7895c000397e4122664c57) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e9363693e026ebea2117a750c078dd71d4c0a1bb) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Michał Kula [Mon, 23 Oct 2023 13:51:40 +0000 (15:51 +0200)]
Bug 35072: Fix invalid usage of "&" in JavaScript intranet-tmpl script redirects
These escapes were invalid in these places, as HTML entity escapes
are meant to be used only inside of HTML elements/attributes, not
inside of JavaScript code.
These URLs would be sent out by the browser as-is, and that'd usually
work on the default install only coincidentally. Unfortunately, on some
setups (such as when using reverse proxies), this would break, and the
URL after "&" would have been truncated.
This small patch adjusts the URLs in templates to not use wrong escapes,
and makes them consistent with how URLs are formatted for JavaScript
redirects in most of the templates already.
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 da9f74e56aa3fcaab2a53f0211113d7600263806) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 37eb3092c19361c88ab0442219cd523832b24d2f) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Marcel de Rooy [Wed, 4 Oct 2023 13:04:27 +0000 (15:04 +0200)]
Bug 34983: Force a sort order in JSON output of po2json
This patch does so by default. If you do not want them sorted,
export CANONICAL-0 on the command line.
Test plan:
Copy a staff PO file from misc/translator to test.po
Now run: time misc/translator/po2json test.po > json1
And do: time misc/translator/po2json test.po > json2
Run: diff json1 json2; #They should be the same.
Now: export CANONICAL=0
And run: time misc/translator/po2json test.po > json3
And again: time misc/translator/po2json test.po > json4
And run: diff json3 json4; # Lots of changes
Remove the created cruft. And signoff :)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a5fc346403665cf6eb692f401bf1cca5ece3cb81) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 82d4eff906cf0b88b001cfe2f43f15d8e63f6ca6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Kyle M Hall [Thu, 7 Sep 2023 15:40:59 +0000 (11:40 -0400)]
Bug 34731: Use Koha::Notice::Message in EnqueueLetter
Test Plan:
1) Apply this patch
2) prove t/db_dependent/Letters.t
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Kyle M Hall [Thu, 7 Sep 2023 15:04:32 +0000 (11:04 -0400)]
Bug 34731: Throw exception if SendQueuedMessages is passed a bad message_id
Test Plan:
1) Apply this patch
2) prove t/db_dependent/Letters.t
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Aleisha Amohia [Fri, 20 Oct 2023 01:02:30 +0000 (01:02 +0000)]
Bug 35112: Fix return claims table showing on other patron tabs
This patch fixes some unintentional changes introduced by Bug 25023.
To test:
1. Set a LOST authorised value in the ClaimReturnedLostValue to enable return claims.
2. Check out an item
3. Submit a return claim for the checkout
4. Refresh the patron page
5. Notice the return claims table is showing strangely when viewing the other patron tabs i.e. Checkouts, Holds, Restrictions.
6. Apply the patch and refresh the page
7. Confirm the return claims table only shows when viewing the Claims tab, as expected.
Sponsored-by: Pymble Ladies' College Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Pedro Amorim [Thu, 19 Oct 2023 10:42:48 +0000 (10:42 +0000)]
Bug 35105: Fix patron accessor in Illrequest.pm
Patron is nullable, so we need to consider undef return
Test plan, k-t-d:
1) Install FreeForm and enable ILLmodule, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Visit /cgi-bin/koha/ill/ill-requests.pl
3) Create 'New ILL request'
4) Select the request type, input cardnumber '42' and select a library
5) Hit 'Create'
6) Manage the request created just now: click the request id or 'manage request' button from the table
7) Click "Edit request" from the top actions toolbar
8a) Input text in Patron ID e.g. 'asdasdasf'. Notice you get redirected to the table - now renders correctly.
8b) Input a patron id that doesn't exist e.g. '987654'. Notice you get an error upon saving "FK Constraint error",
go back to the table and verify it renders correctly.
In both instances, the request is saved with borrowernumber as NULL,
this was preventing the table from rendering because the 'patron' API
embed was trying to retrieve a patron - getting an empty resultset instead
of undef.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 540626ef1510f9cae567efe646bb72f520cfbf2e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 049285b441641d917c1d17bceff27a5f583db936) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Owen Leonard [Fri, 20 Oct 2023 17:01:00 +0000 (17:01 +0000)]
Bug 35124: Incorrect item groups table markup
This patch corrects the markup of the item groups table which is found
under the "Item groups" tab on the bibliographip detail page in the
staff interface.
The patch also adds the "NoSort" class to the "actions" column to
prevent it from being sortable.
To test, apply the patch and make sure the "EnableItemGroups" system
preference is enabled.
- In the staff interface, locate a record with items and view the detail
page.
- Under the "Item groups" tab confirm that the table looks correct: The
heading labels should be centered bold text.
- You should see sorting indicators on the "Display order" and "Description"
headings but not on the last one.
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 174cd59cea0e9a69aa3d690ef25190c293345a83) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0c3807caa01e6ffcf01028928fc226081f5d9c61) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Owen Leonard [Thu, 28 Sep 2023 12:48:36 +0000 (12:48 +0000)]
Bug 34946: Remove the use of event attributes from self checkout and check-in
This patch removes the use of event attributes from the self checkout
and self check-in templates. These events are defined now along with the
other in-page JS.
To test you must have SelfCheckInModule and WebBasedSelfCheck
preferences enabled. And SelfCheckoutByLogin = cardnumber.
- Navigate to the self checkout interface
(/cgi-bin/koha/sco/sco-main.pl).
- When the page loads, cursor focus should be automatically placed in
the barcode field.
- Test the "munge history" feature from Bug 10016:
[1] Start a web-based self-check session.
[2] Enter a patron barcode.
[3] Allow the self-check session to time out.
[4] Use the back button. You should get the patron barcode
entry form; you should not be prompted to resubmit form input.
[5] Enter a patron barcode, perform some transactions, then
use the finish button.
[6] Next, use the back button. You should get the patron barcode
entry form.
- Test the updated checkout_confirm function by submitting the "magic"
barcode for checkout: __KOHA_NEW_CIRC__. The user's session should be
ended.
- Navigate to the self check-in interface
(/cgi-bin/koha/sco/sci-main.pl).
- Test the cursor focus and "munge history" feature on this page too.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 76d522a90346ccbdb38793c048d61e73e869d9a0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b27a2a2eb09a7390d9e56af2b03c42df6d692dcf) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Fridolin Somers [Thu, 19 Oct 2023 19:17:57 +0000 (09:17 -1000)]
Bug 35110: Authorities editor with JS error when only one tab
Exactly like Bug 34251 for biblios :
When using the an authorities framework with all fields in the same tab, there is thrown a JS error in selectTab( "#tab0XX_panel" );
This is because no nav tabs are build in authorities/authorities.tt as BIG_LOOP has a length(size) of 1
Test plan :
1) Edit an authority framework, for example 'Meeting Name', to set all sufields in tab 0
You may use SQL : UPDATE auth_subfield_structure SET tab=0 WHERE authtypecode='MEETI_NAME'
Don't forget to restart memcached
2) Go to 'Authorities'
3) Click on 'New authority' then 'Meeting Name'
4) Check you don't see any JavaScript error
5) Check you can save
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 35110: (follow-up) Fix comment in addbiblio.tt
Change comment in addbiblio.tt since any biblio framework may use only
one tab.
Also fixes indenting using 4 spaces.
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>
Edit: squashed because follow-up fixes code introduced by the same
author.
Marcel de Rooy [Tue, 10 Oct 2023 11:36:45 +0000 (13:36 +0200)]
Bug 35000: Fix OPACMandatoryHoldDates feature in opac-reserve
Somewhere (perhaps after bug 29012) this feature has been broken
somehow.
The fact that we have two inputs for the date and the active one
is one level deeper, requires a few adjustments in the jquery
selectors etc. (Note that two Required lines were visible too.)
The corrected jquery constructs become a bit complexer now.
Test plan:
Enable AllowHoldDateInFuture + OPACAllowHoldDateInFuture.
Set circ rule for book to test with allows item level holds.
Set OPACMandatoryHoldDates to no hold dates.
Place hold on a book in OPAC. Check that More options is collapsed.
(If you force item level holds, it will open.)
Set OPACMandatoryHoldDates to Hold start date.
Refresh place hold page. More options is expanded now.
Click Place hold. You should see an alert and focus goes to start date.
Set OPACMandatoryHoldDates to Hold end date. Repeat place hold.
Set OPACMandatoryHoldDates to Both hold dates. Fill one. Place hold.
Bonus: Place hold on multiple biblios. Repeat former steps.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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 cd7a8840d54a8db00096e1e9044e600c226935a8) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 28320fe33aab11f3ec4fd4ee33e80ca4c6c70fae) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
I add a CSRF token as a parameter in the link for deleting a news
entry, which solves the problem.
TEST PLAN
1) Apply the patch
2) Go to "Tools > News > New entry"
3) "Display location" should be set to "Staff interface"
4) Fill in the fields
5) Return to the homepage
6) Delete the created news entry
7) The "Additional contents" page is displayed, and the deleted news
entry no longer appears
8) Return to the homepage; the news entry no longer displays
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>
Edit: adapted the template change to latest master inline Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f4b858778268730d49dc9f11d9d2d9bf6faf3f6e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d9d95873427cff8347d2a8d83cbfff4cb3d7f89c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Shi Yao Wang [Wed, 26 Jul 2023 16:58:39 +0000 (12:58 -0400)]
Bug 26994: List names in alphabetical order in Suggestion filter
Display list of names in alphabetical order when using the Suggestion information filter in Suggestions management
Test plan:
1. Add different purchase suggestions from various patron's names
2. Go to Acquisition > Suggestions
3. Click on the Suggestion information filters on the left-hand side
4. Use one of these drop-down menus: "Suggested by" or, "Managed by" or "Accepted by"
--> notice the list of names in menus, names aren't displayed from A to Z
5. Apply patch and refresh page
6. Redo step 4
--> notice now it's sorted alphabetically
Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bcaaffa838c3276b8590863c826cb133dae03258) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 099d25a44a2e659eefb263f01e9f3efee5c843b4) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Fri, 21 Jul 2023 15:25:00 +0000 (15:25 +0000)]
Bug 34171: Use barcodedecode when attaching items to another record
Bug 26351 added barcodecode that transforms scanned barcodes either
by using itemBarcodeInputFilter or via a plugin to various pages in
Koha, including checkout and checkin. But the feature for attaching
items to a new record was missed.
To test:
* Add an item with barcode "ab" to any record
* Set itemBarcodeInputFilter to "Remove spaces from"
* Search for another record in the catalog
* Edit > attach item > "a b"
* The item is not found.
* Apply patch, restart_all
* Try again with "a b"
* Verify that the item is found and attached to the record
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cd033bfc60f9700d0d52986a95da55a92c88ee01) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e65437199ae3c2abb0467c14b2a3884be524b087) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Marcel de Rooy [Thu, 5 Oct 2023 09:56:30 +0000 (09:56 +0000)]
Bug 34990: Add persistent header when sending msg to RabbitMQ
Test plan:
NOTE: It is very hard to add a Koha unit test for adding this
single header when communicating to RabbitMQ via Stomp plugin.
When we would mock the send, we are only testing if perl can
pass a hashref to a subroutine ;)
Do NOT yet apply this patch.
Make sure that RabbitMQ runs.
Stop the koha-worker for long_tasks:
koha-worker --stop --queue long_tasks myclone
Stage a MARC file.
Check queues with rabbitmqctl list_queues.
Look for: koha_myclone-long_tasks 1 (at least 1)
Stop rabbitmq (something like /etc/init.d/rabbitmq-server stop)
Start rabbitmq (/etc/init.d/rabbitmq-server start)
Check queue again with with rabbitmqctl list_queues.
Look for: koha_myclone-long_tasks 0
Your messages have been gone.
Now apply this patch.
Reiterate the former steps. But note that you will still see
a non-empty queue in the last step:
koha_myclone-long_tasks 1 (at least 1)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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 5797f5095ecb9fc1eab3fe129eab83c048cc422b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8c0ee5ce0dbeb5427b214060483e5235d8a6fa73) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Marcel de Rooy [Wed, 18 Oct 2023 13:58:17 +0000 (13:58 +0000)]
Bug 32305: Counterpart for es_indexer_daemon.pl
This is a kind of copy-and-paste variant of background worker.
We probably could do better than having two scripts here ;)
Test plan:
See former test plan. Apply it to ES indexing.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed queue from query at MQ side. Discussed on IRC. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 709dabb7e8c6285d5c93ece3baed845123cd3a8e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 17560ba44333f23e611f74f3879287575c116d4c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Marcel de Rooy [Tue, 17 Oct 2023 14:43:32 +0000 (14:43 +0000)]
Bug 32305: Worker should ignore wrong status or queue in MQ mode
MQ mode: The worker has seen that MQ is running and consumes messages
instead of polling db only.
Test plan:
Stop worker for long tasks.
Make sure that Rabbit MQ runs.
Stage a file. (This adds a long task.)
Goto staff view of jobs and cancel this job.
Check if job is still in MQ with rabbitmqctl list_queues.
Now start worker for long tasks.
Check if job is gone in MQ with rabbitmqctl list_queues.
And check logfile for the adjusted warning like:
[WARN] Job 5 not found, or has wrong status/queue main:: /usr/share/koha/misc/workers/background_jobs_worker.pl (134)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed queue from query at MQ side. Discussed on IRC. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f1edd8fe77897c0f293f3d11ac20fd9ddb8bde8f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 20b0687b74f923a65b5db0bee2a8a4d39af4e849) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 35053: Make sure request is checked as an item-level request if item_id passed
This patch makes the validation code have the `$item` variable defined
when checking holdability, in the case both `item_id` and `biblio_id`
params are passed.
Otherwise, if the requested item is not holdable, but a biblio-level
hold *could* be placed, the item-level hold is placed.
This is highlighted by the regression tests.
To test:
1. Apply the regression tests patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests don't pass. A request that should be rejected is allowed
because biblio-level hold is allowed.
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! Item-level rules are checked and thus the
request rejected (code 403)
5. Sign off :-D
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 82e0edd87606ce05511b33ddeeea10f2b9e68f3d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8a945f3e811cfb39c0a0212554b1adfca2b041bb) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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 683b74d202d57f4c3fdad62d81b92bf49f7d1fc4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6de7575caee576335b2a764a117b70cc1171c472) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Lucas Gass [Wed, 18 Oct 2023 20:31:32 +0000 (20:31 +0000)]
Bug 35101: Stop screen from jumping back to top when using barcode.pl plugin
To test:
1. Set 'autoBarcode' to something other than 'don't generate automatically'
2. If the a framwwork make sure some 952 fields have the barcode.pl plugin enabled
3. Add a new item and click the '...' next to the 952 field with the barcode.pl plugin enabled.
4. The screen jumps back to the top, annoying.
5. Apply patch
6. Try again, it should not jump anymore!
Signed-off-by: Barbara Johnson <barbara.johnson@swbell.net> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eec5d7e4be7d092f07e47468c50a4ec48b842dc1) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 85d38e5ef587657ba5681825cbd0c5fda5094047) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Lucas Gass [Mon, 16 Oct 2023 19:37:41 +0000 (19:37 +0000)]
Bug 34531: Fix template logic to not hide patron restrictions
To test:
1. From BorrowerUnwantedFields Hide Gone no address flag (gonenoaddress) and Lost card flag (lost).
2. Got to memberentrygen.tt and see that Patron restrictions is now hidden
3. Apply patch, now the Patron restrictions field should not be hidden.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7e23abcccb4868637d542147f25e6ca437ec5622) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 40a45f6d7545304bd4687a1c1673e5b0801eca46) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Owen Leonard [Sat, 14 Oct 2023 14:20:00 +0000 (14:20 +0000)]
Bug 34980: Remove the use of event attributes from title-actions-menu.inc in OPAC
This patch updates the include file used to show actions with each
search result, removing two instances of "onclick" in favor of an event
handler class which was already in use elsewhere.
To test, apply the patch and log in to the OPAC.
- Perform a catalog search which will return results.
- Test the "Save to lists" link under any search result. The "Save to
lists" pop-up window should appear.
- View the contents of a list which contains some titles.
- Test the "Save to another list" control. The same pop-up window should
be triggered.
- Tag at least one title in the catalog and view the "Tag cloud" page.
- Perform the same test with the "Save to lists" button in the table of
our tags.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5dd4043b06b462080858061dc5bf6b1b193d5c33) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 743538abe787c98b36926518926968a00557b051) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This patch updates the markup of the patron search results table so that
the "actions" column (Edit, Check out) are excluded when using the
DataTables "Export" button. The configuration was already in place but
the column header lacked the required class.
To test, apply the patch and perform a patron search which will return
multiple results.
Click the "Export" control at the top of the patron search results
table and choose "Print." In the print preview there should be no final
column containing "Edit" and "Check out."
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5bad6a6d4963010c43f14f8af7c9dff7c03d36d4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c2970fd838688e6ac861a9e9e5595122ca1d7b00) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab14e7f8ebe200de748a38f1d795c2588048aa3a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 28b8522ac62a29b78912980654ba94dac303ce98) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
The problem is in the patron_messages.inc file on line 25. The variable "expiry" is used, but it should be "patron.dateexpiry" because the patron's card isn't expired yet.
TEST PLAN
1) Go to “Patrons > + New patron”
2) Create a patron with an expiry date that is less than 30 days in the future
3) Go to the "details" tab of this account
4) Notice that the date is missing after "expires on":
"Expiration: Patron's card will expire soon. Patron's card expires on Renew or Edit details"
5) Apply the patch
6) Reload the page; the expiry date should now be displayed
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d4e5a66bd8ce72a997f7c4285efa84d4ee5c04f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0231f8d14444a18fd8db2de1f5e5d4365ec2f1b7) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
"""
- change and document (adduser(8)) that --disabled-password will behave
like --disabled-login and additionally set the shell to
/usr/sbin/nologin.
"""
https://salsa.debian.org/debian/adduser/-/commit/427ade7d9116af5af7baa9d0c538e14fa86560cf
Test plan:
Confirm the above and that the change makes sense.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1c03352ae57a3c8f6f77d64a026a5d87d6f6830e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c3d30dc4e86aecbcbd87a5f5a2a057cdf86eb215) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 34271: Remove a few Logger statements from REST API
See also bug 22678.
We should call app->log->warn, ->debug, etc. instead of Logger.
Test plan:
The simplest way I tested V1, is add a app->log->warn in the try
blocks, restart all and check that your log4perl is set correctly
too.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a3ce05012b8a2ee6b47c82d14f61c082798ab8a1) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c2f1a41670f52835d1d0b00f12eb8faebc2ad636) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Blou [Mon, 16 Oct 2023 15:07:39 +0000 (11:07 -0400)]
Bug 35064: Extra parenthesis in db_revs/220600072.pl
See Bug 34332.
The same error it corrected is also present in the update process.
This patch simply removes an extra parenthesis in the tt instruction.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f0f860a43dd7bc32af36caf941a31efb8e24aca6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1de535046a9285ddc5f1baf9d36f11b6fe71180c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Owen Leonard [Tue, 10 Oct 2023 15:12:12 +0000 (15:12 +0000)]
Bug 34119: Improve staff interface print stylesheet following redesign
This patch makes some updates to the staff interface print stylesheet in
order to make it work better following the staff interface redesign.
To test, apply the patch and clear your browser cache if necessary.
In the staff client, go to various pages and view the print preview. The
print view should exclude the header navigation, header search, page
toolbars and page sidebars.
- Pages with tabbed displays should show content from all tabs: e.g.
bibliographic details, MARC editor.
- In Reports, check that report results print well.
- Pages with DataTables should print with table information visible but
table controls hidden.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c8748cd289f37cfa871b8fe368422c4ea58f1c0d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b95cde78ba81ff379e2384cdb4c973f506e9761b) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Owen Leonard [Tue, 10 Oct 2023 14:24:22 +0000 (14:24 +0000)]
Bug 34119: (Preliminary) Run stylelint fixes on print.css
This patch corrects errors raised by the new stylelint configuration in
print.css. Most of the fixes were made automatically by using the
"--fix" option:
- Expected indentation of 4 spaces
- Unexpected whitespace before ":"
- Unexpected unit
- Expected single space before "{"
- Expected newline after ";" in a multi-line declaration block
Errors from use of "!important" have been ignored.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e8f6a3bfee47d90ad3db7f3a934e3f6af5c17032) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dad427b2d6791383800bcf19cd2c3eed09c466f3) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 34901: Display transit status on patron holds tab only if hold found value is "T"
Check the transit status of the *hold* in addition to the transit status
of the *item*, to avoid displaying a misleading transit status on
item-level holds when the item is actually in transit for a different
hold
To test:
1. Create a record-level hold for Patron A for pickup at a library other
than the logged-in library
2. Check in an item to fill that hold
3. Put an item-level hold on that same item for Patron B at a different
library other than the logged-in library
4. Open Patron A's and Patron B's account details pages in separate tabs
--> Note that the Holds tab on Patron A's account detail page correctly
shows that their hold is in-transit
--> Note that the Holds tab on Patron B's account detail page incorrectly
shows that their hold on the same item is also in-transit
4. Apply patch
5. Clear browser cache
6. Refresh both patrons' account details pages
--> Confirm that the holds tab on Patron A's account still correctly
says their hold is in-transit
--> Confirm that the holds tab on Patron B's account now correctly shows
a blank status for their hold
7. Cancel Patron A's hold
8. Check in the item again to put it in transit for Patron B's hold
9. Reload Patron B's account page
--> Confirm that the holds tab on Patron B's account now correctly says
their hold is in-transit
Signed-off-by: Katariina Hanhisalo <katariina.hanhisalo@xamk.fi> Signed-off-by: Tuomas Kunttu <tuomas.kunttu@kouvola.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fa1485639b6727061572c310731f9b5a3f79adcd) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9411b66eaa35b415c670216ab8e695baa21f9e08) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Marcel de Rooy [Thu, 12 Oct 2023 09:56:25 +0000 (09:56 +0000)]
Bug 35042: Remove set datelastseen to null on table in Members.t
Non-trivial was adding the category_type <> S.
Test plan:
Run t/db_dependent/Members.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f08fc018670a356103a80a41ea83aa67e33476fa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6dbbbef3e9481d611c616e3af12f16316ea608e6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This patch updates the holdings table on the OPAC's bibliographic detail
page so that home and current library columns can be sorted correctly by
library name. There have been changes to the way the template shows
these values, but the DataTables "data-sort" attribute on the table cell
had not been updated accordingly.
To test, apply the patch set the OpacLocationBranchToDisplay system
preference to "home and holding libraries."
- Make sure home and holding library columns are not hidden in the
table settings under Administration -> Table settings -> OPAC ->
holdingst.
- Locate a bibliographic record in the OPAC which has multiple items
from different libraries.
- Test that the home and current library columns sort correctly by
library name.
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 06d182bc82b40872970d99055c449d3c406724fa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4ebfdba0cb9513631c12454f81bcddc7228120a6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Thu, 12 Oct 2023 14:53:50 +0000 (14:53 +0000)]
Bug 34881: (QA follow-up) Remove stray paren
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0128ce5b100df4f96a9b79076077459d3ea8b6c2) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 43ab6e2825aee6c11c73b53981eb6963af580928) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Emily Lamancusa [Wed, 11 Oct 2023 13:40:05 +0000 (09:40 -0400)]
Bug 34881: Improve idempotency of DBRev
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 d9463f82c4344b93e4b5d0aea64339bb6c3d492a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bcc160ebb659d5fdb70cef5322b44f41c5eff5d9) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Julian Maurice [Tue, 10 Oct 2023 09:53:17 +0000 (11:53 +0200)]
Bug 27249: Replace DateTime->now by dt_from_string
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1a2288052dab4709ba5c1236bc8141384e2d1aa5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ff565dd3b839199ce2a152f353cba882392080ac) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Julian Maurice [Tue, 10 Oct 2023 09:53:00 +0000 (11:53 +0200)]
Bug 27249: Add missing POD for Koha::Exceptions::Calendar
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9e2a258f6f6213629c33bbc838b4fbac5366c544) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1ddb79448ce1655005e322118bcedda4b86b567f) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Julian Maurice [Tue, 10 Oct 2023 09:52:26 +0000 (11:52 +0200)]
Bug 27249: Fix code style
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4b4028d783a3660b9e16e647ef0e51c624ef3ff6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7cb8e222e41e3ecab9ee678534f1ee046debb028) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Julian Maurice [Thu, 24 Aug 2023 07:27:28 +0000 (09:27 +0200)]
Bug 27249: Catch NoOpenDays exception while checking out an item
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 4eec4020fa66f789f77637234aab81c46c3e6972) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b1feff4228b68260221fdad1d9fb2bee3904378a) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Julian Maurice [Tue, 18 Jul 2023 08:26:03 +0000 (10:26 +0200)]
Bug 27249: Prevent infinite loop when searching for an open day
Calendars can be configured in a way that all days are closed.
The simplest way to do that is to configure a repeatable holiday for
every day of the week.
With such calendars, searching for an open day will literally take
forever.
This patch sets a hard limit on how many iterations are allowed before
giving up. This limit is set to the arbitrary value of 5000, which
should be large enough to be able to consider there is no open days if
we haven't found any with that many iterations, and small enough to
allow the loop to end quickly
Test plan:
1. Set system preference 'useDaysMode' to 'Use the calendar to push the
due date to the next open day' ('Datedue'). Make sure the existing
circulation rules do not conflict with that setting.
2. Browse to Tools » Calendar
3. Set every day of the week to "Holiday repeated every same day of the
week"
4. Issue an item to a patron
5. Check the box and select 'Renew selected items'
6. The renewal should fail pretty quickly
Signed-off-by: Sam Lau <samalau@gmail.com> 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 2b58f4d89ca2d71c8979e4d87759fc45d63795f4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0f304c55e23ab382237846acb80ce94838f3e3f8) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 34800: Adding openhub links for Koha contributors
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2a7be7d6c86926226dab4356be3f760f5c166d19) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 458517fe0c3351c748dc50e2916ba4cc118620f1) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Julian Maurice [Tue, 17 Oct 2023 15:13:55 +0000 (17:13 +0200)]
Bug 35079: Replace --force-extract by --generate-pot={always,auto,never}
This restores the original behaviour of always building the POT file
in order to not break existing workflows
Option --force-extract is deleted in favor of a new option
--generate-pot that can have 3 values:
* always: always build the POT file. This is the default value
* auto: build the POT file only if it does not exist
* never: never build the POT file
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Julian Maurice [Tue, 17 Oct 2023 14:33:37 +0000 (16:33 +0200)]
Bug 35079: Rebuild POT files only if necessary or asked explicitely
By default, gulp tasks po:create and po:update won't rebuild the POT
files if they already exist.
Both tasks gained a new option --force-extract to rebuild them
unconditionally
This makes it possible to create/update PO files for multiple languages
sequentially without rebuilding the POT file for each language.
For instance:
gulp po:update --lang fr-FR
# do something with the PO files
gulp po:update --lang en-GB
# ...
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 12 Oct 2023 09:44:16 +0000 (11:44 +0200)]
Bug 35043: Use Locale::PO->quote
We have our own "quote_po" sub that is stating that Locale::PO::quote
is buggy because it does not deal with quoting new lines correctly.
However it seems that it is fixed now.
Ideally we could use Locale::PO::quote everywhere, but it does not
escape tab characters:
$string =~ s/\\(?!t)/\\\\/g; # \t is a tab
This means the following:
msgid "Tabulation (\\t)"
msgstr "Tabulation (\\t)"
become:
-msgid "Tabulation (\t)"
-msgstr "Tabulation (\t)"
And we are seeing the following on Weblate:
https://snipboard.io/BjQmDC.jpg
Note that Locale::PO has not been updated since 2014...
The real problem behind this is that we have 2 methods to quote strings.
At first glance it seems that Locale::PO::quote was not used before, but
with the introduction of the koha-i18n project we will have scripts that
will use Locale::PO->save_file_fromarray, which uses Locale::PO->quote
=> Those scripts will be used on the translation server for post
processing (security reason, marking potential XSS strings as fuzzy).
Test plan:
0. Do not apply the patch
1. gulp po:update --lang LANG # Replace LANG with your favorite language
code
2. git commit -a -m"init PO files"
3. Apply this patch
4. Repeate 1.
5. git diff
=> The change is about the "Tabulation" and "New line" strings from
tools/csv-profiles.tt
6. Translate them (replace the \t and \n with %s) and remove the fuzzy
flag
7. install the template: cd misc/translator && perl translate install
LANG
8. Enable the language, use it and go to the "Nouveau profil CSV" view
=> Notice that the \t and \n are correctly displayed.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
It *could* come from this changes:
https://git.savannah.gnu.org/gitweb/?p=libunistring.git;a=blob;f=NEWS;h=5a43ddd7011d62a952733f6c0b7ad52aa4f385c7;hb=HEAD
* The functions u*_possible_linebreaks and u*_width_linebreaks now make it
easier to work with strings that contain CR-LF sequences: In this case,
in the returned array, it will return UC_BREAK_CR_BEFORE_LF followed by
UC_BREAK_MANDATORY (instead of twice UC_BREAK_MANDATORY).
The command used is:
% msgmerge --backup=off --quiet -F --update misc/translator/po/fr-FR-staff-prog.po misc/translator/Koha-staff-prog.pot
No matter the value of --width.
One solution is to use --no-wrap, and never wrap :)
I sent an email to the list about this suggestion https://lists.katipo.co.nz/pipermail/koha/2023-October/060143.html
Jonathan Druart [Fri, 6 Oct 2023 14:48:57 +0000 (16:48 +0200)]
Bug 34959: Sort PO files correctly
The PO files are not sorted when we update them which leads to
unnecessary changes that are commited: hard to see differences and
make git index grow superfluously.
Test plan:
0. Do not apply this patch
1. gulp po:update --lang es-ES
2. git commit -a -m"First PO update"
3. Run again the gulp update command
4. git diff
=> You have a lot of changes generated here, the po:update is not
idempotent.
5. Apply this patch
6. Run the gulp update command
7 git commit -a -m"PO update after 34959"
8. Run the gulp update command
9. git diff
=> No changes are generated
Note that this patch will all the entries by files, and per line
numbers.
It fixes a bug in some condition, where we add information/context about
the string. For instance search for "For the first occurrence" in the
file. Prior to this patch this was not correct, we didn't add info about
the first occurrence (but whichever in the list).
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Martin Renvoize [Mon, 9 Oct 2023 15:37:22 +0000 (16:37 +0100)]
Bug 35014: Only set time for enable-time flatpickr
This patch adds a check to the onChange function such that we only
attempt to set the default time on change for time enabled flatpickrs
when the date is entered manually.
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 5b25b26f70c21c609793f10706c04c9dbce4a5ad) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Mon, 9 Oct 2023 19:58:50 +0000 (19:58 +0000)]
Bug 35015: (QA follow-up) Fix paid transactions filter in the staff interface
Same problem: we added a column without adjusting the filter.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4b1d4ca170be6d35e72953a4eb233f4ddf4037a4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bd078e5ce42d60c64e6bb55dbd87ee69acf9e641) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Matt Blenkinsop [Mon, 9 Oct 2023 16:11:48 +0000 (16:11 +0000)]
Bug 35015: Adjust column index in fnFilter
This patch fixes the column index in the call to fnFilter following the
addition of a new column to the table in bug 32341
Test plan:
1) Add some charges to a patron account
2) Pay some of these charges so that they are no longer outstanding
3) In the OPAC log in as that patron and navigate to the Charges tab in
their account
4) Observe that all charges are listed, even if they have been paid and
clicking the Show all transactions button has no effect even if
clicked multiple times between the different filtering options
5) Apply patch
6) Refresh page and now the settled charges should be filtered out
7) Click the Show all transactions button and it should correctly update
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 7cf209a550260eb1dc60dd7457c8b8e197a9b5ef) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 654594a789bd292cce4942a064e4b114fac3576f) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Fridolin Somers [Mon, 9 Oct 2023 08:57:29 +0000 (22:57 -1000)]
Bug 35010: In record checkout history do not show anonymous patron link
In a biblio record checkout history, when a checkout is anonymized the
patron id has been replaced by anonymous patron id.
In this case we should not show anonymous patron link.
It looks like a real patron did this checkout.
Test plan :
1) Set an existing patron id in system preference 'AnonymousPatron'
2) Perform anonymisation on old checkouts (or edit database manually)
3) Look at a record checkout history with old checkouts
=> You see 'Anonymized' for anonymized checkouts
4) Set system preference 'AnonymousPatron' empty
5) Look at same record checkout history
=> Check no error
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 dad04bbf0a1915930a95bdb3fea73f47602be884) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 704ed483000912d5f9935da31e312940cb01c960) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Matt Blenkinsop [Fri, 29 Sep 2023 09:04:52 +0000 (09:04 +0000)]
Bug 34883: Add unit test
prove -v t/db_dependent/Koha/Patrons/Import.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b4f928003eac4bcd5d1c778cda7b346151782d45) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c414e9a43bbc850ed2c54f9ef499a9b2201bdb2c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Matt Blenkinsop [Mon, 25 Sep 2023 10:34:18 +0000 (10:34 +0000)]
Bug 34883: Stop patron expiry date being set to NULL during import
A regression has been identified whereby an empty field in the dateexpiry field in a patron import file will cause the patron's expiry date to be set to NULL. This patch addresses this by checking for an empty field and using the existing expiry date if one is found.
Test plan:
1) Setup a csv with column headers:
surname firstname branchcode categorycode cardnumber dateenrolled dateexpiry
2) Add values:
Acosta Edna CPL PT 23529001000463 02/01/2013
3) Leave the dateexpiry column blank
4) Check Edna and make a note of her patron expiry date
5) Run the import_patrons.pl script with the following flags:
a) --file <filepath_for_your_csv_file>
b) --matchpoint cardnumber
c) --confirm
d) --overwrite
6) Check Edna, note her expiry date is now set to NULL
7) Manually edit Edna's expiry date to be reset to what it was before you ran the script
8) Apply the patch and restart_all
9) Repeat step 5
10) Check Edna, this time her expiry date should be the same as the value you set it to in step 7
11) Sign off!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f4f77357f63013a21e700f14df82ca9261403310) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 08002cd0b94987164e93650e07ecb32fdfdf8822) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
For some Unimarc biblio records, the OAI Server returns a bad XML
document, ie a document with extended characters, such as accents, not
encoded in UTF8. It seems to come from somewhere in MARC::Record library
trying to deduce biblio record endoding from some fields. It may work
for MARC21 records. It doesn't for Unimarc records. So it's necessary to
send to the method transforming record into XML the marcflavour. This
way there is no encoding guessing from Unimarc biblio records content.
https://bugs.koha-community.org/show_bug.cgi?id=34467 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 216a2dcb9f571134fd2fbb6ac5aeca096d0e8ef6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5f05074c118aeb4579acd4098a84f7ab2d077b32) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Thu, 17 Aug 2023 04:28:29 +0000 (04:28 +0000)]
Bug 34549: Strip non-XML chars during TransformHtmlToMarc
This patch strips non-XML characters from inputs during
TransformHtmlToMarc.
To test:
0. Apply patch
1. koha-plack --restart kohadev
2. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl
3. Fill out record and use the text from "Text file containing control characters"
as the title
4. Click Save
5. Note that your record displays without any warnings like the following:
Error: invalid data, cannot decode metadata object
parser error : PCDATA invalid Char value 27
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Squashed the tidy patch. Still needed a few spaces to satisfy qa tools. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3e1d32f9caaab56acd8f4b338a859eb599955634) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 871d6eaa3fbb5eba14e17c3ebc6a46db708e5483) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Wed, 4 Oct 2023 09:42:44 +0000 (11:42 +0200)]
Bug 34982: Add pagination to the currencies table
Otherwise we only display the first 20.
Test plan:
Create more than 20 currencies and confirm that you can know
filter the table and see all the currencies.
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 6b6534a22a60f8797c678c8ea5d66eefdb474141) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 70af8ac5643346ced39d5826faeb38cbcc066d87) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>