]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoBug 25716: (QA follow-up) Make sure a comment doesn't break tests
Tomas Cohen Arazi [Mon, 24 Oct 2022 21:52:35 +0000 (18:52 -0300)]
Bug 25716: (QA follow-up) Make sure a comment doesn't break tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23012: get_lostreturn_policy returns a scalar
Tomas Cohen Arazi [Mon, 24 Oct 2022 21:36:46 +0000 (18:36 -0300)]
Bug 23012: get_lostreturn_policy returns a scalar

On commit 4d994773f83468b561896939f16131d0332d9cfc
Koha::Item->_set_found_trigger gets the call to get_lostreturn_policy()
changed so it expects a hashref instead of the scalar it returns. This
patch adjusts it back.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Tests fail!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24381: DBRev 22.06.00.072
Tomas Cohen Arazi [Mon, 24 Oct 2022 20:56:06 +0000 (17:56 -0300)]
Bug 24381: DBRev 22.06.00.072

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24381: Update db_rev to new style
Tomas Cohen Arazi [Mon, 24 Oct 2022 20:53:46 +0000 (17:53 -0300)]
Bug 24381: Update db_rev to new style

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24381: (follow-up) Add USE statements
Nick Clemens [Thu, 22 Sep 2022 21:30:57 +0000 (21:30 +0000)]
Bug 24381: (follow-up) Add USE statements

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24381: (follow-up) Notice improvements
Martin Renvoize [Tue, 13 Oct 2020 11:28:31 +0000 (12:28 +0100)]
Bug 24381: (follow-up) Notice improvements

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24381: Update notice params
Martin Renvoize [Thu, 16 Jul 2020 16:01:50 +0000 (17:01 +0100)]
Bug 24381: Update notice params

If the update to catch defaults fails, we need to attempt to update
renamed template variables

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24381: Update notices if defaults used
Martin Renvoize [Thu, 16 Jul 2020 13:35:43 +0000 (14:35 +0100)]
Bug 24381: Update notices if defaults used

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24381: Update sample notices
Martin Renvoize [Thu, 16 Jul 2020 11:01:30 +0000 (12:01 +0100)]
Bug 24381: Update sample notices

This patch update the sample notices for new installs

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23012: DBRev 22.06.00.071
Tomas Cohen Arazi [Mon, 24 Oct 2022 20:45:45 +0000 (17:45 -0300)]
Bug 23012: DBRev 22.06.00.071

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23012: (QA follow-up) Add exec flag to db update
Nick Clemens [Mon, 24 Oct 2022 11:20:38 +0000 (11:20 +0000)]
Bug 23012: (QA follow-up) Add exec flag to db update

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23012: (QA follow-up) No need to create and delete rules for branch
Nick Clemens [Mon, 24 Oct 2022 11:17:48 +0000 (11:17 +0000)]
Bug 23012: (QA follow-up) No need to create and delete rules for branch

The tests create a new branch to make sure one exists without rules. We then add a rule
and delete it. We can simply create the new branch and never assign a rule

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23012: (QA follow-up) Combine method to get both values
Nick Clemens [Mon, 24 Oct 2022 11:13:32 +0000 (11:13 +0000)]
Bug 23012: (QA follow-up) Combine method to get both values

The code for get_processingreturn_policy was very similar to
get_lostreturn_policy. Combining the two methods allows for use of
get_effective_rules which uses get_effective_rule_value which is cached.
This should reduce lines of code and improve performance

Tests updated and adjusted as well

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23012: Apply processing fee return policy when lost item found
Aleisha Amohia [Wed, 12 Oct 2022 04:23:42 +0000 (04:23 +0000)]
Bug 23012: Apply processing fee return policy when lost item found

This enhancement gives the ability to set a policy for the lost item
processing fee that may get charged additional to the lost item
replacement cost. The processing fee can be:
- refunded
- refunded if unpaid
- kept

To test:

Set-up

1. Find an item, Item A. Go to Administration -> Item types and edit the
item type for Item A. Add a default replacement cost and a processing
fee and Save.
2. Go to Administration -> system preferences and set the following:
- WhenLostChargeReplacementFee: Charge
- BlockReturnOfLostItems: Don't block
3. Scroll down to the default lost item fee refund on return policy. Set
the refund lost item replacement fee policy to 'refund lost item charge'.
4. Edit Item A and set a replacement cost.

Reproduce

5. Check out Item A to Patron A.
6. Click the barcode to view Item A's information. Edit Item A and set
the Lost status to 'lost'.
7. Go back to Patron A's checkouts. The item should now be checked in
with two new charges applied - a lost item fee (the item's replacement
cost) and a lost item processing fee (set in item types).
8. Check in Item A to mark it as found.
9. Go back to Patron A's account. Notice the lost item fee has been
refunded, but the processing fee remains.
10. Manually pay or write off the processing fee. This enhancement
removes the need for this manual step.

11. Apply the patch and restart services

Test with lost item - refund

12. Go to Administration -> circulation and fines rules. Scroll down to
the default lost item fee refund on return policy. Notice there is now a
refund lost item processing fee policy. Set this to 'refund lost item
processing charge'.
13. Repeat steps 6 to 9.
14. Go back to Patron A's account. Both the lost item fee and processing
fee should have been refunded.

15. Repeat steps 6 to 8 (do not check it yet).
16. Go back to Patron A's account. Pay the processing fee.
17. Repeat step 9.
18. Go back to Patron A's account. Both the lost item fee and processing
fee should have been refunded (you'll now be in a credit because the
paid processing fee was also refunded).

Test with lost item - refund_unpaid

19. Go to Administration -> circulation and fines rules. Scroll down to
the default lost item fee refund on return policy. Notice there is now a
refund lost item processing fee policy. Set this to 'refund lost item
processing charge (only if unpaid)'.
20. Repeat steps 6 to 9.
21. Go back to Patron A's account. Both the lost item fee and processing
fee should have been refunded.

22. Repeat steps 16 to 19.
23. Go back to Patron A's account. The lost item fee should have been
refunded but not the processing fee, as this was already paid.

Test with lost item - leave

24. Go to Administration -> circulation and fines rules. Scroll down to
the default lost item fee refund on return policy. Notice there is now a
refund lost item processing fee policy. Set this to 'leave lost item
processing charge'.
25. Repeat steps 6 to 9.
26. Go back to Patron A's account. The lost item fee and processing fee
should have been refunded but not the processing fee.

Other tests

27. Confirm tests pass
- t/db_dependent/Koha/Item.t
- t/db_dependent/Koha/CirculationRules.t

