Commit graph

50991 commits

Author SHA1 Message Date
Brendan Lawlor
6bea7de002 Bug 36295: Space out content blocks in batch record modification
This patch adds a float clearing class to a line break in the batch record modification template to fix a spacing issue in Chrome.

To test apply the patch and go to Cataloging -> Batch record modification

There should be space between the two sections.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 566894f058)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 813d06de27)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 20:38:18 +00:00
80dddfe666 Bug 36295: Space out content blocks in batch record deletion
This patch adds a float-clearing line break to the batch record deletion
template so that the "Record type" section has visual separation from
the record number submission tabs.

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

There should be padding between the two sections.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 55fbfffa0e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8b11a0f8ea)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 20:38:18 +00:00
fcc1ca28c4 Bug 35977: (follow-up) Cleaner working approach
This patch removes the Date_from_syspref recently added and replaces it
with the correct parseDate call as per bug 35559. We also clean up the
code around setting the input value in the first place and use iso which
is what the rest of flatpickr expects and now is handled correctly in
futuredate pickers.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1ff3d65c70)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3880307a9f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 20:36:11 +00:00
9b29e9a2ab Bug 35977: Nuke value if setting required
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 47400c3273)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 87d6a13172)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 20:36:11 +00:00
046e440182 Bug 35977: Set holddatefrom default to today
This patch sets the holddatefrom date to today by default on the opac.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c341b2d375)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 648feb2594)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 20:36:11 +00:00
3f7acd904f Bug 16567: Correct RSS feed validity errors
This patch corrects a few markup errors in the XML feeds to make the
feeds validate correctly. The template has been largely re-indented to
improve readability and eliminate tab characters.

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

- Open the RSS link appearing after the "Your search returned..."
  header.
- Depending on how your browser handles XML documents you may need to
  view source on the page to see the actual XML markup.
- Copy the source and paste it into the W3C feed validator:
  https://validator.w3.org/feed/#validate_by_input
- The feed should be found to be valid.
  - In my tests you'll get a "Recommendation" about "Self reference
    doesn't match document location." I think this recommendation
    doesn't apply.

Perform the same test with the other two available formats: Atom and
OpenSearch:

- Change the end of the RSS feed url from '&format=rss' to
  '&format=atom' and validate the result.
   - The same "self reference" recommendation will come up, and again I
     think we can ignore it.
   - There is another recommendation about "Two entries with the same
     value for atom:updated." The updated time is set to the same time
     as the feed itself (the time when the feed was generated. Maybe
     this is incorrect. If so we need a follow-up that exposes a
     different value to the template. biblio.datecreated maybe?
- Change the end of the feed url from '&format=atom' to
  '&format=OpenSearchDescription' and validate that result.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ee960bd45f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1557d835a8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 20:33:18 +00:00
5af4fceeae Bug 35979: (follow-up) Add check in ->enqueue
Foundation for removing same check elsewhere (later on).

Test plan:
Run t/db_dependent/Koha/BackgroundJob/BatchUpdateBiblioHoldsQueue.t

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

PA amended: Fix bug # in commit message

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c317bb34c0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f09739fcec)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 20:23:43 +00:00
cd0b535b1f Bug 35979: Check pref before inserting holds_queue background jobs
Test plan:
Confirm that modrequest does no longer insert when pref is off :)

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 310ba95efa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 042df55f46)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 20:22:48 +00:00
36cb0b2573 Bug 32695: Fix search strings for 775, 780, 785 and 787
In the past due to some misunderstanding of the MARC standard
we built the search links for these fields using $a and $t with
the title index. But we actually need to search $t as title
and $a as author.
This patch fixes the templates for the MARC 7xx fields:
* 775
* 780
* 785
* 787

To test:
* Ensure systme preference 'UseControlNumber' is set to don't
* Create a record with the linking fields above
* Look at the OPAC and staff interface detail views
* Verify the content of your fields shows and the links combine a+t as a title search
* Apply patch
* Verify you have nicely formatted links now

