]> git.koha-community.org Git - koha.git/log
koha.git
40 min agoBug 37955: Fix table's 'configure' button to open correct column settings main
Owen Leonard [Wed, 18 Sep 2024 12:57:40 +0000 (12:57 +0000)]
Bug 37955: Fix table's 'configure' button to open correct column settings

This patch updates markup and JS code on the table settings page so that
clicking a table's "configure" button will open the right panel and
scroll you to the correct table.

The patch also overrides Bootstrap's default table caption positioning
so that captions are above the table instead of below them.
Unfortunately this property isn't in Bootstrap's _variables.

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_interface).

- Find a table in the staff interface which has a "Configure" button,
  e.g. Administration -> Libraries.
- Click the "Configure" button.
- When you arrive at the table settings page the correct panel should be
  expanded (in this example, Administration), and the page should scroll
  to the correct table (in this example, libraries).
  - The table caption ("Table id: libraries") should appear before the
    table instead of after.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
41 min agoBug 37898: Wrap some ERM api tests inside a transaction
Tomas Cohen Arazi [Wed, 11 Sep 2024 17:48:34 +0000 (14:48 -0300)]
Bug 37898: Wrap some ERM api tests inside a transaction

Trivial ones.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
41 min agoBug 37898: Wrap Patroncards.t inside a transaction
Tomas Cohen Arazi [Wed, 11 Sep 2024 16:03:55 +0000 (13:03 -0300)]
Bug 37898: Wrap Patroncards.t inside a transaction

This tests leave data on the DB and need to be fixed. This patch does
that.

To test:
1. Run:
   $ ktd --shell
  k$ echo "SELECT COUNT(*) FROM creator_layouts \G" | koha-mysql kohadev
2. Run:
  k$ prove t/db_dependent/Patroncards.t
=> SUCCESS: Tests pass
3. Repeat 1
=> FAIL: Numbers don't match the original ones!
4. Apply this patch
5. Repeat 2 and 3
=> SUCCESS: Tests still pass!
=> SUCCESS: Numbers match!
6. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
41 min agoBug 37898: Wrap Relationships.t inside a transaction
Tomas Cohen Arazi [Wed, 11 Sep 2024 15:55:40 +0000 (12:55 -0300)]
Bug 37898: Wrap Relationships.t inside a transaction

This tests leave data on the DB and need to be fixed. This patch does
that.

To test:
1. Run:
   $ ktd --shell
  k$ echo "SELECT COUNT(*) FROM borrowers \G" | koha-mysql kohadev
  k$ echo "SELECT COUNT(*) FROM borrower_relationships \G" | koha-mysql kohadev
2. Run:
  k$ prove t/db_dependent/Patron/Relationships.t
=> SUCCESS: Tests pass
3. Repeat 1
=> FAIL: Numbers don't match the original ones!
4. Apply this patch
5. Repeat 2 and 3
=> SUCCESS: Tests still pass!
=> SUCCESS: Numbers match!
6. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
41 min agoBug 37898: Wrap labels tests inside transactions
Tomas Cohen Arazi [Wed, 11 Sep 2024 15:48:28 +0000 (12:48 -0300)]
Bug 37898: Wrap labels tests inside transactions

This tests are written in a way that the cleanup is done explicitly. So
I found no evidence of them leaving the database dirty. But it felt
worth wrapping anyway, because any dev adding something could easily
introduce new data inadvertedly.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
41 min agoBug 37898: Wrap Indexer.t inside a transaction
Tomas Cohen Arazi [Wed, 11 Sep 2024 15:35:17 +0000 (12:35 -0300)]
Bug 37898: Wrap Indexer.t inside a transaction

This tests leave new data on the DB. This patch fixes it.

To test:
1. Run:
   $ ktd --shell
  k$ echo "SELECT COUNT(*) FROM biblio \G" | koha-mysql kohadev
2. Run:
  k$ prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Indexer.t
=> SUCCESS: Tests pass
3. Repeat 1
=> FAIL: Biblio count raised
4. Apply this patch
5. Repeat 2 and 3
=> SUCCESS: Tests pass
=> SUCCESS: Biblio count remains
6. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
46 min agoBug 37330: (bug 33526 follow-up) Fix display of cover images for items
Jonathan Druart [Mon, 16 Sep 2024 09:31:45 +0000 (11:31 +0200)]
Bug 37330: (bug 33526 follow-up) Fix display of cover images for items

The id has been modified by bug 33526. We can simply pass the table
element however.

Test plan:
Have some cover images at item level and notice that they are correctly
displayed on the bibliographic record detail page.

Note that the slider does not work correctly. If you click on the dot
(so if you have several images for an item) the scrollbar is going to
hit the top of the page and the image won't change.
Could be reported separately if not done yet.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
47 min agoBug 37840: Fix item status in the Intranet detail page when the item has a item type...
Adolfo Rodríguez [Thu, 5 Sep 2024 07:22:19 +0000 (09:22 +0200)]
Bug 37840: Fix item status in the Intranet detail page when the item has a item type not for loan

When the item type is not for loan, the item status must be "Not for loan". Now in the Intranet status is Available while in the OPAC it's Not for loan.

Test plan:
1 Define an item type as "Not for loan"
2 Add or edit an item so that its item type is "Not for loan"
3 Check that the status in the Intranet detail page shows Available while the OPAC detail page shows "Not for loan"
4 Apply patch, restart services
5 Check that the status is now "Not for loan" in both Intranet and OPAC

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
49 min agoBug 35100: (follow-up) Tidy
Nick Clemens [Tue, 5 Mar 2024 12:38:02 +0000 (12:38 +0000)]
Bug 35100: (follow-up) Tidy

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
49 min agoBug 35100: (follow-up) Fix test
Nick Clemens [Tue, 5 Mar 2024 12:31:12 +0000 (12:31 +0000)]
Bug 35100: (follow-up) Fix test

Previous patches changed the return values, just needed to update expectations

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
49 min agoBug 35100: Revert change to request_transfer
Martin Renvoize [Mon, 8 Jan 2024 17:34:09 +0000 (17:34 +0000)]
Bug 35100: Revert change to request_transfer

This patch reverts the change to request_transfer, opting to tackle the
StockRotationAdvance requirement to stay in place in ModItemTransfer
itself.

We also add a FIXME to RotatingCollections.. I'll look to removing that
on another bug to reduce the scope of this one.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
49 min agoBug 35100: Various fixes
Martin Renvoize [Fri, 5 Jan 2024 16:08:44 +0000 (16:08 +0000)]
Bug 35100: Various fixes

1) Don't automagically always set a transfer to in transit on checkin..
   wait for the user to actually confirm that's the case
2) New transfers triggered by a hold should take precidence, so hide
   transfers for any other reason from display
3) Update get_transfer and get_transfers to ensure ordering isn't lost
   when prefetch is used and add tests for this

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
49 min agoBug 35100: Prevent StockrotationAdvance transfers from being cancelled
Martin Renvoize [Thu, 4 Jan 2024 12:00:13 +0000 (12:00 +0000)]
Bug 35100: Prevent StockrotationAdvance transfers from being cancelled