Sponsored-by: Auckland University of Technology
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>
2 years agoBug 23012: Set policy for lost item processing fee
Aleisha Amohia [Wed, 12 Oct 2022 04:22:31 +0000 (04:22 +0000)]
Bug 23012: Set policy for lost item processing fee

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>
2 years agoBug 23012: Show the PROCESSING_FOUND account credit type
Aleisha Amohia [Wed, 12 Oct 2022 04:11:33 +0000 (04:11 +0000)]
Bug 23012: Show the PROCESSING_FOUND account credit type

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>
2 years agoBug 23012: Database updates for PROCESSING_FOUND account credit type
Aleisha Amohia [Wed, 12 Oct 2022 04:01:20 +0000 (04:01 +0000)]
Bug 23012: Database updates for PROCESSING_FOUND account credit type

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>
2 years agoBug 22321: (follow-up) Fix number of planned tests in Illrequests.t
Katrin Fischer [Mon, 8 Aug 2022 22:09:34 +0000 (22:09 +0000)]
Bug 22321: (follow-up) Fix number of planned tests in Illrequests.t

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>
2 years agoBug 22321: Fix store() crash when modifying borrowernumber of a new ILL request
Lari Taskula [Tue, 22 Feb 2022 14:13:58 +0000 (14:13 +0000)]
Bug 22321: Fix store() crash when modifying borrowernumber of a new ILL request

To test:
1. prove t/db_dependent/Illrequests.t

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tried to change the borrowernumber connected to an ILL request
and checked that the associated hold was updated to the new
patron as well.

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>
2 years agoBug 22321: Unit test for new()->borrowernumber()->store()
Lari Taskula [Tue, 22 Feb 2022 14:08:34 +0000 (14:08 +0000)]
Bug 22321: Unit test for new()->borrowernumber()->store()

Signed-off-by: Magnus Enger <magnus@libriotech.no>
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>
2 years agoBug 22321: Allow managing the borrowernumber tied to ILL request
Lari Taskula [Mon, 14 Feb 2022 11:21:11 +0000 (11:21 +0000)]
Bug 22321: Allow managing the borrowernumber tied to ILL request

Sometimes an ILL request is connected to the wrong borrower, and it
would be nice to be able to connect it to the right one.

In Swedish ILL the cardnumber of the patron connected with an ILL
request is entered into the central Libris system and then propagated
to Koha through the Libris API. This can lead to errors, and we have
created a dummy "ILL patron" to catch these. It would then be good
to be able to connect the ILL to the right patron in Koha.

This commit makes it possible to edit illrequests.borrowernumber.

To test:
1. Apply patch
2. Create two patrons, A and B
3. Create a new ILL request for patron A
4. Add a hold for patron A where biblionumber is the biblio tied
   to this ILL request
5. Go to
cgi-bin/koha/ill/ill-requests.pl?method=edit_action&illrequest_id=161
6. Observe Patron ID is editable
7. Change borrowernumber to patron B's borrowernumber
8. Click save
9. Observe ILL request is now for patron B
10. Go to patron B's details at
cgi-bin/koha/members/moremember.pl?borrowernumber=B_borrowernumber
11. At the bottom section of the page, click 1 Hold(s)
12. Observe the hold you placed at step 4 has transferred to
    patron b

Signed-off-by: Magnus Enger <magnus@libriotech.no>
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>
2 years agoBug 22321: Update holds borrowernumber when ILL request borrowernumber changes
Lari Taskula [Mon, 14 Feb 2022 11:16:31 +0000 (11:16 +0000)]
Bug 22321: Update holds borrowernumber when ILL request borrowernumber changes

To test:
1. prove t/db_dependent/Illrequests.t

Signed-off-by: Magnus Enger <magnus@libriotech.no>
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>
2 years agoBug 22321: Add unit tests
Lari Taskula [Mon, 14 Feb 2022 11:14:36 +0000 (11:14 +0000)]
Bug 22321: Add unit tests

To test:
1. prove t/db_dependent/Illrequests.t
2. Observe test failure

    1..3
    ok 1 - before change, original borrowernumber found
    not ok 2 - after change, changed borrowernumber found in holds
    #   Failed test 'after change, changed borrowernumber found in holds'
    #   at t/db_dependent/Illrequests.t line 167.
    #          got: '3786'
    #     expected: '3787'
    ok 3 - after change, changed borrowernumber found in illrequests
    # Looks like you failed 1 test of 3.
not ok 4 - store borrowernumber change also updates holds

Signed-off-by: Magnus Enger <magnus@libriotech.no>
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>
2 years agoBug 31553: Ensure news item content field is always editable
Alex Buckley [Tue, 13 Sep 2022 02:14:22 +0000 (14:14 +1200)]
Bug 31553: Ensure news item content field is always editable

Set a padding at the bottom of the news item editor body.

This is a tricky bug to replicate.

Test plan:
1. Set 'AdditionalContentsEditor' syspref = 'a WYSIWYG editor
(TinyMCE)'.

2. Select multiple languages in the 'OPACLanguages' system preference.

3. Go to: Tools > News.

4. Create a new news item. Switch between the different language tabs.

5. Confirm you can always input into the content field in all languages.

6. Edit an exiting news item. Switch between different language tabs.

7. Confirm you can always input into the content field in all languages.

Sponsored-by: Toi Ohomai Institute of Technology, New Zealand
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>
2 years agoBug 31730: (QA follow-up) Only link category name
Katrin Fischer [Sat, 15 Oct 2022 19:41:03 +0000 (19:41 +0000)]
Bug 31730: (QA follow-up) Only link category name

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31730: Link to authorized value interface when an authval is mentioned in preferences
Owen Leonard [Mon, 10 Oct 2022 17:09:27 +0000 (17:09 +0000)]
Bug 31730: Link to authorized value interface when an authval is mentioned in preferences

This patch adds links to the authorized value interface anywhere an
authorized value category is mentioned in a system preference
description.

To test, apply the patch and go to Administration -> System preferences.

- Check these preferences:
  Circulation -> ILLHiddenRequestStatuses
  Circulation -> BundleLostValue
  Circulation -> BundleNotLoanValue
  Circulation -> ClaimReturnedLostValue
  Accounting -> RequirePaymentType
- Confirm that the link in the description of each preference takes you
  to the correct authorized value category.

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>
2 years agoBug 31495: Allow opac-page when enforcing GDPR policy
Marcel de Rooy [Wed, 31 Aug 2022 11:57:16 +0000 (11:57 +0000)]
Bug 31495: Allow opac-page when enforcing GDPR policy