Example:
775 _ _ ‡asomeone‡ttitle775
780 0 2 ‡asomeone‡ttitle780
785 0 2 ‡asomeone‡ttitle785
787 _ _ ‡ilabel:‡ttitle787‡asomeone

Signed-off-by: Sabrina Kiehl <kiehl@mpis.mpg.de>
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 b2b3d88b73)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 69d8b560d9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 20:20:14 +00:00
8a07aa6bdd Bug 30318: Don't reset messaging preferences when form is empty
In testing, the messaging preferences are set in the form when EnhancedMessagingPreferences is enabled.
Switching categories silently updates the preferences unless you have made changes, in which case the
user is warned and can confirm if they want to reset or not. The code only applies to patron creatoin, and
does not seem to be taken into account during OPAC self-registration.

It seems the silent defaulting when saving can be removed in favor of the current updates/warns in the actual
form.

To test:
 1 - Set some messaging preferences for at least two categories
 2 - Enter a new patron
 3 - Confirm switching categories correctly defaults the messaging preferences
 4 - Edit the preferences and switch to another category with defaults
 5 - Confirm the warning appears, and preferences are set if confirmed and ignored if not
 6 - Set to a category with defaults, uncheck all, and save
 7 - Ooof, patron is defaulted
 8 - Apply patch
 9 - Repeat 1-5 and confirm nothing has changed
10 - Set to a category with defaults, uncheck all, save
11 - Confirm patron is saved with no preferences

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 70fde44d4f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 86cc4b4d24)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 20:17:51 +00:00
c82a677a4c Bug 36282: Chomp whitespace around opac i18n strings
Same logic as bug 26816 but to OPAC

Test plan:
1) Apply test plan patch only
2) Visit opac home:
<opac_url>/cgi-bin/koha/opac-main.pl
3) Notice there's a space between 'Translated string' and ':', even though the markup does not contain a whitespace
4) Apply 2nd patch
5) Notice the white space is gone

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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 b9f97ec015)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5559ebc3bf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 20:15:44 +00:00
8f521bdb3c Bug 34963: Restore the ability to blank fields when editing a suggestion
Regression introduced by bug 23991.
We don't want to remove the fields from the edition if they are empty.

Ideally we should have separate parameters for edition and search, but
this is the low-effort fix, and hopefully won't introduce side-effects.

Test plan:
Try to edit a suggestion and blank some fields
Try to search for suggestions using the search form on the left of the
screen

Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cd1f4145fe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e6a2b1afde)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:45:09 +00:00
e5181851c7 Bug 36386: Pass user and group to Net::Server
This prevents the User/Group Not Defined warns in syslog.

Test plan:
Restart sip and check your syslog.

KTD Test Plan:
1) Stop your SIP server
2) Run "perl C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/koha-conf.xml"
   We need valid XML without any valid SIP settings to the output goes
   to the command line
3) Note the warnings
4) Apply this patch
5) Repeat step 2
6) No warnings!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 2973a4e81a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 89ce196ea7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:39:26 +00:00
448ac1a22f Bug 36420: Allow Basic authentication using cardnumber
This patch makes the API Basic authentication work with cardnumbers.
The used `checkpw_internal` method already does the fallback check.

To test:
1. Apply the unit tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/auth_basic.t
=> FAIL: Tests explode! [1]
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