ModItemTransfer is still very heavy handed and outright overrules
existing transfers in the queue.

For StockrotationAdvance transfers it's important that they remain in
the queue to get actioned later, even if a higher precident transfer is
actions in the interim.

This patch adds a clause to the cancellation call within
request_transfer such that StockrationAdvance transfers are left in tact
for the next time the item is checked in.

Test plan
1) Item is added to stock rotation
2) The cronjob creates a 'StockRotationAdvance' transfer
3) The item is checked in, which initiates the transfer, however, a hold is triggered
4) The hold is confirmed, which replaces the StockRotationAdvance
5) The item is checked out
6) The item is checked in, which initiates the transfer again
7) The item is checked in at it's destination and the StockrotationAdvance transfer
   has the proper date arrived date set.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
49 min agoBug 35100: Unit tests
Martin Renvoize [Thu, 4 Jan 2024 12:09:47 +0000 (12:09 +0000)]
Bug 35100: Unit tests

This patch adds a unit test to ensure StockrotationAdvance transfers are
not cancelled from request_transfer when called with 'replace'.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
51 min agoBug 37812: Fix a modal in the ERM module
Jonathan Druart [Wed, 18 Sep 2024 06:37:55 +0000 (08:37 +0200)]
Bug 37812: Fix a modal in the ERM module

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
51 min agoBug 37812: Prevent initialisation failure by using modal methods, not plain show...
Paul Derscheid [Tue, 17 Sep 2024 18:02:51 +0000 (18:02 +0000)]
Bug 37812: Prevent initialisation failure by using modal methods, not plain show, hide

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
51 min agoBug 37812: Prevent non-functional close buttons by using vue event handlers
Paul Derscheid [Tue, 17 Sep 2024 13:27:57 +0000 (13:27 +0000)]
Bug 37812: Prevent non-functional close buttons by using vue event handlers

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
51 min agoBug 37812: Improve consistency of modal styling in Dialog.vue
Paul Derscheid [Tue, 17 Sep 2024 10:59:26 +0000 (10:59 +0000)]
Bug 37812: Improve consistency of modal styling in Dialog.vue

- Use modal-header for content, modal-footer for acknowledgement in alert type modal.
- Conditionally render modal-body if message or inputs available.
- Use modal footer for interactions and hide top border if body wasn't rendered.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
51 min agoBug 37812: Prevent "underflow" when using comboboxes in bootstrap modals
Paul Derscheid [Tue, 17 Sep 2024 10:58:09 +0000 (10:58 +0000)]
Bug 37812: Prevent "underflow" when using comboboxes in bootstrap modals

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
51 min agoBug 37812: Adjust Dialog.vue component
Jonathan Druart [Tue, 10 Sep 2024 14:34:54 +0000 (16:34 +0200)]
Bug 37812: Adjust Dialog.vue component

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
51 min agoBug 37812: Adjust modals from the Preservation module - bootstrap5
Jonathan Druart [Tue, 10 Sep 2024 14:06:35 +0000 (16:06 +0200)]
Bug 37812: Adjust modals from the Preservation module - bootstrap5

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
52 min agoBug 37775: Spelling and tidy
Nick Clemens [Fri, 30 Aug 2024 12:51:37 +0000 (12:51 +0000)]
Bug 37775: Spelling and tidy

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
52 min agoBug 37775: Remove delayed commits from update_totalissues.pl and add progress option
Nick Clemens [Fri, 30 Aug 2024 12:47:07 +0000 (12:47 +0000)]
Bug 37775: Remove delayed commits from update_totalissues.pl and add progress option

This patch removes setting AutoCommit to 0 and commiting only every X records.
Instead we commit as we go and report progress using a parameter.

Bug 36474 reduced the numebr of changes that are being committed, so this should be a reasonable change. The
use of commits without transactions was causing problems if the library was active while the script ran.

To test:
1 - perl misc/cronjobs/update_totalissues.pl -c
2 - Script runs, but with unknown parameter
3 - perl misc/cronjobs/update_totalissues.pl -p 10
4 - Script runs and reports every 10 records
5 - per; misc/cronjobs/update_totalissues.pl
6 - Script runs and reports every 100 records by default

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
52 min agoBug 36474: Don't update records when total issues has not changed
Nick Clemens [Mon, 1 Apr 2024 15:00:34 +0000 (15:00 +0000)]
Bug 36474: Don't update records when total issues has not changed

This patch adds a new check in UpdateTotalIssues to check that we are changing the number
of total issues before calling ModBiblio

To test:
0 - Enable CataloguingLog
1 - Checkout an item
2 - Run : misc/cronjobs/update_totalissues.pl --use-stats --commit=1000 -v
3 - In report, note all biblios were updated
4 - Check action_logs - note a new entry for every biblio
5 - Apply patch
6 - Repeat
7 - Note no biblios reported updated
8 - Note no new cataloguing log entries
9 - Checkout the item again
10 - Run again
11 - Note biblionumber has updated count in verbose output
12 - Note report only rpeort 1 biblio modified, the rest only processed
13 - Only one line added to action_logs
14 - Run it again
15 - Confirm no updates

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
52 min agoBug 36474: Unit tests
Nick Clemens [Wed, 28 Aug 2024 13:28:35 +0000 (13:28 +0000)]
Bug 36474: Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
27 hours agoBug 37601: (follow-up) DBIC schema update
Jonathan Druart [Wed, 18 Sep 2024 08:59:11 +0000 (10:59 +0200)]
Bug 37601: (follow-up) DBIC schema update

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
27 hours agoBug 37601: (QA follow-up) Adjust kohastructure.sql
Paul Derscheid [Wed, 18 Sep 2024 08:35:19 +0000 (08:35 +0000)]
Bug 37601: (QA follow-up) Adjust kohastructure.sql

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
32 hours agoBug 37592: (QA follow-up) Fetch database fields for api return
Martin Renvoize [Wed, 18 Sep 2024 03:59:27 +0000 (04:59 +0100)]
Bug 37592: (QA follow-up) Fetch database fields for api return

Creation and Modification times are maintained by the database, but on
add/update we were not fetching the updated fields from the database for
the api response.

This patch corrects that and also updates the api schema to reflect that
these are readOnly fields.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 37601: DBIC schema update
Katrin Fischer [Tue, 17 Sep 2024 10:33:13 +0000 (10:33 +0000)]
Bug 37601: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 days agoBug 37857: Add callnumber and geo_point for new search fields
Jonathan Druart [Mon, 9 Sep 2024 09:06:37 +0000 (11:06 +0200)]
Bug 37857: Add callnumber and geo_point for new search fields

It is missing "Geo point" and "Call Number" from the options of
"Type" when creating a new search field.

Test plan:
Go to the elastic mapping config page, bottom of the page.
Notice that after this patch you see the 2 options in the dropdown list.