Test plan:
Add some page under Additional contents.
Enforce GDPR policy.
Test with user that has no consent (yet or anymore).
Check if you can reach additional contents with opac-page.pl.

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>
2 years agoBug 7960: Add class to item type descriptions so they can be hidden with CSS
Aleisha Amohia [Sun, 1 Jul 2018 23:33:07 +0000 (23:33 +0000)]
Bug 7960: Add class to item type descriptions so they can be hidden with CSS

This patch adds the class "itypetext" around item type descriptions so
they can easily be hidden with CSS.

To test:
1. Navigate to the pages listed below to confirm that the text
descriptions do show.
2. Add
.itypetext { display:none; }
to IntranetUserCSS and OPACUserCSS system preferences and save.
3. Go back to the pages listed below and confirm that the text
descriptions DO NOT show.

= STAFF CLIENT =
 - catalogue/advsearch.tt
 - catalogue/detail.tt
 - catalogue/results.tt
 - reserve/request.tt
 - virtualshelves/shelves.tt
= OPAC =
 - opac-advsearch.tt
 - opac-detail.tt
 - opac-readingrecord.tt
 - opac-reserve.tt
 - opac-shelves.tt
 - opac-user.tt

Refer to David Nind's test notes from Comment 23 for a more detailed
plan for acessing these pages.

Sponsored-by: Catalyst IT
Signed-off-by: Charles Farmer <charles.farmer@inLibro.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>
2 years agoBug 31940: Add page-section to library-groups
Martin Renvoize [Mon, 24 Oct 2022 11:33:06 +0000 (12:33 +0100)]
Bug 31940: Add page-section to library-groups

This patch adds the page-section div around each library-groups table.

Test plan
1) Check that the 'card' views appear appropriates on the library groups
   maangement page

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31923: Add warning sign and span
Caroline Cyr La Rose [Fri, 21 Oct 2022 21:45:59 +0000 (17:45 -0400)]
Bug 31923: Add warning sign and span

This patch adds a small warning sign before the sentence and also puts
the sentence inside a span.

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>
2 years agoBug 31923: 'Ignore' tab description is misleading
Caroline Cyr La Rose [Fri, 21 Oct 2022 21:34:13 +0000 (17:34 -0400)]
Bug 31923: 'Ignore' tab description is misleading

This patch modifies the description of the 'Ignore' tab in
MARC bibliographic and authority framework administration
to add that not only does the 'ignored' subfield not appear
in the editor, but the subfield will also be deleted from the
record.

To test:
1. Go to Administration > MARC bibliographic framework
2. Click 'Actions' next to any framework and choose 'MARC structure'
3. Click 'Actions' next to any field and choose 'Edit subfields'
4. Check the hint/description under 'Managed in tab' and make sure it
   - makes sense
   - is written in correct english (syntax and spelling)
   - mentions that the subfield's value will be deleted from the record
5. Go to Administration > Authority types
6. Redo steps 2-4 for authority frameworks

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>
2 years agoBug 19693: (QA follow-up) Replace changed tag test
Marcel de Rooy [Fri, 7 Oct 2022 08:41:20 +0000 (08:41 +0000)]
Bug 19693: (QA follow-up) Replace changed tag test

The test
  $MARCfrom->field('1..', '2..'))[0]->tag ne ($MARCto->field('1..', '2..'))[0]->tag
is not completely consistent with following code in sub merge.
I decided to get the authtype code from the old record that comes
from Koha and should include the type.
Remaining changes refer to indentation/comments.

Test plan:
Run t/db_dependent/Authority/Merge.t
Note: The test actually could be extended a bit for mocking MARC
flavor, but needs some additional framework support to work.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 19693: Update of an authority record creates inconsistency when the heading tag...
Janusz Kaczmarek [Mon, 25 Jul 2022 20:46:58 +0000 (22:46 +0200)]
Bug 19693: Update of an authority record creates inconsistency when the heading tag is changed