[1] This highlights an underlying bug! Instead of getting 403, etc we get a 500. This is because of the internal fallback mechanism allowing the cardnumber+password combination, but then the Koha::Patron->find... not finding :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.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 154a2ea9ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dd58ce2a03)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:33:20 +00:00
b91a66df91 Bug 36420: Unit tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.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 5c3ad38157)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fa768d5ed4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:33:20 +00:00
87efbaa43e Bug 30987: Fix relationship fields for patron full and quick add forms
To test:
1. APPLY PATACH and restart services.
2. Find the borrowerRelationship system preference. The description should no longer include the words "Leave empty to deactivate."
3. Populate the system preference with at least 1 choice.
4. Find a patron category with can_be_guarantee set to 'Yes'.
5. Quick add a patron of that type, making sure the relationship field shows in the Patron guarantor section. ( You have to +Add gaurantor before this field will show )
6. The values in the dropdown should refelct the borrowerRelationship values.
7. With BorrowerMandatoryField make relationship mandatory.
8. Try step 5 again, this time the Relationship field should be mandatory.
9. Remove the field from  BorrowerMandatoryField and add it to BorrowerUnwantedField.
10. Do step 5 again, the relationship field should not show on the quick add form.

Signed-off-by: Myka Kennedy Stephens <mkstephens@fosgail.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fccbd327d9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7083a9dfbe)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:31:23 +00:00
Janusz Kaczmarek
2bb2dbf959 Bug 33205: (bug 28268 follow-up) Method call $row->authid inside quotes - produces meaningless warning
Bug 28268, in
Koha::MetadataRecord::Authority::get_all_authorities_iterator,
introduced a warning:

warn "Something went wrong reading record for authority $row->authid: $@\n";

But a method cannot be called from within quotes in Perl - extrapolation
does not work for functions/methods.  So, if something really goes
wrong, this line of code produces a warning like:

Something went wrong reading record for authority
Koha::Schema::Result::AuthHeader=HASH(0x55cf7e0d0958)->authid: Empty
String at /usr/share/perl5/MARC/File/XML.pm line 450.

which is not very informative -- authid is missing.

Test plan
=========
Hard to reproduce.  This problem occurs only in rare cases of some weird problem
in stores authority data or if a auth record had been deleted after a ES reindex
action has been initiated.  But the problem in the code and the fix seem obvious.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9c2510ea2e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fb3473dfe3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:29:09 +00:00
3ea35a353f Bug 36552: (QA follow-up) Add a theoretical check on $record
Theoretically, it might be empty? Note the check too in the
other script.

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 cc834ba187)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7c4ea8ee7f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:24:53 +00:00
b0a9ed7cd6 Bug 36552: (QA follow-up) Add POSIX module
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 34746f5706)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6b490b2e94)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:24:53 +00:00
Janusz Kaczmarek
0c553004cd Bug 36552: Update record 'date entered on file' when duplicating a record
The 'date entered on file' (MARC21: 008/0-5, UNIMARC: 100a/0=7) of a record created
by duplication of an existing record should be set to the current date instead of
having the value of the original record.

Test plan
=========
1. Check the 'date entered on file' of an existing biblio / authotiry record
   (MARC21: 008/0-5, UNIMARC: 100a/0=7).
2. Duplicate the record by Edit > Edit as new (duplicate)
3. Control the 'date entered on file' value - it will equal to that of the
   original record.
4. Apply the patch (restart plack).
5. Repeat step 2.
6. Check the date - it should be the current date.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

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 dd8f9e1266)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0cd9d2f184)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:24:53 +00:00
1d124d492b Bug 34621: Tidy import_patrons.pl
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 c6641ef24f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit aabe54000a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:21:42 +00:00
4e66af5a9f Bug 34621: Tidy Import.t
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 6a4c2dd03a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f065c42a7a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:21:42 +00:00
9c70fafe53 Bug 34621: implement Patron import option to 'Renew existing patrons' 'from the current membership expiry date'
Test Plan:
1) Test importing a patron with the "from the current membership expiry date" option,
   note it does not work
2) Apply this patch
3) Restart all the things!
4) Re-test, note the expiration was renewed from the patron's current
   expiration date!