Signed-off-by: Chloe Zermatten <chloe.zermatten@ptfs-europe.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 days agoBug 37914: Forms for budget planning filters and export should GET rather than POST
Phil Ringnalda [Thu, 12 Sep 2024 22:39:46 +0000 (15:39 -0700)]
Bug 37914: Forms for budget planning filters and export should GET rather than POST

Because of the bug 36192 CSRF protection, we intend not to have forms that
POST without a param named 'op' with a value starting with 'cud-'. Because
of bug 37728, a few were missed, including the 'Filters' form that lets you
switch between planning budgets by month or by itemtype or by library, and
the 'Export' form that lets you save your planning as a .csv file. Neither
one has any need to POST, they can just be the GET they naturally are.

Alas, the default data won't let you exercise everything, so there's a lot of
setup before the actual testing.

Test plan:
 1. Patrons - search for Acevedo - More-> Set permissions - check
    Acquisitions management and Save
 2. Administration - Authorized values - Asort1 - New authorized value for
    Asort1 - value Q1, description First Quarter, then repeat for Q2, Q3, Q4
 3. Administration - Budgets - New budget - give it a start date of today,
    end date of a year from today, a description, a total amount of
    100000.00, for Statistic 1 done on choose Asort1
 4. Click the name of your new budget - New-> New fund for (name) - give it
    the code my, name My money, amount 75000.00 and Submit
 5. New-> New fund for (name) - give it the code his, name Henry's money,
    amount 25000.00, and click Select owner, find Henry and Select, then
    Submit
 6. Acquisitions - click Search on an empty search box to find the only
    vendor - New-> Basket - Give it a name and Save
 7. Add to basket - From an existing record (search for something like Perl)
    click any bib record - Add order - set the required item type and click
    Add item
 8. Scroll down to the Accounting details form, change Fund to My money, and
    enter 20.00 for the Vendor price and click Save. You just made that
    fund "active" in the eyes of the Filter form, by spending some of it.
 9. Finally set up. Administration - Budgets - click the name of your budget
10. Planning-> Plan by months
11. In the upper left Filter box, check Show my funds only and Submit - you
    should see Henry's money disappear
12. Uncheck Show my funds only and check Show active funds only and Submit -
    you should see Henry's money disappear
13. Check Show actual/estimated values and Submit, you should see text for
    the actual (only in this month, since that's all you spent) and wee
    little shrunken text boxes for the planning numbers
14. Uncheck all the boxes and change the dropdown from by months to by Asort1
    (either one of it, there being two is bug 34159) and Submit, you should
    have four columns for Q1 - Q4 and only for My money, since Henry doesn't
    use Asort1
15. Click the Auto-fill row button, and Save
16. In the Export form (which isn't much of a form, since you only have a
    choice for the filename) click Submit
17. You should have downloaded a .csv file, and if you open it it should
    have the info from your current planning form.
18. Apply patch, restart_all
19. Repeat steps 9-17, getting the same results you did without the patch

Sponsored-by: Chetco Community Public Library
Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 days agoBug 37887: OPAC password recovery needs to use a cud- op while POSTing new password
Phil Ringnalda [Wed, 11 Sep 2024 03:17:20 +0000 (20:17 -0700)]
Bug 37887: OPAC password recovery needs to use a cud- op while POSTing new password

To pass xt/find-missing-op-in-forms.t after bug 37728 updates it to notice
that there can be more than one form in a template, opac-password-recovery.tt
needs to have a param named 'op' which starts with 'cud-' for the form that
POSTs the new password.

Luckily, testing this doesn't require that you set Koha up to actually send
email (though you can), because you can get the link to reset the password
by looking at the list of notices sent to the patron in the staff interface:
the failure to send notice works just fine.

Test plan:
 1. There's no behavior change to test, you just need to see that resetting
    the password still works, so start with the patch applied.
 2. Administration - System preferences - change OpacResetPassword to allowed
 3. Set a patron so you can use them, which requires that you know the
    username, and they have an email address. I give Acosta, Edna one of
    my email addresses, and copy her cardnumber.
 4. Open the OPAC, and below the login form click the "Forgot your password?"
    link
 5. Enter the cardnumber for Login and the email you used for Email and
    click Submit. If you didn't set up sending email, you'll get an error
    message, but ignore it, not a problem
 6. Back in the staff interface, check out to the patron you are using, and
    on the left sidebar choose Notices and find the Koha password recovery
    notice and click that linked phrase
 7. In the popup with the notice text, open the recovery link in a new tab
 8. Following the instructions for the content of a new password, enter one
    in both fields and click Submit
 9  In the success message, click the link to Log in to your account and
    log in with the new password

Sponsored-by: Chetco Community Public Library
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 days agoBug 37769: Fix forms that POST without an op in currency administration
Phil Ringnalda [Thu, 29 Aug 2024 22:31:50 +0000 (15:31 -0700)]
Bug 37769: Fix forms that POST without an op in currency administration

We intend not to have forms with method="post" without an op variable (so we
can check that the op starts with "cud-" as part of the CSRF protection), but
because of bug 37728 some were missed.

This patch changes the form around the OK button when you are told you can't
delete a currency which is in use, and the No, do not delete button when you
could delete a currency and decide not to, from a POST to a GET because all
they need to do is show the list of currencies again.

The only visible change from the patch is that the URL will end with a "?"
from having done a GET without any params. Someone who wants to decide
which of our link-as-cancel-button styles to use is welcome to switch them
to links, in a bug not blocking an RM_priority bug.

Test plan:
1. No changes to see, so apply the patch first
2. Administration - Currencies and exchange rates
3. You need one currency in use and one not in use. Luckily, ktd gave you
   USD for in use, and GBP for not in use. For USD, click the Deleete button
4. On the page telling you that you can't delete it because it's in use,
   click the OK button and verify that you are back at the list of currencies
5. Click the Delete button for GBP, then the No, do not delete button
6. Verify that you are back at the list of currencies

Sponsored-by: Chetco Community Public Library
Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 days agoBug 37767: Fix forms that POST without an op in Authority types
Phil Ringnalda [Fri, 30 Aug 2024 00:34:36 +0000 (17:34 -0700)]
Bug 37767: Fix forms that POST without an op in Authority types

We intend not to have forms with method="post" without an op variable (so we
can check that the op starts with "cud-" as part of the CSRF protection), but
because of bug 37728 some were missed.

In Authority types, that's dead code in the template that expects to show a
"Data deleted" confirmation page, but it never shows because rather than
setting the variable delete_confirmed and outputting the template, the op
cud-delete_confirmed just does a print $input->redirect() and exits, and, the
search for tags form that should be a GET so it can be bookmarked and linked
to.

Test plan:
 1. Without the patch, Administration - Authority types - choose one other
    than default, so you can see the code rather than "" in the URL -
    Actions - MARC structure
 2. For any tag (you *are* testing in a throwaway database, right?) click
    Actions - Delete then Yes, delete
 3. Note that you don't get a confirmation page, just redirected back to a
    search for your tag which no longer exists, with the searchfield and
    authtypecode nicely in the URL
 4. Click the Search button for the Search for tag form, without changing
    anything
 5. Note that your URL lost the searchfield and authtypecode
 6. Apply patch, restart_all
 7. Repeat steps 1, 2, and 3, with identical results like they should be
 8. Repeat step 4, but this time note that the searchfield and authtypecode
    stay in the URL.
 9. Change the select menu for In framework and click Search, note that
    the searchfield and frameworkcode are still in the URL and still correct
    and that the correct results show
10. Change the tag number and hit Enter, and verify that the URL and the
    page show the correct results

Sponsored-by: Chetco Community Public Library
Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 days agoBug 34088: Move the 'needs update' test to a separate script
Jonathan Druart [Thu, 5 Sep 2024 10:03:09 +0000 (12:03 +0200)]
Bug 34088: Move the 'needs update' test to a separate script

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 days agoBug 37929: Remove it.only from Agreements_spec
Matt Blenkinsop [Mon, 16 Sep 2024 11:00:44 +0000 (11:00 +0000)]
Bug 37929: Remove it.only from Agreements_spec

Test plan:
1) Run the cypress tests for Agreements_spec.ts
yarn cypress run --spec t/cypress/integration/ERM/Agreements_spec.ts
2) Only the Delete test will run
3) Apply patch and yarn build
4) Run test again, all tests should run

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 days agoBug 37824: (QA follow-up) Fix improper handling of jQuery and DataTables libraries...
Paul Derscheid [Mon, 16 Sep 2024 16:25:36 +0000 (16:25 +0000)]
Bug 37824: (QA follow-up) Fix improper handling of jQuery and DataTables libraries by marking them as externals