In those rare cases when authorities are updated by an external agency (or
even internally, by reviewing and correcting an exported authority file)
when the heading tag will be changed (seems odd but happens:

111 Congress ==> 110 Corporate body.Congress ;
100 Person ==> 110 Corporate body (a company named with person's name ;
151 City--object ==> 150 Object (city) etc.)

and then the authority record in Koha database will be updated with
bulkmarcimport or by calling directly ModAuthority from a custom script,
the merge function "doesn't know" that the change to the authority type
has been made and, consequently, doesn't adequately change the tag in
related fields in biblio records (as it would if two different records
with different authtypecode were merged with Koha interface).

This is because at the moment when merge function is being called
by ModAuthority:
Koha::Authority::Types->find($autfrom->authtypecode)
Koha::Authority::Types->find($authto->authtypecode)
both have the same value (because $mergefrom == $mergeto).

Therefore in case when $mergefrom == $mergeto and the heading tag changes,
$authtypefrom and $authfrom calculated in merge in the ordinar way are
misleading and should not be taken unto consideration.

Test plan:
==========

1. run t/db_dependent/Authority/Merge.t
2. you should see problems in "Test update A with modified heading tag
   (changing authtype)"
3. apply the patch
4. run t/db_dependent/Authority/Merge.t again
5. the test should pass

Alternatively:

1. have an authority record used in biblio;
   export it to file;
   change 1XX heading tag to a different (but reasonable) value
   and possibly change also the content of the heading
   (one can delete also 942 but it doesn't matter);
   make bulkmarcimport.pl -a -update -file <modified_auth_file> and
   see that the tag in biblio record has not been changed (whereas
   the type of authority record did change);

2. make orders in database (so that the authority type and the tag of
   the field in biblio record correspond); apply the patch;

3. repeat the test from 1.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 19693: Add test sub to Merge.t
Janusz Kaczmarek [Mon, 25 Jul 2022 20:27:32 +0000 (22:27 +0200)]
Bug 19693: Add test sub to Merge.t

In those rare cases when authorities are updated by an external agency (or
even internally, by reviewing and correcting an exported authority file)
when the heading tag will be changed (seems odd but happens:

111 Congress ==> 110 Corporate body.Congress ;
100 Person ==> 110 Corporate body (a company named with person's name ;
151 City--object ==> 150 Object (city) etc.)

and then the authority record in Koha database will be updated with
bulkmarcimport or by calling directly ModAuthority from a custom script,
the merge function "doesn't know" that the change to the authority type
has been made and, consequently, doesn't adequately change the tag in
related fields in biblio records (as it would if two different records
with different authtypecode were merged with Koha interface).

This is because at the moment when merge function is being called
by ModAuthority:
Koha::Authority::Types->find($autfrom->authtypecode)
Koha::Authority::Types->find($authto->authtypecode)
both have the same value (because $mergefrom == $mergeto).

Therefore in case when $mergefrom == $mergeto and the heading tag changes,
$authtypefrom and $authfrom calculated in merge in the ordinar way are
misleading and should not be taken unto consideration.

Test plan:
==========

1. run t/db_dependent/Authority/Merge.t
2. you should see problems in "Test update A with modified heading tag
   (changing authtype)"
3. apply the patch
4. run t/db_dependent/Authority/Merge.t again
5. the test should pass

Alternatively:

1. have an authority record used in biblio;
   export it to file;
   change 1XX heading tag to a different (but reasonable) value
   and possibly change also the content of the heading
   (one can delete also 942 but it doesn't matter);
   make bulkmarcimport.pl -a -update -file <modified_auth_file> and
   see that the tag in biblio record has not been changed (whereas
   the type of authority record did change);

2. make orders in database (so that the authority type and the tag of
   the field in biblio record correspond); apply the patch;

3. repeat the test from 1.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31931: Terminology for HoldsSplitQueue - use staff interface
David Nind [Sun, 23 Oct 2022 23:13:03 +0000 (23:13 +0000)]
Bug 31931: Terminology for HoldsSplitQueue - use staff interface

Rename "..staff client.." to "..staff interface.." in the description for the
HoldsSplit Queue system preference, as per the terminology guidelines.

Test plan.
1. View the description for the HoldsSplitQueue system preference.
2. Note that the description says "..staff client..".
3. Apply the patch.
4. Note that the description now says "..staff interface.." as per the
   terminology guidelines (https://wiki.koha-community.org/wiki/Terminology#S).
5. Sign off :D

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>
2 years agoBug 31906: Compiled CSS
Tomas Cohen Arazi [Mon, 24 Oct 2022 20:12:05 +0000 (17:12 -0300)]
Bug 31906: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31906: Fix alignment of managed by button on basket summary page
Owen Leonard [Mon, 24 Oct 2022 15:37:22 +0000 (15:37 +0000)]
Bug 31906: Fix alignment of managed by button on basket summary page

This patch makes a couple of changes to CSS which affect, globally, the
alignment of labels in forms. With lables corresponding to text areas or
other multi-line controls, the label should be aligned with the top of
the control.

This patch also changes the inline style attribute on the control that
lets a user add an additional manager to a basket in acquisitions. It
requires an update to work with the new default form layout.

To test, apply the patch and go to Acquisitions -> Vendor -> Baskets.

 - View the details of a basket.
 - You should see a line labeled "Manged by." The label should be
   top-aligned to match the "Add user" link next to it.
 - Test that the link works correctly and that the layout is correct
   after adding additional managers.

View other forms in the staff interface to confirm that the changes
work correctly and have not broken layout anywhere else. For instance,
in the patron add/edit form, the "Contact note," "OPAC note," labels etc.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31834: Replace incorrect "table" class from MARC imports table
Owen Leonard [Mon, 24 Oct 2022 14:08:37 +0000 (14:08 +0000)]
Bug 31834: Replace incorrect "table" class from MARC imports table

The table containing staged MARC record batches has a "table" class
added to the <table> tag, which is inconsistent with other tables in the
staff interface. The class pulls in default table styles from Bootstrap
which aren't consistent.

There are a few other non-DataTable tables have the the class
"dataTable" added in order to make them more consistent. I think this
table should have that class too. The template is also modified to give
the table a <thead> and <tbody>, with indentation corrected accordingly.

To test, apply the patch and go to Cataloging -> Manage staged records.

The table of staged records should look correct, with style matching
DataTables elsewhere in Koha, e.g. Administration -> Libraries.

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>
2 years agoBug 31927: Compiled CSS
Tomas Cohen Arazi [Mon, 24 Oct 2022 20:10:18 +0000 (17:10 -0300)]
Bug 31927: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31927: Use bigger font-size for bibliographic information on staff details page
Owen Leonard [Mon, 24 Oct 2022 12:21:50 +0000 (12:21 +0000)]
Bug 31927: Use bigger font-size for bibliographic information on staff details page

This patch removes the adusted font size from the definition of the
.results_summary spans. The percentage decrease was being multiplied
with another rule.

To test, apply the patch and rebuild the staff interface CSS.

Locate a bibliographic record in the staff client and view the detail
page. Confirm that the bibliographic information is displayed in a
comfortable size.

Also test that catalog search results still look correct.

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>
2 years agoBug 31911: (follow-up) Rename second level heading
Martin Renvoize [Mon, 24 Oct 2022 13:37:44 +0000 (14:37 +0100)]
Bug 31911: (follow-up) Rename second level heading

This patch, as suggested, renames the second level heading to 'Items in
collection' and move the 'Total items: {count}' into a paragraph.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31911: Improve rotating collections item management
Martin Renvoize [Fri, 21 Oct 2022 14:14:56 +0000 (15:14 +0100)]
Bug 31911: Improve rotating collections item management

This patch renames 'Add/remove items from collection' to just 'Manage
items' in the button in the rotating collections list table, the page
heading and the breadcrumbs.

We also move the heading below the toolbar to be consistent with
elsewhere, remove a superflous second level heading and wrap the content
table in a page-section too.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31812: Update 'Stage for import' button to be primary
Martin Renvoize [Mon, 24 Oct 2022 14:02:53 +0000 (15:02 +0100)]
Bug 31812: Update 'Stage for import' button to be primary

This patch updates the 'Stage for import' input to be of type="submit"
and classes is a "button".. This gives it the yellow main action
hinting.

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>
2 years agoBug 31831: Compiled CSS
Tomas Cohen Arazi [Mon, 24 Oct 2022 18:42:10 +0000 (15:42 -0300)]
Bug 31831: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31831: Make inactive search options font slightly bigger
Owen Leonard [Mon, 24 Oct 2022 13:55:11 +0000 (13:55 +0000)]
Bug 31831: Make inactive search options font slightly bigger

This patch removes the reduced font size from the "tab" links in the
header search form (the links for switching between search forms). This
makes the links the same size as the search form label.

To test, apply the patch and rebuild the staff client CSS.

On any page in the staff interface, test the appearance and behavior
of the header search form. The controls should be clear and readable.

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>
2 years agoBug 31882: Correct titles for pages in new cataloging module
Martin Renvoize [Mon, 24 Oct 2022 14:37:42 +0000 (15:37 +0100)]
Bug 31882: Correct titles for pages in new cataloging module

To test:
1. Apply patch
2. Set system preference 'StockRotation' to enable.
3. Be logged in as a superlibrarian
4. Check the page titles for all pages, accessible from the
   Cataloging module homepage

https://bugs.koha-community.org/show_bug.cgi?id=31882

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>
2 years agoBug 31917: Headings fix for preferences search
Martin Renvoize [Fri, 21 Oct 2022 15:06:44 +0000 (16:06 +0100)]
Bug 31917: Headings fix for preferences search

This patch re-arranges the logic for displaying the search term when
executing a system preference search.

Test plan
1) Without the patch, search for something that will get no results
   'boing' and note how it looks
2) Without the patch, search for something that gets some results
   'block' and note how it looks
3) Apply the patch
4) Repeat your searches and comment on whether the look is better of
   worse ;P

Signed-off-by: David Nind <david@davidnind.com>
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>
2 years agoBug 31929: Radio inputs need to be outside of respective labels
Lucas Gass [Mon, 24 Oct 2022 18:25:21 +0000 (18:25 +0000)]
Bug 31929: Radio inputs need to be outside of respective labels

1. Apply patch
2. Go to Acquisitions and edit or create a vendor.
3. Look at the radio buttons in the Ordering information section.
4. They should be properly aligned.
5. Make sure the form still works and you can save changes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31955: Add page-section div to additional-fields.tt
Lucas Gass [Mon, 24 Oct 2022 17:45:08 +0000 (17:45 +0000)]
Bug 31955: Add page-section div to additional-fields.tt

To test:
1. Apply patch
2. Look at Administration > Additional fields.
3. Each of the 4 tables should have a page-section div around it:

    Order baskets (aqbasket)
    Subscriptions (subscription)
    Account lines (credit) (accountlines:credit)
    Account lines (debit) (accountlines:debit)

Note: There are some indentation changes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 25763: (follow-up) Fix display and remove 'No fund'
Nick Clemens [Thu, 22 Sep 2022 20:11:08 +0000 (20:11 +0000)]
Bug 25763: (follow-up) Fix display and remove 'No fund'

This patch adds a fieldset around the inputs to style them as other places in Koha

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 25763: Allow updating of order fund from invoice
Nick Clemens [Mon, 15 Jun 2020 21:06:38 +0000 (21:06 +0000)]
Bug 25763: Allow updating of order fund from invoice

To test:
 1 - Receive some orders via acquisitions
 2 - View the invoice with these orders
 3 - Click 'Modify fund' on the received orders list
 4 - Confirm you can change the fund
 5 - Set some authorised value categories for funds
 6 - Reload the invoice
 7 - Confirm the categories dropdowns change when different funds selected
 8 - Confirm updating the statistic fields saves correctly
 9 - Add an inactive budget with some funds
10 - Test the 'show inactive' button on shipment fund, adjustments, and modifying order fund

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>
2 years agoBug 31459: (QA follow-up) Add missing TT filters
Katrin Fischer [Mon, 17 Oct 2022 19:24:32 +0000 (19:24 +0000)]
Bug 31459: (QA follow-up) Add missing TT filters

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=31559
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31459: (follow-up) Return 'Keep current' option
Nick Clemens [Mon, 17 Oct 2022 11:56:57 +0000 (11:56 +0000)]
Bug 31459: (follow-up) Return 'Keep current' option

This patch restores the option to keep current budget, in the case that receiver can receive, but cannot order on current budget

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=31559
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31459: (follow-up) Preserve budget period display
Nick Clemens [Wed, 12 Oct 2022 14:55:55 +0000 (14:55 +0000)]
Bug 31459: (follow-up) Preserve budget period display

This patch adds a level to the budget_loops and displays the budgets
as optgroups for the funds

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=31559
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31459: Use the same dropdown as when adding orders to a basket
Nick Clemens [Thu, 25 Aug 2022 11:26:33 +0000 (11:26 +0000)]
Bug 31459: Use the same dropdown as when adding orders to a basket

Current order receive code loops over each budget period and gets the hierarchy, this
is slow when systems have many budgets. Additionally, the list includes inactive items
by default

We can switch to a single call, and add consistency by adopting the same dropdown as used
when placing an order

To test:
1 - Add some budgets with funds - ensure you have at least one inactive budget and fund
2 - Place an order, observe the fund selection menu
3 - Close basket, receive order, observe the fund menu
4 - Apply patch
5 - Cancel receipt
6 - Receive again
7 - Observe fund menu, confirm it matches the order placing menu
8 - Confirm inactive are not displayed by default, but are when button is checked

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=31559
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31219: Prevent JS injection in patron extended attributes
Jonathan Druart [Mon, 25 Jul 2022 07:23:25 +0000 (09:23 +0200)]
Bug 31219: Prevent JS injection in patron extended attributes

We are sanitizing other attributes but "extended patron attributes".

Test plan:
Make a patron attribute editable at the OPAC
Edit an existing patron, or register a new one
Use a script tag in the new value ("<script>alert("booh!")</script>" for
instance)
With this patch the value is remove if containing an HTML tag that is
not br b i em big small strong (see C4::Scrubber)

Signed-off-by: Mark Hofstetter <koha@trust-box.at>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 15048: Index all possible searched subfields for index-term-genre
Nick Clemens [Thu, 23 Jun 2022 11:40:44 +0000 (11:40 +0000)]
Bug 15048: Index all possible searched subfields for index-term-genre

Currently we only index a - but we can setup the system such that avxyz are searched

To test:
 1 - define both a 655$a *and* 655$x value in a bib, save, reindex
 2 - Set system preferences:
      TraceSubjectSubdivisions: Include
      TraceCompleteSubfields: Force
 3 - View the record edited above in the opac
 4 - Click on the subject heading
 5 - No results found
 6 - Copy zebra files:
  sudo cp ./etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml \
  /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml
  sudo cp etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \
  /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
 7 - restart all and reindex
 8 - Click on the subject heading in OPAC
 9 - Sucess!
10 - Repeat with other fields (vyz)
11 - Repeat under ES, reindexing and resetting mappings

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 22678: (follow-up) Array ref expected in context key
Marcel de Rooy [Mon, 29 Aug 2022 12:51:05 +0000 (12:51 +0000)]
Bug 22678: (follow-up) Array ref expected in context key

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 22678: Replace a few unneeded Koha::Logger calls
Marcel de Rooy [Mon, 29 Aug 2022 09:58:38 +0000 (09:58 +0000)]
Bug 22678: Replace a few unneeded Koha::Logger calls

We have Koha::Logger via the Mojo app now.

Test plan:
Run perl t/db_dependent/api/v1/unhandled_exceptions.t
Your plack-api-error.log should contain something like:
    [2022/08/29 12:15:25] [ERROR] DELETE /api/v1/patrons/1052: unhandled exception (Koha::Exception)<<Exception 'Koha::Exception' thrown 'delete died'>>

Bonus:
Add one line to Koha/REST/Plugin/PluginRoutes.pm:
    $app->log->error('PluginRoutes L49');
Before the line with if ( C4::Context->config("enable_plugins") )
Restart and hit the API once again.
Your log should contain: [2022/08/29 12:21:55] [ERROR] PluginRoutes L49
This serves to demonstrate that the $api->log change in PluginRoutes works.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 22678: Use Koha::Logger for Mojolicious API logger
David Cook [Thu, 25 Aug 2022 23:59:42 +0000 (23:59 +0000)]
Bug 22678: Use Koha::Logger for Mojolicious API logger

This patch adds Koha::Logger as the Mojolicious logging object
for the API Mojolicious app.

Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Add $c->app->log->debug('DEBUG') and
$c->app->log->warn('WARN') to a API controller like
Koha::REST::V1::Libraries
2. koha-plack --restart kohadev
3. Go to the API route tied to that API controller method
4. Look at /var/log/koha/kohadev/api-error.log
5. Note that 'WARN' appears but 'DEBUG' does not

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Adding a context sub to Koha::Logger to get it working.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31715: Fix dbrev permissions
Tomas Cohen Arazi [Mon, 24 Oct 2022 17:34:36 +0000 (14:34 -0300)]
Bug 31715: Fix dbrev permissions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31577: DBRev 22.06.00.070
Tomas Cohen Arazi [Mon, 24 Oct 2022 17:19:42 +0000 (14:19 -0300)]
Bug 31577: DBRev 22.06.00.070

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31577: Use patron category multi-select for OpacHiddenItemsExceptions system...
Katrin Fischer [Mon, 19 Sep 2022 21:32:12 +0000 (21:32 +0000)]
Bug 31577: Use patron category multi-select for OpacHiddenItemsExceptions system preference

We are now using the patron category selects on almost all system
preferences, but OpacHiddenItemsExceptions was still missing.

To test:
- Before applying the patch:
- Add patron categories to OpacHiddenItemsExceptions using |
- Add configuration to OpacHiddenItems
- Verify all works as expected in the OPAC
- Apply patch, run database update
- Verify the system preference shows the correct settings from before
- Verify feature still works as expected

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>
2 years agoBug 31739: Password recovery from staff fails if previous expired reset-entry exists.
Björn Nylén [Wed, 12 Oct 2022 11:54:11 +0000 (11:54 +0000)]
Bug 31739: Password recovery from staff fails if previous expired reset-entry exists.

SendPasswordRecoveryEmail relies on the calling script to tell if there is an
existing valid recovery already. If there's an expired recovery-entry the
members/notices.pl script will try to create a new entry resulting in a duplicate
key error.

This patch fixes the bug by removing the need for the calling script to do the check as
since SendPasswordRecoveryEmail does the same thing anyway.
SendPasswordRecoveryEmail will now use DBIx ->update_or_create instead of looking at
the $update param to determine if it should update an existing entry or create a new.

The update param is removed from all calling scripts and test are updated.

To test:
1. Generate a password recovery mail for a patron
2. Let it expire.
3. Generate a new password recovery from staff to the same patron - Fail!
4: Apply patch
5. Generate a new password recovery from staff to the same patron - Success!
6. Opac password recovery flow should also work.
7. Tests pass.

Sponsored-by: Lund University Library
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>
2 years agoBug 31115: (QA follow-up) Use more specific permission for sidebar link
Katrin Fischer [Mon, 24 Oct 2022 17:02:55 +0000 (17:02 +0000)]
Bug 31115: (QA follow-up) Use more specific permission for sidebar link

Moves from any acq permission to edit_invoices.

Manage order baskets uses order_manage, to this is supposed to make
things a little more consistent.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31115: (QA follow-up) Remove hr
Katrin Fischer [Mon, 24 Oct 2022 16:53:16 +0000 (16:53 +0000)]
Bug 31115: (QA follow-up) Remove hr

The hr created a visible white line with a darker background and
doesn't make sense here style wise.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31115: Add additional field filtering for invoice search
Tomás Cohen Arazi [Thu, 20 Oct 2022 14:10:25 +0000 (16:10 +0200)]
Bug 31115: Add additional field filtering for invoice search

This patch adds support for filtering invoice searches on additional
fields. To test:

1. Generate additional fields for invoices
2. Have invoices with additional fields
3. Use invoice searching and play with filtering by additional fields.
=> SUCCESS: It works!
4. Sign off :-D

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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31115: Add additional_attributes support to GetInvoices
Tomas Cohen Arazi [Wed, 19 Oct 2022 20:13:13 +0000 (17:13 -0300)]
Bug 31115: Add additional_attributes support to GetInvoices

This patch adds support for searching additional_fields when retrieving
invoices using C4::Acquisition::Invoices.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Acquisition.t
=> SUCCESS: Tests pass!
3. Sign off :-D

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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31115: Add invoice fields manage link
Tomas Cohen Arazi [Tue, 18 Oct 2022 21:43:53 +0000 (18:43 -0300)]
Bug 31115: Add invoice fields manage link

This patch adds a link on the acquisitions page for reaching the
additional fields config for invoices in an easy way.

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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31115: Add support for additional fields for invoices
Tomas Cohen Arazi [Wed, 19 Oct 2022 20:12:38 +0000 (17:12 -0300)]
Bug 31115: Add support for additional fields for invoices

This patch adds support for additional fields for invoices. A new option
is added to the 'Additional fields' admin page, for the 'aqinvoices'
table.

Adding/editing invoices now supports this additional fields.

To test:
1. Apply this patches
2. Verify the original test plan works
=> SUCCESS: It does!
3. Sign off :-D

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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31945: Add page-section container to patron categories page
Martin Renvoize [Mon, 24 Oct 2022 12:10:08 +0000 (13:10 +0100)]
Bug 31945: Add page-section container to patron categories page

This patch adds the page-section container to the patron categories
administration page

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31690: Add see from tracings in See-from index (Elasticsearch, MARC21)
Caroline Cyr La Rose [Wed, 5 Oct 2022 15:36:56 +0000 (11:36 -0400)]
Bug 31690: Add see from tracings in See-from index (Elasticsearch, MARC21)

This patch adds the following fields to the See-from index

- 450(abvxyz)
- 451(avxyz)
- 455(avxyz)

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>
2 years agoBug 31532: Add preprocessor to Zebra indexing pipeline to index 880 as linked field
David Cook [Thu, 8 Sep 2022 05:06:38 +0000 (05:06 +0000)]
Bug 31532: Add preprocessor to Zebra indexing pipeline to index 880 as linked field

This patch adds a preprocessor XSLT to the Zebra indexing pipeline,
so that 880 fields get indexed as the fields they're linked to. For example,
a "880 $6 245" field would be indexed as a "245" field.

However, because the preprocessor only occurs in the indexing part of the pipeline,
it does not affect the retrieval of MARCXML from Zebra. That MARCXML will be
the same MARCXML that was sent to Zebra from Koha.

Test plan:

0. Revert bug 15187, and apply patch for 31532
1. cp ./etc/zebradb/biblios/etc/dom-config.xml /etc/koha/zebradb/biblios/etc/dom-config.xml
2a. cp etc/zebradb/marc_defs/marc21/biblios/preprocess_marcxml.xsl /etc/koha/zebradb/marc_defs/marc21/biblios/.
2b. cp etc/zebradb/marc_defs/normarc/biblios/preprocess_marcxml.xsl /etc/koha/zebradb/marc_defs/normarc/biblios/.
2c. cp etc/zebradb/marc_defs/unimarc/biblios/preprocess_marcxml.xsl /etc/koha/zebradb/marc_defs/unimarc/biblios/.
3. koha-rebuild-zebra -b -f -v kohadev
4. Note that in search results the 880$6245$a data appears before the 245$a data
5. Note that you can do a title index search on the 880$6245$a data

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>
2 years agoRevert "Bug 15187: (QA follow-up) Add unit test"
Tomas Cohen Arazi [Mon, 24 Oct 2022 17:04:07 +0000 (14:04 -0300)]
Revert "Bug 15187: (QA follow-up) Add unit test"

This reverts commit 058d411643c4b868553b97896fb065cf9870e456.

2 years agoRevert "Bug 15187: (QA follow-up) Fix test permissions"
Tomas Cohen Arazi [Mon, 24 Oct 2022 17:03:54 +0000 (14:03 -0300)]
Revert "Bug 15187: (QA follow-up) Fix test permissions"

This reverts commit e6947b740883670b48f002bba7a64103016bc4ef.

2 years agoRevert "Bug 15187: Index 880 in Zebra the same as Elasticsearch"
Tomas Cohen Arazi [Mon, 24 Oct 2022 17:03:44 +0000 (14:03 -0300)]
Revert "Bug 15187: Index 880 in Zebra the same as Elasticsearch"

This reverts commit 85690a14f8685a2eb6cb88316bb4a3145c024cc2.

2 years agoBug 31850: Patron import: welcome email option style as list
Owen Leonard [Tue, 18 Oct 2022 17:53:53 +0000 (17:53 +0000)]
Bug 31850: Patron import: welcome email option style as list

This patch corrects the markup around the "Send email to new patrons"
checkbox on the patron import page. The list should be an ordered list,
not an unordered list.

To test, apply the patch and go to Tools -> Import patrons.

In the "Welcome email" section, there should be no bullet point before
the "Send email to new patrons" line.

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>
2 years agoBug 31879: Compiled CSS
Tomas Cohen Arazi [Mon, 24 Oct 2022 16:19:42 +0000 (13:19 -0300)]
Bug 31879: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31879: Convert mainpage.css to SCSS
Owen Leonard [Wed, 19 Oct 2022 18:45:48 +0000 (18:45 +0000)]
Bug 31879: Convert mainpage.css to SCSS

This patch creates a new SCSS file to be used to generate mainpage.css,
the stylesheet used specifically for the staff interface home page.

The patch makes visible changes in only two places: Removing borders
from two elements to make them consistent with the new staff interface
design:
 - div.pending-info, where pending actions like patrons requesting
   modifications are shown.
 - div#area-userblock, where the contents of the IntranetmainUserblock
   system preference are displayed.

Otherwise the changes are all for the purpose of properly nesting
elements according to SCSS rules and other fixes related to stylelint
rules.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

View the main page of the staff interface. Everything should look like
it did before except for those elements which have had their borders
removed.

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>
2 years agoBug 31936: Compiled CSS
Tomas Cohen Arazi [Mon, 24 Oct 2022 16:18:07 +0000 (13:18 -0300)]
Bug 31936: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31936: Restore link to advanced search in acquisitions header
Owen Leonard [Mon, 24 Oct 2022 13:33:45 +0000 (13:33 +0000)]
Bug 31936: Restore link to advanced search in acquisitions header

This patch adds back the link to the advanced order search page which
was previously in the acquisitions header search. Some CSS is tweaked to
make the form style comfortable.

To test, apply the patch and rebuild the staff interface CSS.

- Go to Acquisitions.
- In the header search form, click "Orders search"
- Click the icon in the search form to expand the additional options.
- You should see an "Advanced search" link which is the same style as
  other standard links.
- The link should take you to the order search form.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 25716: (QA follow-up) Move additional options to etc/z3950/config.xml
Kyle Hall [Mon, 24 Oct 2022 14:58:59 +0000 (10:58 -0400)]
Bug 25716: (QA follow-up) Move additional options to etc/z3950/config.xml

This followup moves the configuration to the z3950 etc file, either the
default and or the custom file is used as per the existing script code.

In addition, the options and be set using an environment variable named Z3950_ADDITIONAL_OPTS.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 25716: Don't exit if config doesn't exist in Koha conf file
Kyle M Hall [Thu, 3 Dec 2020 20:37:40 +0000 (15:37 -0500)]
Bug 25716: Don't exit if config doesn't exist in Koha conf file

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 25716: Add ability to specify additional options in koha-conf.xml for z3950_respo...
Kyle M Hall [Thu, 11 Jun 2020 15:17:23 +0000 (11:17 -0400)]
Bug 25716: Add ability to specify additional options in koha-conf.xml for z3950_responder.pl when using koha-z3950-responder

The z39.50 responder has a number of command line options that are not
accessible if using the debian scripts to control it. We should be able
to set those options in the koha conf file to be passed to the script
itself.

Test Plan:
1) Apply this patch
2) Copy your kohaclone's koha-z3950-responder to /usr/sbin/koha-z3950-responder if necessary
3) Add "<z3950_responder_options>--add-item-status k</z3950_responder_options>" inside your <config> block in your koha-conf.xml file
4) Use koha-z3950-responder to start/restart the z39.50 responder, note the item status is now in subfield k!

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31952: Add page-section to authorized values admin
Martin Renvoize [Mon, 24 Oct 2022 11:50:18 +0000 (12:50 +0100)]
Bug 31952: Add page-section to authorized values admin