Signed-off-by: David Nind <david@davidnind.com>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>

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 b89d744e86)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3a99bc8bb1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:21:41 +00:00
518d13d5d3 Bug 36473: (follow-up) Additionally warn the stringified exception
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 903a8685c6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bc7842c649)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:19:30 +00:00
161815ca68 Bug 36473: (follow-up) Add biblionumber to warning
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1b99de33f9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bab05efd81)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:19:30 +00:00
db3e2e512d Bug 36473: (follow-up) Correct biblio to bibliographic
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0191500149)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 75372edaa0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:19:30 +00:00
4ba825eef4 Bug 36473: Handle Invalid Metadata Exceptions in totalissues.pl
This patch wraps the call for record in an eval, and catches any invalid metadata
exceptions, letting the warning show, but allowing the script to continue
To test:
1 - In default KTD record 369 has problems, otherwise you need to break a record
2 - Run : misc/cronjobs/update_totalissues.pl --use-stats --commit=1000 -v
3 - It dies at record 369 (or the one you broke)
4 - Apply patch
5 - Run again
6 - It succeeds, but skips the bad record

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 f3d2f34d7a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d397da65c0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:19:30 +00:00
Laura Escamilla
0505085ea9 Bug 36473: Unit tests
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Tidied.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9e9cc822cb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d80334a108)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:19:29 +00:00
2c3dacad48 Bug 23102: No mock in selenium
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9aa811c334)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 86e78b5511)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 18:00:21 +00:00
282f02b6c0 Bug 23102: 404 errors on page causes SCI user to be logged out
To test:
 1 - Have something on the SCO page that won't load
     Add to SCOUserJS:
        </script>
        <img src="http://localhost:8080/silk/famfamfam.png"/>
        <script>
 2 - Enable the SCO and SCI system preferences:
     WebBasedSelfCheck: Enable
     SelfCheckInModuke: Enable
     AutoSelfCheckAllowed: Allow
     AutoSelfCheckID / AutoSelfCheckPass to a valid user with permissions
 3 - Add the self_checkin_module and self_checkout_module permissions to the AutoSelfCheck user
 4 - Access the selfcheckout module https://yoursite.org/cgi-bin/koha/sco/sco-main.pl
 5 - Sign in using a patron
 6 - Enter an unkown barcode, I used "DONTMATTER"
 7 - If not logged out, click to 'Return to account summary'
 8 - You are asked to sign in again
 9 - Repeat with the SCI module
10 - Apply patch
11 - Repeat, but this time you can return to account

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5bab87f76b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 240f526d06)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 18:00:21 +00:00
b09c2f5446 Bug 23102: Selenium test
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fee56e8d85)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1d21a2da67)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 18:00:21 +00:00
292510f006 Bug 35969: (follow-up) Improve wording
As suggested by David Nind. Thanks!

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b4ce5051c1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c46d122fc1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:58:33 +00:00
2d11da8436 Bug 35969: Add error code in opac-sendbasket.pl
No need to carp about empty basket or no reply address.
Just add a simple explanation on the form.

Note that it makes no sense to show the form if the patron
has no email address. We need it as reply-to.

Test plan:
Try opac-sendbasket.pl?bib_list=null
Remove email address from your account, try again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 35293612a8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3266b9d5bc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:58:33 +00:00
Magnus Enger
2644f581fd Bug 36517: Fix output from install_plugins.pl
When misc/devel/install_plugins.pl does not find any plugins, it prints
the list of pluginsdir, but with a literal \n separating the dirs, and
no newline at the end.

To test:
- Edit koha-conf.xml and add a second entry for <pluginsdir>, so there
  are two entries. The second one could just be a copy of the original.
- Run "perl misc/devel/install_plugins.pl"
- Note the output looks something like this:

No plugins found
pluginsdir contains:
/var/lib/koha/kohadev/plugins\n/var/lib/koha/kohadev/pluginsroot@kohadevbox:koha(master)$

- Apply the patch and run the script again. Output should be:

No plugins found
pluginsdir contains:
/var/lib/koha/kohadev/plugins
/var/lib/koha/kohadev/plugins
root@kohadevbox:koha(master)$