This commit addresses an issue where jQuery and DataTables libraries (datatables.net and related extensions) were not functioning correctly when bundled with rspack. These libraries expect to be loaded in the global scope rather than as bundled modules, leading to initialization issues.

To resolve this, jQuery and all related DataTables libraries (datatables.net, datatables.net-buttons, datatables.net-buttons/js/buttons.html5, etc.) are marked as externals in the rspack configuration. This ensures they are treated as global dependencies, preventing conflicts and allowing proper initialization.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 days agoBug 37824: (follow-up) Add rspack.config.js to Makefile.PL
Katrin Fischer [Mon, 16 Sep 2024 14:39:29 +0000 (14:39 +0000)]
Bug 37824: (follow-up) Add rspack.config.js to Makefile.PL

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 days agoBug 37592: (follow-up) Fix database update statements
Katrin Fischer [Mon, 16 Sep 2024 12:51:38 +0000 (12:51 +0000)]
Bug 37592: (follow-up) Fix database update statements

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37601: DBRev 24.06.00.030
Katrin Fischer [Mon, 16 Sep 2024 11:34:47 +0000 (11:34 +0000)]
Bug 37601: DBRev 24.06.00.030

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37601: (QA follow-up) Add status 'completed'
Paul Derscheid [Mon, 16 Sep 2024 10:27:45 +0000 (10:27 +0000)]
Bug 37601: (QA follow-up) Add status 'completed'

This will probably be useful when transforming a booking into a checkout.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37601: (QA follow-up) Rename status 'created' as 'new' to be more consistent...
Paul Derscheid [Mon, 16 Sep 2024 10:20:09 +0000 (10:20 +0000)]
Bug 37601: (QA follow-up) Rename status 'created' as 'new' to be more consistent with other modules

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37601: (QA follow-up) Change updated_on to modification_date in accordance with...
Paul Derscheid [Mon, 16 Sep 2024 10:17:29 +0000 (10:17 +0000)]
Bug 37601: (QA follow-up) Change updated_on to modification_date in accordance with Bug 37592

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37601: (QA follow-up) Add status to api definition
Martin Renvoize [Thu, 12 Sep 2024 11:04:18 +0000 (12:04 +0100)]
Bug 37601: (QA follow-up) Add status to api definition

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37601: (follow-up) Change updated_at to updated_on in accordance with Bug 37592
Paul Derscheid [Tue, 27 Aug 2024 11:44:10 +0000 (13:44 +0200)]
Bug 37601: (follow-up) Change updated_at to updated_on in accordance with Bug 37592

Signed-off-by: LEBSimonsen <simonsen@bz-sh.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37601: Add status field to bookings table
Paul Derscheid [Tue, 13 Aug 2024 10:07:30 +0000 (10:07 +0000)]
Bug 37601: Add status field to bookings table

Signed-off-by: LEBSimonsen <simonsen@bz-sh.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37592: (follow-up) Fix database column names in kohastructure.sql
Katrin Fischer [Mon, 16 Sep 2024 11:27:02 +0000 (11:27 +0000)]
Bug 37592: (follow-up) Fix database column names in kohastructure.sql

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37592: DBRev 24.06.00.029
Katrin Fischer [Mon, 16 Sep 2024 11:17:49 +0000 (11:17 +0000)]
Bug 37592: DBRev 24.06.00.029

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37592: (QA follow-up) Change created_on, updated_on to creation_date, modificatio...
Paul Derscheid [Mon, 16 Sep 2024 10:06:38 +0000 (10:06 +0000)]
Bug 37592: (QA follow-up) Change created_on, updated_on to creation_date, modification_date

It makes sense not to introduce mapping code if there's no reason for it.
Accordingly the the columns are now of type DATETIME instead.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37592: (QA follow-up) Add API mapping and definition
Martin Renvoize [Thu, 12 Sep 2024 10:49:53 +0000 (11:49 +0100)]
Bug 37592: (QA follow-up) Add API mapping and definition

Sticking to API guidelines, this adds the creation_date and
modification_date fields to the api definitions and the required
to_api_mappings for those fields to be properly populated.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37592: (follow-up) Change created_at, updated_at to created_on, updated_on
Paul Derscheid [Tue, 27 Aug 2024 11:11:19 +0000 (13:11 +0200)]
Bug 37592: (follow-up) Change created_at, updated_at to created_on, updated_on

As per a discussion in the community chat, this change is more in line with the existing schema.

Signed-off-by: LEBSimonsen <simonsen@bz-sh.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37592: Add created_at, updated_at fields to bookings table
Paul Derscheid [Wed, 7 Aug 2024 15:25:25 +0000 (15:25 +0000)]
Bug 37592: Add created_at, updated_at fields to bookings table

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 34159: Budget planning shouldn't add every authorized value starting with A
Phil Ringnalda [Fri, 13 Sep 2024 00:32:23 +0000 (17:32 -0700)]
Bug 34159: Budget planning shouldn't add every authorized value starting with A

In aqplan.pl there are two different sets of params for things you can plan
by: for the toolbar "Planning" menubutton the script looks up what AVs are
used for "Statistic 1|2 done on" for the budget's fund(s), and passes them to
the template which knows to hardcode the MONTHS, ITEMTYPES, and BRANCHES
choices, but for "Select planning type" in the Filter sidebar box, the
script inserts the harcoded ones itself, adds in the ones used by a fund,
and for no apparent reason adds in every authorized value category that starts
with the letter A and has at least one value. Those things do not actually
work, because for things other than the hardcoded ones the script checks
whether they are in a fund's "Statistic 1|2" and if not refuses to let you
plan by them.