This patch adds the page-section container to the authorized_values
administration area.

Test plan
1) Confirm that the AV admin area looks reasonable for all area's of
   display

https://bugs.koha-community.org/show_bug.cgi?id=31942

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31941: Add page-section container to item types
Martin Renvoize [Mon, 24 Oct 2022 11:39:06 +0000 (12:39 +0100)]
Bug 31941: Add page-section container to item types

This patch adds the page-section container to the item types
adminstration page

Test plan
1) Confirm the item types administration page uses the card view around
   the main table

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31939: Add page-section to branches template
Martin Renvoize [Mon, 24 Oct 2022 11:19:07 +0000 (12:19 +0100)]
Bug 31939: Add page-section to branches template

This patch adds the page-section class to the appropriate blocks in the Libraries administration area.

Test plan
1) Confirm that Administration > Libraries correctly displays the table
   inside a page-section card
2) Confirm that Administration > Libraries > 'A library' correctly
   displays a card for the main information at the top and a separate
   card for OPAC Information if added.
3) Confirm that the 'Add' and 'Edit' library forms still look good.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31806: Add page-section container to existing holds
Martin Renvoize [Fri, 21 Oct 2022 09:10:17 +0000 (10:10 +0100)]
Bug 31806: Add page-section container to existing holds

This patch adds a page-section container around the existing holds
content section

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31806: Add page-section to holds tables
Martin Renvoize [Fri, 21 Oct 2022 08:56:08 +0000 (09:56 +0100)]
Bug 31806: Add page-section to holds tables