- Sign off

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4848def5e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f2a05fadd0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:55:06 +00:00
de18918339 Bug 36493: Make cashups test more robust
This patch makes the test independent from existing cash registers in
the system.

To test:
1. Enable UseCashRegisters on a fresh KTD
2. Add a cash register
3. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/cashups.t
=> FAIL: Tests fail!
4. Apply this patch
5. Repeat 3
=> SUCCESS: Tests pass!
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 4436a7d41a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 19b543a51b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:51:02 +00:00
8965898873 Bug 36438: Check object for calling metadata
Resolve: Can't call method "metadata" on an undefined value at catalogue/MARCdetail.pl line 93

The proceeding lines check for $record and respond appropriately.

Test plan:
Call catalogue/MARCdetail.pl with an unexisting biblionumber.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a37ebc77b7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1d45bf88a9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:48:15 +00:00
Phil Ringnalda
b9d4408648 Bug 36531: Serve text/javascript compressed, like application/javascript is
Koha serves static .js files as application/javascript (if /etc/mime.types
says to) and serves them compressed, but output_with_http_headers uses the
currently-correct text/javascript mimetype, and Koha doesn't compress that.

Test plan:
1. Set the preference EnableAdvancedCatalogingEditor to Enable.
2. Open the browser Web Developer Tools to the Network tab
3. Load Cataloging - Advanced editor
4. Click on the line for the framework?frameworkcode=&callback=define load
5. Note the content-type text/javascript, no Content-Encoding line, and
   the size of 1.9MB
6. Apply the patches from bug 36463 if they haven't been pushed, then this
   patch, and reset_all
7. Repeat steps 1-4, and note a Content-Encoding: gzip header and a
   Transferred size around 160KB

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 c52af2cef0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3e0c3032b6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:46:35 +00:00
1a8ed12e09 Bug 36463: (follow-up) Adjust other occurence (intranet)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 69ad327379)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 30b0b8a320)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:44:01 +00:00
301d796c62 Bug 36463: Compress application/json
This patch simply adds application/json to the mod_deflate configuration

To test:
1 - Open the netowrk tab in firefox
2 - Load http://localhost:8081/api/v1/libraries
3 - Not the transferred size, and note no 'Content-Encoding: gzip" header
4 - Apply patch, reset_all (or edit /etc/koha/apache-shared.conf)
5 - Reload
6 - Note smaller size, note gzip header

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit bccf7764c0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d8afbbf661)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:44:01 +00:00
Laura Escamilla
d2a5a9783b Bug 36353: Update relationship value so that it is blank and consistent with other forms
To Test:

1. Choose a User Eligible for a Guarantor:
   1. Modify the user profile to include a new guarantor.
   2. Upon selecting a guarantor, ensure that the empty option in the 'Relationship' dropdown appears as a blank box.

2. Select a User Eligible for a Guarantee:
   1. Navigate to "Add Guarantee" in the top menu.
   2. Verify that the guarantor field is automatically populated with the selected user.
   3. Confirm that the 'Relationship' dropdown displays the empty option as 'Empty record.'

3. Apply Patch and Refresh the Page for Step 2:
   1. After applying the patch, refresh the page for step 2.
   2. Ensure that the empty option value for 'Relationship' is now displayed as blank.

4. Sign Off and Have a Great Day! 😊🎉#

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>

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 9de44f00f7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 75c3ff228e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:35:43 +00:00
1c05979d74 Bug 36142: recallsview template param for opac-recall.tt
Test plan:
1) Enable UseRecalls
2) Visit OPAC confirm recall page:
<opac_url>/cgi-bin/koha/opac-recall.pl?biblionumber=76
3) Notice left-side menu 'Recalls history' is not active
4) Apply patch. Repeat.

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 44d2303ef7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3f731be490)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:33:39 +00:00
Philip Orr
7ed0315f4e Bug 36452: correct display of patron message
To test:
1. Before applying the patch:
2. In the staff interface, navigate to a patron
3. Add a new staff message that contains multiple lines (e.g. using
   enter for the next line)