Test plan:
 1. Administration - Budgets
 2. If you don't have a budget, create one and add a fund to it,
    but with the default data click the name Main budget
 3. In the row for Main fund, click Actions->Edit
 4. For Statistic 1 done on choose an authorized value which does not start
    with A, like BOR_NOTES, and Save
 5. In the top toolbar, Planning->Plan by months
 6. In the sidebar Filter box, note that there is an option to plan by
    AR_CANCELLATION even though you didn't select that for Statistic 1
 7. Select the by BOR_NOTE choice and Submit
 8. Note that you now only see Main fund, because that's the only one
    which uses that AV
 9. Select the by months choice and Submit, see that it changes back, then
    select the by AR_CANCELLATION choice and see that nothing is displayed,
    select the by months choice again and Submit, see that the display is
    now completely broken
 9. Apply patch, restart_all, reload the page
10. Note that the AR_CANCELLATION choice is gone, and all the choices
    you do have work correctly

Sponsored-by: Chetco Community Public Library
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 26933: Improve handling of multiple covers on catalog search results in the OPAC
Owen Leonard [Thu, 11 Apr 2024 10:25:21 +0000 (10:25 +0000)]
Bug 26933: Improve handling of multiple covers on catalog search results in the OPAC

This patch implements a book cover slider widget for cover images in
OPAC search results, matching the way we show covers on the detail page.

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

Enable multiple cover image services. The patch was developed with these
services available:

    - Amazon
    - Local cover images
    - Coce (serving up Amazon, Google, and OpenLibrary images)
    - OpenLibrary
    - Baker & Taylor
    - Google
    - Custom cover images (the CustomCoverImages preference)

Perform a variet of searches and confirm that cover images are
displaying correctly, whether there be 0, 1, 2, or more covers
available for each.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 30856: Remove C4::Reserves::CanReserveBeCanceledFromOpac
Jonathan Druart [Thu, 5 Sep 2024 12:03:44 +0000 (14:03 +0200)]
Bug 30856: Remove C4::Reserves::CanReserveBeCanceledFromOpac

This subroutine can easily be replaced and is not really needed.

Test plan:
No changes expected, try to suspend/resume holds from the OPAC

Note that you cannot affect somebody's else holds.

Note for QA: The extra fetch of Koha::Hold will be removed on bug 37868.

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37824: Replace webpack with rspack for fun and profit
Paul Derscheid [Tue, 3 Sep 2024 15:35:16 +0000 (17:35 +0200)]
Bug 37824: Replace webpack with rspack for fun and profit

I left the webpack.config.js as well as the devDependencies in place for now.
We can remove them in a follow-up patch on this bug after testing it out.

To test:
1) Run js:build and js:build:prod
2) Note the build time
3) Apply patch
4) Run yarn install
5) Run js:build and js:build:prod again
6) Note the much faster build time
7) Extra credit: take a look at the ERM or preservations module and make sure everything works as expected.
8) Extra credit: run the cypress tests.
9) Sign off or give your opinion

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Looks faster to me. Where webpack failed for me (Killed, error 137), this passed.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37480: Make addroutingmember use Koha::Subscription::Routinglists
Tomas Cohen Arazi [Thu, 25 Jul 2024 17:20:09 +0000 (14:20 -0300)]
Bug 37480: Make addroutingmember use Koha::Subscription::Routinglists

This patch rewriteis the method so it relies on Koha::Object-based
classes instead of the old way.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Serials.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Run:
   $ git grep addroutingmember
=> SUCCESS: It is only called on a single .pl file which doesn't care
about the return value. Neither the tests care.
5. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37380: Replace uses of GetMarcControlnumber for get_control_number()
Tomas Cohen Arazi [Tue, 16 Jul 2024 18:42:10 +0000 (15:42 -0300)]
Bug 37380: Replace uses of GetMarcControlnumber for get_control_number()

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37380: Add get_control_number() to the metadata extractor
Tomas Cohen Arazi [Tue, 16 Jul 2024 18:21:04 +0000 (15:21 -0300)]
Bug 37380: Add get_control_number() to the metadata extractor

This simple patch implements C4::Biblio::GetMarcControlnumber in the
right spot on the Koha::* namespace.

To test:
1. Apply this patches
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37380: Unit tests
Tomas Cohen Arazi [Tue, 16 Jul 2024 18:20:20 +0000 (15:20 -0300)]
Bug 37380: Unit tests

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37781: Add translation context for "On" (when used alone)
Caroline Cyr La Rose [Thu, 29 Aug 2024 20:36:15 +0000 (16:36 -0400)]
Bug 37781: Add translation context for "On" (when used alone)

This patch adds context to the string "On" used alone in the item search
page, to mean "On a specific date".

To test:
1. Update translation files

gulp po:update --lang fr-CA

2. Check the staff-prog.po file and search for "On".

vi misc/translator/po/fr-CA-staff-prog.po

/"On"

   --> It should be in three places, two in itemsearch.tt and
       one in smtp_servers.tt

 #. For the first occurrence,
 #. SCRIPT
 #: koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt:327
 #: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:322
 #: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:324
 #, c-format
 msgid "On"
 msgstr "Sur "

3. Apply patch
4. Reupdate po files

gulp po:update --lang fr-CA

5. Check the misc/translator/po/fr-CA-messages.po file and search for "On"

    --> There should be a msgctxt line that adds context to the
        "On" (please ignore the translated msgstr, I have no idea
        how it decides what to put in there!)

 #: koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt:404
 #, fuzzy
 msgctxt "Active"
 msgid "On"
 msgstr "Oman"

 #: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:322
 #: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:324
 #, fuzzy
 msgctxt "On specific date"
 msgid "On"
 msgstr "Oman"

6. Also check the item search page
   --> It should still work and the "On" in the last borrowed date
       drop-down should still say "On"

7. In the SMTP servers page, add a server and enable the "Debug" mode.
   --> In the list of servers, the Debug column should still say simply
       "On"

8. Optionally, translate the string and remove the "#fuzzy" line,
   install the translation and check the item search page
   --> It should use the string you put in

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 35191: Make entries per page configurable for items table on staff detail page
Jonathan Druart [Tue, 31 Oct 2023 08:00:11 +0000 (09:00 +0100)]
Bug 35191: Make entries per page configurable for items table on staff detail page

The new API driven items view defaults to 20 per page. This is a bit low, it would be great if it could be configurable to a higher value per the table configuration.

Test plan:
1. Apply this patch
2. restart_all (memcached restart is required)
3. Go to Administration > Table settings
4. Catalogue > holdings_table | otherholdings_table
=> Notice the new "Default display length"
5. Select something else than 20
6. Go to the detail page of a record with lot of records
=> Notice that the default value defined in the settings is used.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 17729: Replace IsItemOnHoldAndFound
Jonathan Druart [Thu, 5 Sep 2024 10:47:53 +0000 (12:47 +0200)]
Bug 17729: Replace IsItemOnHoldAndFound