This patch adds the page-section class to each holds view on
reserve/request.pl

Test plan
1) Find an biblio to test on and add holds items of different types and
   homebranches.
2) Work through each setting of the HoldsSplitQueue preference and
   confirm the page-sections appear as expected

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31864: (follow-up) Fix breadcrumbs in batchMod and batch_record_mod
Lucas Gass [Wed, 19 Oct 2022 22:29:48 +0000 (22:29 +0000)]
Bug 31864: (follow-up) Fix breadcrumbs in batchMod and batch_record_mod

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31864: Correct breadcrumbs for pages in new cataloging module
Lucas Gass [Tue, 18 Oct 2022 23:30:08 +0000 (23:30 +0000)]
Bug 31864: Correct breadcrumbs for pages in new cataloging module

To test:
1. Apply patch
2. Set system preference 'StockRotation' to enable.
3. Be logged in as a superlibrarian
4. Check the breadcrumbs on the following pages, accessible from the Cataloging module homepage:

barcode-print.tt
label-edit-batch.tt
label-edit-layout.tt
label-edit-profile.tt
label-edit-range.tt
label-edit-template.tt
label-home.tt
label-manage.tt
spinelabel-home.tt
automatic_item_modification_by_age.tt
batchMod-edit.tt
batchMod.tt
batch_delete_records.tt
export.tt
inventory.tt
manage-marc-import.tt
marc_modification_templates.tt
stage-marc-import.tt
stockrotation.tt
upload-images.tt

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31903: Fix missing Edit URL link
Marcel de Rooy [Fri, 21 Oct 2022 09:26:08 +0000 (09:26 +0000)]
Bug 31903: Fix missing Edit URL link