4. Save the message and check the display.
   It will be a single line.
5. Apply the patch and navigate back to the
   patron
6. The message should now be displayed as multiple lines.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5e8059a6f8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 54bb9ffe16)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:29:51 +00:00
Andreas Roussos
e56aa319fc Bug 36462: remove extra Home breadcrumb item
In the Staff interface, when viewing (or editing) the authority MARC
subfield structure for a particular field, the Home button breadcrumb
on the top left of the screen appears twice.

This patch fixes that.

Test plan:
1) Try to view (or edit) the authority MARC subfield structure for
   a particular field. Notice the 'Home' breadcrumb button/icon is
   appearing twice.
2) Apply this patch.
3) Refresh the page, the 'Home' breadcrumb icon should now appear
   only once.

Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f7df7819cd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6f7d4ca168)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:26:41 +00:00
bcff2b75d2 Bug 36516: Fix useless warning from translation script
I lost too much time trying to know what the translation script outputs
  sh: 1: Syntax error: end of file unexpected

To recreate:
touch 'koha-tmpl/intranet-tmpl/prog/en/modules/<' (yes, don't ask!)
koha-translate -i de-DE --dev kohadev
or
koha-translate -u de-DE --dev kohadev

And you get the shell error without any ideas what's happening!

With this patch applied you will not get any errors because the quote
will actually copy the file (what is expected).

But without the quote the cp command will fail and the explanation will be
displayed
sh: 1: Syntax error: end of file unexpected
Cannot copy /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/< to /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/de-DE/modules/< at /kohadevbox/koha/misc/translator/tmpl_process3.pl line 385.

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 0026ee3e97)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2001b853f4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:23:28 +00:00
a23aae3c98 Bug 36395: Remove useless fetch in admin/marc_subfields_structure.pl
Since (a long time ago!)
  commit 62aa3f4292
  Bug 17216: Use Koha::AVC from mss.pl

This $sth2 is never fetched, we are retrieving the AV cat using
Koha::AV::Categories

Sponsored-by: The Research University in the Helmholtz Association (KIT)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4158783eb2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a2ea0291e7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:17:44 +00:00
4df8c8dcec Bug 35868: Warning sign for using a patron category that is limited to another library has moved to other side of page
Bug 31422 implemented a warning sign, when a patron has a patron category that you are not allowed to set due to library limitations on the code.
It should appear right next to the field, but might appear on the other side of the page now being easily missed.

This patch simply removes the float:right CSS rule.

To test:
* User's login branch and home library is: Centerville
* Patron category "B - Board" is limited to Franklin
* Create a new patron: Board doesn't show
* Edit an existing patron with another patron category: Board doesn't show
* Edit a patron with Board category from Centerville
=> Check the warning icon with the tooltip is close to the category select

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7356a5cbd4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3ba6bb9cdf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:15:50 +00:00
eea5f283b2 Bug 27198: Fix syntax in marc21-retrieval-info-auth-dom.xml
This patch fixes the syntax in marc21-retrieval-info-auth-dom.xml,
so that one can use the Zebra special retrieval elements documented
at https://software.indexdata.com/zebra/doc/special-retrieval.html

These are very useful when troubleshooting issues with authority
records in Zebra.

Test plan (using KTD):
1. yaz-client unix:/var/run/koha/kohadev/authoritysocket
2. Enter these commands:
   . base authorities
   . format xml
   . elements zebra::snippet
   . find e
   . show 1
3. Result = diagnostic message:
     Diagnostic message(s) from database:
        [25] Specified element set name not valid for specified database
             -- v2 addinfo 'zebra::snippet'
4. Apply the patch
5. Copy updated file: sudo cp debian/templates/marc21-retrieval-info-auth-dom.xml
   /etc/koha/marc21-retrieval-info-auth-dom.xml