This subroutine can easily be replaced with
$item->holds->filter_by_found->count \o/

Test plan:
Confirm that the old sub and $item->holds->filter_by_found->count
produce the same query

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 8855: Make receipt page link to invoice page
Jennifer Sutton [Thu, 25 Jul 2024 22:39:51 +0000 (22:39 +0000)]
Bug 8855: Make receipt page link to invoice page

To test:

Go to the receipts page of an order. Observe that the invoice number
is a clickable link to the corresponding invoice.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Works well and passed the qa tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 34608: (follow-up) Remove debug statement
Katrin Fischer [Mon, 16 Sep 2024 08:40:03 +0000 (08:40 +0000)]
Bug 34608: (follow-up) Remove debug statement

Removes:
console.log(waiting_holds_barcodes);

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 34608: Deal with null values
Jonathan Druart [Wed, 28 Aug 2024 12:40:43 +0000 (14:40 +0200)]
Bug 34608: Deal with null values

default values for sort1 and sort2 is NULL

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 34608: Display dropdown list if linked with AV cat
Jonathan Druart [Tue, 23 Apr 2024 09:19:22 +0000 (11:19 +0200)]
Bug 34608: Display dropdown list if linked with AV cat

If at least one AV exists for bsort1 we will show a dropdown list in
the column filter for bsort1. Same for bsort2.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 34608: (follow-up) Display authorized values if used
Owen Leonard [Wed, 1 Nov 2023 17:19:09 +0000 (17:19 +0000)]
Bug 34608: (follow-up) Display authorized values if used

This patch shamelessly steals from Bug 33568 in order to allow the
correct authorized value description to be shown in the JS-generated
table of results for values of borrowers sort1 and sort2.

To test, apply the patch and go to Administration -> Authorized values.

- Add some values, if necessary, to both the 'Bsort1' and 'Bsort2'
  categories.
- Locate some patron records to edit, and set the patron's "Sort 1" and
  "Sort 2" fields.
- Perform a patron search which will return those patron records.
  - Confirm that the correct authorized value description is shown
    instead of the authorized value code.
- Delete all values from the 'Bsort1' and 'Bsort2' authorized value
  categories.
- Return to your patron search and confirm that "Sort 1" and "Sort 2"
  values are still being shown, though now it's the "raw" code.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 34608: Add sort1 and sort2 to patron search results
Owen Leonard [Thu, 24 Aug 2023 10:57:37 +0000 (10:57 +0000)]
Bug 34608: Add sort1 and sort2 to patron search results

This patch adds the option of displaying patron "sort1" and
"sort2" statistical fields in the patron module's main search
results. The fields are hidden by default in the updated table
configuration.

To test, apply the patch and restart services.

- Go to Patrons and perform a search.
- You should not see columns for sort1 and sort2.
- Under the "Columns" button you should see options to display sort1 and
  sort2. Confirm that they work to show and hide the columns.
- Confirm that the sort1 and sort2 columns are sortable and searchable.

- Go to Administration -> Table settings.
- Under Patrons -> member, toggle the sort1 and sort1 "hidden by
  default" checkboxes and save the configuration.
- Return to patron search results to confirm that the columns are now
  shown by default.

Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 31161: Unit tests
Nick Clemens [Thu, 5 Sep 2024 13:35:50 +0000 (13:35 +0000)]
Bug 31161: Unit tests

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 31161: (QA follow-up) Remove FIXME
Nick Clemens [Fri, 23 Aug 2024 13:39:08 +0000 (13:39 +0000)]
Bug 31161: (QA follow-up) Remove FIXME

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 31161: Mark hidden records as deleted
David Cook [Wed, 14 Aug 2024 00:41:46 +0000 (00:41 +0000)]
Bug 31161: Mark hidden records as deleted

If a bib record is hidden by OpacHiddenItems,
mark it as deleted in the OAI-PMH, so that it's metadata
is not consumed in a new OAI-PMH harvest, and it's marked
for removal if the metadata was consumed in previous harvested.

Test plan:
0. Setup
vi /etc/koha/sites/kohadev/oai.conf
format:
  marcxml:
    metadataPrefix: marcxml
    metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
    schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
    include_items: 1

Set sysprefs:
OAI-PMH: Enable
OAI-PMH:ConfFile: /etc/koha/sites/kohadev/oai.conf
OAI-PMH:AutoUpdateSets: Enable
OAI-PMH:AutoUpdateSetsEmbedItemData: Enabled

OpacHiddenItems:
barcode: [3999900000001]
OpacHiddenItemsHidesRecord: Hide

Adminsitration->OAI set configuration->New set
Choose anything for setSpec and setName
On new set: Actrion->define mappings
Field: 952
Subfield: p
Operator: is equal to
Value: 3999900000001

perl misc/migration_tools/build_oai_sets.pl -r -v -i

1. koha-plack --restart kohadev
2. Go to http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml
3. Confirm KOHA-OAI-TEST:1 is marked as deleted and not metadata visible
4. Go to http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListIdentifiers&metadataPrefix=marcxml
5. Confirm KOHA-OAI-TEST:1 is marked as deleted
6. Go to http://localhost:8080/cgi-bin/koha/oai.pl?verb=GetRecord&metadataPrefix=marcxml&identifier=KOHA-OAI-TEST:1
7. Confirm record is marked as deleted and no metadata visible
8. View Sets and confirm the record appears in the set but as deleted record
9. Change OpacHiddenItemsHidesRecord syspref to "Don't hide" and repeat above steps
10. Confirm that the record metadata is now visible and the record is not marked as deleted

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37524: (QA follow-up) Tidy affected block in checkouts.js
Paul Derscheid [Fri, 13 Sep 2024 15:31:02 +0000 (15:31 +0000)]
Bug 37524: (QA follow-up) Tidy affected block in checkouts.js

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37524: Do not attempt to renew check outs if there is nothing to renew
Emmi Takkinen [Tue, 30 Jul 2024 12:43:08 +0000 (15:43 +0300)]
Bug 37524: Do not attempt to renew check outs if there is nothing to renew

If patrons loans are not renewable and one hits "Renew all"
button in patrons "Check out" page, Koha is redirected to
"Export data" tool. This happens because when there is
nothing to renew call to function renew_all produces error:
"Uncaught TypeError: renew_all(...) is undefined". This
patch prevents call to this function and adds alert to
inform user that there are no items to be renewed.

To reproduce:
1. Find patron with check outs which renewals count has hit
the maximum limit of renewals.
2. Press "Renew all" button.
=> Koha is redirected to "Export data" tool.
3. Apply this patch.
4. Try to renew check outs again.
=> Alert pop up is displayed.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37587: (QA follow-up) Tidy reserve/placerequest.pl
Paul Derscheid [Fri, 13 Sep 2024 15:48:34 +0000 (15:48 +0000)]
Bug 37587: (QA follow-up) Tidy reserve/placerequest.pl

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37587: Fix priority of multiple item-level holds
Emily Lamancusa [Tue, 6 Aug 2024 20:12:51 +0000 (16:12 -0400)]
Bug 37587: Fix priority of multiple item-level holds