We need to pass format too for New tab (see Pending/Processing).

Test plan:
* Include SCAN format in ArticleRequestSupportedFormats system preferences.
* Check circ rules to allow article requests.
* Add a new request for digital copy and another for photocopy.
* Check Circulation - Article requests - New tab.
* Verify that the Actions menu for a single row for the digital copy
  does contain the "Edit URL(s)" option now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Amended test plan.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31644: (QA follow-up) Add two missing shebang lines
Marcel de Rooy [Fri, 21 Oct 2022 07:44:50 +0000 (07:44 +0000)]
Bug 31644: (QA follow-up) Add two missing shebang lines

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31644: Add copy test and clarify some functions
Nick Clemens [Thu, 29 Sep 2022 16:13:10 +0000 (16:13 +0000)]
Bug 31644: Add copy test and clarify some functions

This patch adds a tst for copy without subfields. I also clarify what eachstep does
so the next user/coder understands current behaviour

Update existing or add new: In the case where the field/subfield exists
we update, if we have two fields - one with the subfield, and one without, we
add the subfield to the one without

Copy field:
 - If given a subfield - we will add to existing fields in the record
 - If not given a subfield - we create an entirely new field

The logic of all of this is tricky, makes sense in a certain light, any complaints
are for a new bug :-)

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>
2 years agoBug 31644: Check if subfield defined, not for truth
Nick Clemens [Wed, 28 Sep 2022 18:53:28 +0000 (18:53 +0000)]
Bug 31644: Check if subfield defined, not for truth