6. Stop and restart zebra (no need to rebuild the Zebra index):
   . sudo koha-zebra --stop kohadev
   . sudo pkill zebrasrv
   . sudo koha-zebra --start kohadev
7. Repeat commands in step 2.
8. Result from show 1 = XML output:
    Sent presentRequest (1+1).
    Records: 1
    Record type: XML
    <record xmlns="http://www.indexdata.com/zebra/">
      <snippet name="Any" type="w">Gontarski, S. <s>E</s></snippet>
    </record>nextResultSetPosition = 2
   Elapsed: 0.013929

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 10d5f6ef37)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f129c009a4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:10:41 +00:00
5f68f6610e Bug 35599: Fix Pronouns and HidePersonalPatronDetailOnCirculation
Bug 10950 adds a pronouns text field to the patron record.
Currently it is hidden by system preference 'HidePersonalPatronDetailOnCirculation'.

This patch moves pronouns outside this system preference influence.

Test plan:
1) Add pronouns to a patron
2) Set system preference 'HidePersonalPatronDetailOnCirculation' to "Don't hide"
3) Check you see pronouns in circulation page
   /cgi-bin/koha/circ/circulation.pl?borrowernumber=X
4) Set system preference 'HidePersonalPatronDetailOnCirculation' to "Hide"
5) Refresh circulation page
=> Without patch pronouns are hidden
=> With patch pronouns are displayed

Signed-off-by: Hebah <hebah@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 07738adbf0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a728c65828)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 17:09:03 +00:00
73837eb64c Bug 23296: Set patron branchcode when preparing non-digest version
To test:
1. APPLY PATCH
2. Set up circ rules to allow for auto renewals.
3. Set AutoRenewalNotices to 'according to message prefs'
4. Make a branch specific version of the the AUTO_RENEWAL notice.
5. Find a patron belonging to that branch and set the message prefs to allow for a AUTO_RENEWAL. But no digest option!
6. Check some things out and make sure they are eligble for auto renewal.
7. Run the cron.
8. Make sure the patron gets the branch specific notice.
9. Delete the branch specific notice.
10. DO 6-7 again.
11. Make sure they now get the all library notice.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Tidied one line.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ade75ea561)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8607c04099)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 16:56:46 +00:00
Julian Maurice
a66c9e2944 Bug 35573: Correctly display warning when placing a hold
Test plan:

1) Add a basic circulation rule like : 0 hold allowed on patron category
   'A' and set AllowHoldPolicyOverride to 'Allow'
2) Make a hold on a patron belongs to this category
3) Normally you should see a warning on item (override needed) but it's
   not the case
4) Apply this patch
5) Refresh and repeat step 2

This patch comes from an alternative patch on the original bug (I'm including
the original test plan for your information) :

(Bug 30687 - alternative patch): Always allow to force hold pickup location

If AllowHoldPolicyOverride is enabled and only some pickup locations are
available, you still have the possibility to force one of the others
pickup locations.
But when there are zero pickup locations available, that is not
possible.

This patch change that by always displaying the list of pickup locations
when AllowHoldPolicyOverride is enabled.

Test plan:
1. Apply patch
2. Disable AllowHoldPolicyOverride
3. Create a biblio B with an item I at library A.
4. Configure this library A to not be a pickup location
5. Add a "Default holds policy by item type" for item I type where "Hold
   pickup library match" is "item's home library"
6. Try to place a hold on biblio B
   You should not be able to place a hold because there is no valid
   pickup locations
7. Enable AllowHoldPolicyOverride
8. Try to place a hold on biblio B
   You should now see all valid pickup locations in a dropdown list
   (with an exclamation mark in front of each option) with none selected
   by default
9. Verify you can place a title-level hold and an item-level hold

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 805ea1a00e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 204b5c76ce)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 16:53:15 +00:00