The rank parameter is passed per biblio record, not per item. When
placing multiple item-level holds on one bib record, only $rank[0] is
defined.

To test:
1. System preference and circulation rule setup
    i. Set the system preference DisplayMultiItemHolds to Enable
    ii. Edit the default circulation rule to allow 5 holds per record
2. Find or create a bib with 4 or more items
3. Place several bib-level holds
4. Place 4 or more item-level holds at once on that same record
    i. Search for a patron to place the holds for (not one of the
       patrons you used in step 3)
    ii. Select "Hold a specific item"
    iii. Check the checkboxes for 4 or more items
    iv. Click Place hold
--> Note that one of the new item-level holds is at the end of the list
    as it should be, but the rest are out of order
5. Cancel the item-level holds from step 4
6. Apply patch and restart_all
7. Repeat step 4
--> All the new item-level holds are now at the end of the list

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37913: Remove more unreachable code in aqcontract.tt
Phil Ringnalda [Thu, 12 Sep 2024 22:07:50 +0000 (15:07 -0700)]
Bug 37913: Remove more unreachable code in aqcontract.tt

When you successfully delete an acquisitions contract, you are redirected to
the page with the vendor details, which shows contracts for that vendor, which
shows you that the contract you deleted was deleted.

The aqcontract.tt template has a block in [% IF ( delete_confirmed ) %] (which
is never set) that thinks it will show you a '<h1>Contract deleted</h1>' and
make you click an OK button. That block has never been shown, but the button
is in a form which POSTs without an 'op' param, which is now forbidden by the
CSRF code, and will be caught by a test once bug 37728 updates the test.

There's nothing visible to test, so the test plan just makes sure nothing
blows up and you can still delete a contract.

1. Nothing will change, so start with the patch applied
2. Acquistions - click the Search button to search for vendors
3. New -> Contract
4. Give it a name, a start date, and an end date, and Save
5. In the list of contracts for My Vendor, click the Delete button for
   the contract you created
6. In the confirmation page asking if you wanted to delete, click 'Yes,
   delete contract'
7. Note that you are at acqui/supplier.pl?booksellerid=1, the details page
   for the vendor, and your contract isn't listed at the bottom of the page,
   and especially that you weren't shown a page that just said "Contract
   deleted."

Sponsored-by: Chetco Community Public Library
Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 days agoBug 37916: Convert plugin install button to form
Martin Renvoize [Fri, 13 Sep 2024 12:59:08 +0000 (13:59 +0100)]
Bug 37916: Convert plugin install button to form

This patch takes the usual approach of converting linked buttons to form
with the csrf token included.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37757: (follow-up) Adjust existing tests
Tomas Cohen Arazi [Fri, 13 Sep 2024 19:14:54 +0000 (16:14 -0300)]
Bug 37757: (follow-up) Adjust existing tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 days agoBug 37818: (follow-up) Remove failing XXX tests from Installer.t
Katrin Fischer [Fri, 13 Sep 2024 14:16:41 +0000 (14:16 +0000)]
Bug 37818: (follow-up) Remove failing XXX tests from Installer.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37917: Add some wait time to RecordSources_spec.ts for the intercepted request...
Tomas Cohen Arazi [Fri, 13 Sep 2024 13:49:29 +0000 (10:49 -0300)]
Bug 37917: Add some wait time to RecordSources_spec.ts for the intercepted request responses

This patch introduces the `cy.wait(500)` we use in several other Cypress
tests when an (intercepted) API request is made. This is very important
when tables are being rendered as DataTables is particularly bulky and
prone to take longer to finish loading the components if the CPU load is
a bit high.

I wasn't able to reproduce the problem very often, but you can test
yourself:

1. Run:
   $ ktd --shell
  k$ run_cypress --spec t/cypress/integration/Admin/RecordSources_spec.ts
2. Run it many times
=> FAIL: At some point it fails, you can overload your computer to try
3. Apply the patch
4. Repeat 2
=> SUCCESS: No failures :-D
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 36595: (follow-up) Conditionals and consistency
Martin Renvoize [Fri, 13 Sep 2024 13:39:32 +0000 (14:39 +0100)]
Bug 36595: (follow-up) Conditionals and consistency

Added a conditional to only display email if there's actualy a
notice_email_address present.

Updated the address used to match the address displayed.

Not sure how to resolve the translation issue.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Removed "Hold item:" from subject line as it would not translate.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 35402: Fix cypress test csrf.ts
Katrin Fischer [Fri, 13 Sep 2024 13:25:15 +0000 (13:25 +0000)]
Bug 35402: Fix cypress test csrf.ts

The tests were failing because of the class having changed from
message to alert.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37636: Remove sort of pending_checkouts by timestamp
Nick Clemens [Tue, 20 Aug 2024 13:25:26 +0000 (13:25 +0000)]
Bug 37636: Remove sort of pending_checkouts by timestamp

Renewals or automatic renewal attempts can change the timestamp of an issue and cause a sort
on this field to functionally randomize the order of checkouts returned.

Prior to bug 19935 the GetPendingCheckouts routine returned items in issuedate order.

Removing the sort on timestamp will return the previous behaviour and provide a more predictable sorting

To test:
1 - Checkout some items to a patron
2 - Print a checkout slip - items are in the order they were checked out
3 - Renew an item,print the slip again it is now at the top of the list
4 - Apply patch, restart_all
5 - Print slip again - the items are now ordered in the order they were checked out.

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>
5 days agoBug 37636: Unit test
Nick Clemens [Thu, 22 Aug 2024 12:06:13 +0000 (12:06 +0000)]
Bug 37636: Unit test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37797: Change cancel button to a link styled as a button
Emily Lamancusa [Fri, 30 Aug 2024 20:50:36 +0000 (16:50 -0400)]
Bug 37797: Change cancel button to a link styled as a button

On the confirmation page for deleting a budget, change "Do not delete"
from a form submission to a link (styled to look like a button) in order
to avoid errors from POSTing with no op.

To test:
1. Go to Acquisitions > Budgets
2. Create a test budget
3. Attempt to delete the test budget
4. On the confirmation page, click "No, don't delete"
--> An error appears saying that the form was POSTed with no op!
5. Apply patch
6. Repeat steps 3-4
--> You are linked back to the Budgets page. The budget was not deleted.

Signed-off-by: Chloe Zermatten <chloe.zermatten@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37757: DBRev 24.06.00.028
Katrin Fischer [Fri, 13 Sep 2024 12:31:04 +0000 (12:31 +0000)]
Bug 37757: DBRev 24.06.00.028

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37757: (follow-up) Warn on bad values and survive
Tomas Cohen Arazi [Wed, 28 Aug 2024 18:43:53 +0000 (15:43 -0300)]
Bug 37757: (follow-up) Warn on bad values and survive

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>
5 days agoBug 37757: Make notice_email_address() handle EmailFieldPrimary values more robustly
Tomas Cohen Arazi [Wed, 28 Aug 2024 18:01:37 +0000 (15:01 -0300)]
Bug 37757: Make notice_email_address() handle EmailFieldPrimary values more robustly