To test:
1 - Define a new MARC Modification template with actions:
        Copy field 600$a to 942$0
2 - Define a new record like:
    LDR 00334nam a22001217a 4500
    003 ff
    005 20201102111604.0
    008 201102b        xxu||||| |||| 00| 0 eng d
    040 _ _ ‡cvsd
    100 1 _ ‡012345‡aKnuth, Donal Ervin‡d1938
    245 _ _ ‡012345‡aThe aty of computer programming‡cDonald E. Knuth
    600 _ 0 ‡042‡aComputer programming‡9462
3 - Modify this record using the template above
4 - Note that entire  field is copied to 942
5 - Apply patch
6 - Now only subfield 0 is copied

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>
2 years agoBug 31644: Unit test
Nick Clemens [Thu, 29 Sep 2022 12:36:11 +0000 (12:36 +0000)]
Bug 31644: Unit test

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>
2 years agoBug 31871: Date due not shown on items tab
Stefan Berndtsson [Wed, 19 Oct 2022 12:48:38 +0000 (14:48 +0200)]
Bug 31871: Date due not shown on items tab

Changed ITEM_DAT to checkout in moredetail.tt

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>
2 years agoBug 31869: Unable to save thesaurus value to frameworks subfields
Nick Clemens [Wed, 19 Oct 2022 11:17:37 +0000 (11:17 +0000)]
Bug 31869: Unable to save thesaurus value to frameworks subfields

This patch correct a typo authtypecodes for authtypecode

To test:
1. Edit e.g. default frameworks subfield 100$a
2. Add or change fields thesaurus value
3. Save your changes
   => note that on subfield listing there is no mention that 100$a is linked to any thesaurus
   => if you edit 100$a thesaurus input is empty
4. Apply patch
5. Edit subfield 100$a and set a thesaurus value
6. Confirm it saves and displays correctly

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31847: Add page-section class to item search results
Lucas Gass [Tue, 18 Oct 2022 14:14:30 +0000 (14:14 +0000)]
Bug 31847: Add page-section class to item search results

To test:
1. Apply patch
2. Look at item search results ( itemsearch.tt )
3. Make sure everthing looks right.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31715: DBRev 22.06.00.069
Tomas Cohen Arazi [Mon, 24 Oct 2022 14:49:42 +0000 (11:49 -0300)]
Bug 31715: DBRev 22.06.00.069

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>