This patchset makes:

* The EmailFieldPrimary value 'OFF' be replaced by an empty string
* Koha::Patron->notice_email_address() handle the empty case more
  gracefully

To test:
1. On main, manually set the EmailFieldPrimary syspref to empty
   $ ktd --shell
  k$ koha-mysql kohadev
   > UPDATE systempreferences SET value='' WHERE variable='EmailFieldPrimary';
2. Enable `AutoEmailNewUser`
3. Create a new user
=> FAIL: Koha explodes like:
```
The method Koha::Patron-> is not covered by tests!

Trace begun at /kohadevbox/koha/Koha/Object.pm line 992
Koha::Object::AUTOLOAD('Koha::Patron=HASH(0xaaaae37ac550)') called at /kohadevbox/koha/Koha/Patron.pm line 1662
Koha::Patron::notice_email_address('Koha::Patron=HASH(0xaaaae37ac550)') called at /kohadevbox/koha/members/memberentry.pl line 448
...

4. Apply this patches
5. Run:
  k$ updatedatabase
=> SUCCESS: Update succeeds
6. Restart all and retry creating a patron
=> SUCCESS: It worked!
7. Sign off :-D

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>
5 days agoBug 37757: Update EmailFieldPrimary value
Tomas Cohen Arazi [Wed, 28 Aug 2024 17:57:18 +0000 (14:57 -0300)]
Bug 37757: Update EmailFieldPrimary value

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>
5 days agoBug 37757: Unit tests
Tomas Cohen Arazi [Wed, 28 Aug 2024 17:56:44 +0000 (14:56 -0300)]
Bug 37757: Unit tests

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>
5 days agoUpdate contributor list with some new contributors
Katrin Fischer [Fri, 13 Sep 2024 12:11:48 +0000 (12:11 +0000)]
Update contributor list with some new contributors

Final stats update will be done before 24.11 release.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37873: Unable to delete user from routing list or preview/print routing list...
CJ Lynce [Tue, 10 Sep 2024 18:12:04 +0000 (18:12 +0000)]
Bug 37873: Unable to delete user from routing list or preview/print routing list slip

This patch restores the ability to delete a recipient from a serials routing list.
It also fixes the slip preview when using the "Save and preview slip", and removes
the koha staff intranet head from the slip when using 'Print list' from the
Serial collection information screen.

To test:
1) Login to the staff client.
2) Open the Serials module.
3) + New subscription to add a new serial.
4) Create a new subscription.
a) Search for a record (I searched for 'dog') and chose that record.
b) Under 'When receiving this serial', select 'Create an item record'
c) Under the 'Item type' dropdown, select anything.
d) Click Next -> (and confirm the popup).
e) Select any 'First issue date'.
f) Select any 'Frequency'.
g) Enter a number larger than 5 in the 'Subscription length'.
h) Select any 'Subscription start date'.
i) Select your favorite numbering pattern.
j) Verify your prediction pattern using "Test prediction pattern".
k) Click "Save subscription".
5) On the 'Subscription details' screen, click "Receive".
6) Under the first volume, click "Add item" then "Save".
7) Repeat step 6 to receive one more issue.
8) On the 'Serial collection information' page click "+ Create routing list"
9) Click "+ Add recipients".
10) Search for and add several recipients.
11) Click "Close" to exit the 'Add recipients' page.
12) Click "Delete" next to any recipient.
*Note that the recipient is not deleted.
13) Click "Save" on the 'Modify routing list for ...' page.
14) Click "Save and preview routing slip" button.
*Note you are redirected to the Subscription details page, but no routing
slip preview appears.
15) Click "Serial collection" from the left-side menu.
16) Click "Print list" on either of the issues you previously received.
*Note the routing slip includes the staff intranet header, menu, etc.

17) Apply patch.
18) Return to the 'Serial collection information' screen for your subscription.
19) Click "Edit routing list".
20) Repeat steps 12-16 and verify the issues are fixed.
-"Delete" button works to remove a recipient from a list.
-"Save and preview routing list" button pops-up a preview before redirecting.
-"Print list" pops-up a vanilla routing list to print.

Sponsored-by: Westlake Porter Public Library
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 27490: DBRev 24.06.00.027
Katrin Fischer [Fri, 13 Sep 2024 11:48:42 +0000 (11:48 +0000)]
Bug 27490: DBRev 24.06.00.027

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 27490: (follow-up) Fix custom installer files
Nicolas Hunstein [Tue, 3 Sep 2024 09:34:57 +0000 (09:34 +0000)]
Bug 27490: (follow-up) Fix custom installer files

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 27490: More instances of changing language syspref to StaffInterfaceLanguages
Aleisha Amohia [Mon, 29 Jul 2024 02:26:11 +0000 (02:26 +0000)]
Bug 27490: More instances of changing language syspref to StaffInterfaceLanguages

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nicolas Hunstein <nicolas.hunstein@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 27490: Update systempreference 'language' to 'StaffInterfaceLanguages'
Doris Tam [Thu, 25 Jul 2024 23:48:30 +0000 (23:48 +0000)]
Bug 27490: Update systempreference 'language' to 'StaffInterfaceLanguages'

Test plan

1. Go to the staff client
2. Go to administration
3. Search systempreferences for 'StaffInterfaceLanguages'
4. Ensure there is a systempreference variable matching 'StaffInterfaceLanguages'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nicolas Hunstein <nicolas.hunstein@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 37881: (QA follow-up) Correction to TT filters used
Martin Renvoize [Fri, 13 Sep 2024 10:52:46 +0000 (11:52 +0100)]
Bug 37881: (QA follow-up) Correction to TT filters used

We were missing a couple of TT filters and we were using a `$raw` where it
was more appropriate to use `html`.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 37881: Fix the delete button for guarantor
Baptiste Wojtkowski [Wed, 11 Sep 2024 11:22:34 +0000 (13:22 +0200)]
Bug 37881: Fix the delete button for guarantor

This patch fixes issue introduced by BZ32530

Test Plan (on main):
1 - Edit a patron
2 - Do not change anything and submit -> you get an error
3 - Apply both patches
4 - Repeat 1&2 -> everything works fine
5 - Try and delete the guarantor -> it will be deleted

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>
6 days agoBug 37881: Editing patron with guarantor won't crash
Baptiste Wojtkowski [Wed, 11 Sep 2024 09:54:38 +0000 (11:54 +0200)]
Bug 37881: Editing patron with guarantor won't crash

This patch fixes issue introduced by BZ32530

Test Plan (on main):
1 - Edit a patron
2 - Do not change anything and submit -> you get an error
3 - Apply both patches
4 - Repeat 1&2 -> everything works fine
5 - Try and delete the guarantor -> it will be deleted

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>