Commit graph

46572 commits

Author SHA1 Message Date
1bbc53f65f
Bug 30335: (follow-up) Ensure existing users remain permitted
This patch updates the database update to ensure users with the
'remaining_permissions' subpermission of 'updatecharges' continue to be
able to manually invoice and manually credit borrower accounts after the
patch is applied.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-31 08:41:01 -03:00
2954fbc9cc
Bug 30335: (follow-up) Bind new permissions to pages and tabs
This patch binds the new permissions added in the previous patch to the
tab display on the borrower account page.

Test plan
1) Apply the previous patch and run the database update
2) Configure a user without the new permissions
3) Confirm the 'Create manual invoice' and 'Create manual credit' tabs
   no longer appear under the 'Accounting' area when logged in as the
   above user.
4) Confirm that you cannot manually navigate to /members/mancredit.pl or
   /members/maninvoice.pl when logged in as the above user.
5) Confirm that users with the above permissions are still able to see
   the tabs and take actions on them.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-31 08:41:01 -03:00
aea63af24a
Bug 30335: (follow-up) Add permissions for manual accounts options
This patch adds two new sub-permissions, `manual_credit` and
`manual_invoice` to allow/prevent staff the ability to add manual
invoices and credits to a patrons account.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-31 08:41:01 -03:00
8cac8e5bbe
Bug 30335: Add classes to invoice/credit tabs on patron accouting pages
To test:
1. Apply patch and go to the patron accounting page.
2. Notice the class names for each list element on the page.
3. You can use the following CSS to try hiding each of the tabs:

.transactions { display: none; }
.makepayment { display: none; }
.manualinvoice { display: none; }
.manualcredit { display: none; }

Signed-off-by: Rachael Laritz <rachael@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-31 08:41:01 -03:00
Caroline Cyr La Rose
b715ea28b1
Bug 31489: Typo in EnableExpiredPasswordReset description
This patch corrects a typo in the EnableExpiredPasswordReset system preference description.

To test:
1) Apply patch
2) Go to Administration > Global system preferences
3) Search for EnableExpiredPasswordReset
4) Read the description and make sure there are no errors.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-31 08:34:55 -03:00
29ad53a682
Bug 31379: Change results per page text for default
Since Bug 14715, one can change number of results per page.
The actual text in combobox for default value is : "Library default:
20"

This text is hard to translate correctly.
For example french translation use "site par défaut" wrongly meaning
"default library".

I propose to simply use "20 (defaut)".

Test plan :
1) Go to system preferences and set both 'numSearchResultsDropdown' and
   'OPACnumSearchResultsDropdown' to 'Show'
2) Do a catalogue search in the intranet using a search term that will
   bring lots of results
3) Look at restults per page combobox
4) Same for OPAC

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>
2022-08-26 16:55:58 -03:00
3a5fb22ad8
Bug 31473: Fix fragile test about bad OpacHiddenItems conf
There's been a behavior change in recent MariaDB that made some cases
deal with truncated data in DOUBLE context instead of DECIMAL.

Probably this:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-27380

This made the affected test fail consistently on those versions.

This trick for checking OpacHiddenItems is correct (as introduced on bug
28125 doesn't really make use of the warning, just prints it in
about.pl) so one option was to just check for a warning.

I decided to keep the test, but add the optional DECIMAL|DOUBLE check on
the qr. This way other eventual changes will make it fail and serve as a
warning in case something more relevant changes.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 16:49:30 -03:00
73c3c5d2f1
Bug 31112: (QA follow-up) Reduce database queries
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:59:24 -03:00
Joonas Kylmälä
507edad61f
Bug 31112: (follow-up) Don't return "on_reserve" when there are 0 possible holds
It's possible that there could be 0 possible reserves, for example
when the hold has already been filled, thus the check would fail as
the item count can never be less than 0.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:59:20 -03:00
Joonas Kylmälä
8ad9926301
Bug 31112: (follow-up) Bring back the check for non-priority holds
Before the changes from bug 31112 when CheckReserves returned a
non-priority hold we didn't return "on_reserve" status but checked in
addition to that whether there are any priority holds and if there
were, only then we returned the "on_reserve" error.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:59:16 -03:00
2eb053603d
Bug 31112: (QA follow-up) Fetch patrons with reserves
Previously we fetched all in a single call using biblionumbers

Fetching each individually could be a performance hit on systems
with large numbers of holds

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:59:12 -03:00
4676ce1a03
Bug 31112: (QA follow-up) Restore check to avoid extra processing
We now count all holds for all patrons, we can still eject if we have more
holds than we do items

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:59:07 -03:00
Joonas Kylmälä
15f622ecc1
Bug 31112: CanBookBeRenewed: take into account patrons with more than 1 hold to a biblio
If a single patron had more than 1 hold to a biblio and there was only one
available item we allowed incorrectly renewing the checkout when
AllowRenewalIfOtherItemsAvailable was set to "Allow". This
changes CanBookBeRenewed so that it makes sure all the holds are
filled and not just one per patron.

To test:
 1) prove t/db_dependent/Circulation.t
 2) (Optional, as unit test is provided)
    - Set AllowRenewalIfOtherItemsAvailable = Allow
    - Create biblio with three items
    - Checkout one item to patron A
    - Add two biblio-level holds for patron B
    - Try to renew patron A's checkout with and without this patch.
    - Notice that without this patch the renewal succeeds even though we
      one unfilled hold left. After applying the patch the renewal should
      fail.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:59:03 -03:00
Joonas Kylmälä
8ba1a9a534
Bug 31112: Remove unnecessary if-clause
To test:
 1) Please check manually that the logic stays the same, use git's -w command line parameter to
    ignore whitespace changes in the diff output.
 2) prove t/db_dependent/Circulation.t

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:58:58 -03:00
07e5f13d90
Bug 20262: (QA follow-up) Update unit tests for changes to payin_amount
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:55:50 -03:00
11c05e3d81
Bug 20262: (QA follow-up) Fix spelling errors
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:55:46 -03:00
Stefan Berndtsson
e166f7612f
Bug 20262: Add ability to refund lost item fees without creating credits
Some libraries handle refunding of paid lost fees at a financial office and not within Koha. To facilitate this, it would be good for Koha to have the option to not generate lost returned credits by skipping fully paid lost items, and only refunding the outstanding balance on partially paid lost fees.

Test Plan:
1) Apply this patch
2) Set your lost item refund on return policies to 'Only if unpaid'
3) Mark an item lost, charging the lost fee
4) Return the item, a full refund should occur
5) Mark another item lost, charging the lost fee
6) Make a partial payment on this lost fee
7) Return the item
8) The remaining balance of that fee should be 0, but the patron should
   not recieve a credit for the already paid balance
8) Mark another item lost, charging the lost fee
9) Fully pay the lost fee
10) Return the item. The paid lost fee should be unaffected.
11) Run tests in t/db_dependent/Circulation.t

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:55:41 -03:00
af00fbd22b
Bug 21366: Add --reload option to koha-plack help/manual
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:52:06 -03:00
e0f1110389
Bug 21366: Add koha-plack --reload to gracefully restart Plack/Starman
This patch adds a "--reload" option to koha-plack, which allows
a sysadmin to gracefully restart Koha.

This is very useful when installing Koha plugins or deploying a hot fix
where you need to change code but don't want to interrupt anyone's
usage of Koha.

0. Apply patch
1. cp /usr/sbin/koha-plack /usr/sbin/koha-plack.bak
2. cp debian/scripts/koha-plack /usr/sbin/koha-plack
3. ps -efww | grep "starman"
4. Now at roughly the same time do the following two actions:
    4a. Go to http://localhost:8081/cgi-bin/koha/about.pl
    4b. koha-plack --reload kohadev
5. Note that the web request completes successfully
6. ps -efww | grep "starman"
7. Note that the "starman master" process stays alive, but the "starman worker" processes have been restarted

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:52:02 -03:00
89e890e7ce
Bug 24295: (QA follow-up) Fix rebase issue
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:48:27 -03:00
9316c123aa
Bug 24295: Finally remove GetTransfers from C4/Circulation
This patch handles the final removal of GetTransfers from
C4::Circulation.

Test plan
1/ Check that there is no mention of the GetTransfers method codebase
wide now
2/ Run the circulation and transfers tests and check nothing fails..
perhaps even run the full test suit in k-t-d
3/ Signoff

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:42:56 -03:00
e4d5a9e2ad
Bug 24295: Remove GetTransfers from circ/transferstoreceive.pl
Just drop the import of GetTransfers from circ/transferstoreceive.pl is
it's never actually used.

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:42:52 -03:00
f6c767677f
Bug 24295: Remove GetTransfers from C4/Search.pm
This patch removes the final use of GetTransfers from C4::Search.

Test plan
1/ Perform a search that will include results for some items that have
transfers of various states assigned to them
2/ Check the results match expectations (before and after applying the
patch should look the same)
3/ Signoff

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:42:47 -03:00
68f54437a3
Bug 24295: Remove GetTransfers call from C4/HoldsQueue.pm
This patch removes the GetTransfers call from
GetItemsAvailableToFillHoldRequestsForBib instead replacing it with an
inline JOIN in the initial query.

Test plan
1/ Run the holds queue
2/ Check the results
3/ Put one of the items in the holds queue into transit
4/ Run the holds queue again
5/ Check that the results do not contain the item that is in transit
6/ Apply the patch
7/ Run the holds queue again
8/ Check that the results still do not contain the item that is in
transit

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:42:43 -03:00
aa8a9f660c
Bug 24295: Replace mock in t/db_dependent/Circulation/transferbook.t
Replace the call to GetTransfers with the get_transfer method in
Koha::Item in transferbook.t

Test plan
1/ Run t/db_dependent/Circulation/transferbook.t
2/ Confirm it passes
3/ Apply patch
4/ Repeat steps 1-2

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:42:39 -03:00
02670978f3
Bug 24295: Replace mock in t/db_dependent/Search.t
Replace the mock of GetTransfers in this test with a mock of transfers
data

Test plan
1/ Run t/db_dependent/Search.t
2/ Confirm it passes
3/ Apply patch
4/ Repeat steps 1-2

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:42:35 -03:00
3c6fb4edda
Bug 24295: Remove GetTransfers from svc/holds
This patch replaces the call to C4::GetTransfers in svc/holds with a
call to the get_transfer method in the Koha::Item object.

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:42:31 -03:00
8dab736b76
Bug 24295: Remove GetTransfers from detail.pl
This patch replaces the call to GetTransfers in detail.pl with the
get_transfer method available from the Koha::Item object

Test plan
1/ Trigger the transfer of the item
2/ Check the detail page for the display of the current transfer
   status
3/ Apply patch
4/ Repeat step 2

JK: Remove unneeded string formatting for transfertwhen as it's done
    on the template toolkit side already with $KohaDates

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:42:27 -03:00
62512dc5d6
Bug 24295: Remove GetTransfers from request.pl
This patch replaces the call to GetTransfers in reserve.pl with the
get_transfer method available from the Koha::Item object

Test plan
1/ Place a reserve on an item at a different branch
2/ Trigger the transfer of the item
3/ Check the reserves page for the display of the current transfer
   status
4/ Apply patch
5/ Repeat step 3

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:42:22 -03:00
e6334cc360
Bug 24295: Remove GetTransfers from opac-basket.pl
This patch replaces the call to GetTransfers in opac-basket with the
get_transfer method available from the Koha::Item object

Test plan
1/ Trigger the transfer of the item
2/ Check the opac-basket page for the display of the current transfer
   status
3/ Apply patch
4/ Repeat step 2

JK: Remove unneeded string formatting for transfertwhen as it's done
    on the template toolkit side already with $KohaDates. Add missing
    Koha::Items module import.

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:42:18 -03:00
245da0f198
Bug 24295: Remove GetTransfers from opac-reserve.pl
This patch replaces the call to GetTransfers in opac-reserve with the
get_transfer method available from the Koha::Item object

Test plan
1/ Place a reserve on an item at a different branch
2/ Trigger the transfer of the item
3/ Check the opac-reserves page for the display of the current transfer
status
4/ Apply patch
5/ Repeat step 3

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:42:14 -03:00
7b31a35824
Bug 24295: Remove GetTransfer from Z3950Responder
Replace the GetTrasfer call in Z3950Responder/Session.pm with a call to
the Koha::Item method 'get_transfer'.

Test plan
1/ Configure your system to use the Z3950 responder
2/ Trigger an item transfer for an item
3/ Search for the item via Z3950 and varify the transfer status is set
4/ Apply the patch
5/ Repeat step 3

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:42:07 -03:00
4a6567274d
Bug 31033: Explicitly define max child processes for SIP server
By default, the SIP server appears to only use 1 child process for
responding to SIP connections.

This change makes this explicit in the configuration, which should
make it so that people who need more than 1 simultaneous SIP connection
can know to just increase the value for the "max_servers" parameter
in the SIPconfig.xml file.

Test plan:
1. Add "max_servers='1'" to your SIP configuration file
2. koha-sip --restart kohadev
3. Open 3 terminals
4. Run "telnet localhost 6001" on 2 terminals
5. On the 3rd terminal, run the following:
ss -l -n -t
ps -efww | grep "sip"
6. Note that there are 2 processes called
kohadev-koha-sip: perl /kohadevbox/koha/C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/SIPconfig.xml
One of these processes is the parent of the other
7. The Recv-Q in the "ss" output should show 1
(This means that 1 of your telnet connections is in the server's TCP backlog)
8. Celebrate as the configuration works as expected

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:53:36 -03:00
ad080e7e95
Bug 23681: DBRev 22.06.00.037
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:50:41 -03:00
d9e30bae83
Bug 23681: Compiled CSS
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:50:38 -03:00
6ce4d25bd3
Bug 23681: Move to ::Patron::Restriction::Type(s)
This patch moves the new classes under ::Patron::Restriction:: and
enhances the Unit tests for those classes.

NOTE: We should drop keyed_on_code as part of bug 31095
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:50:35 -03:00
cdb0a7160f
Bug 23681: (QA follow-up) New schema files
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:50:33 -03:00
a027202717
Bug 23681: (QA follow-up) debarment_types => restriction_types
The code moved from *debarments* to *restrictions* but the table didn't.
This patch just renames things accordingly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:41:07 -03:00
34f5ae5934
Bug 23681: (QA follow-up) Fix memberentry page display
We were missing some changes to the restriction types dropdown handling
in the memberentry template.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:41:07 -03:00
060f528501
Bug 23681: (QA follow-up) Remove spacing and add question mark
This patch removes the superflous whitespace around the restriction
descriptions and also adds the missing question mark into the delete
question.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:41:06 -03:00
3fb2875df2
Bug 23681: (QA follow-up) Add patron restrictions to admin menu
This patch adds the patron restrictions page to the admin menu that
appears to the left on all administration pages.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:41:06 -03:00
2218b4469b
Bug 23681: (follow-up) Mark fields at booleans
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:41:06 -03:00
3b1c271f78
Bug 23681: (QA follow-up) Proper handling of default option
This patch removes the 'can_be_added_manually' flag. Only non-system
restriction types can be added manually, so we exclude is_system instead
of having two flags. (And we set the 'Manual' that's added at install
time to default but not system).

We then add proper handling for setting the default manual restriction
type in the management page and set the dropdown list to use that value
by default.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:41:06 -03:00
a50553ff15
Bug 23681: (QA follow-up) Merge update files
This patch merges the three atomic update files into one and also
adds a check for foreing key existance to make the update idempotent.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:41:06 -03:00
6d62f77e95
Bug 23681: (QA follow-up) Restore customisablity of description
This patch restores the customisability of description for system restriction
types. Translatability is not affected as you can translate the defaults
via template translation and assuming the end users leave their
descriptions at the default, the translations will be picked.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:41:05 -03:00
4595a28b29
Bug 23681: (QA follow-up) Move preference again
This patch removes the new PatronRestrictionTypes preference from the
accounting area in preference to creating a new group for 'Patron
restriction' related preferences in the circulation preferences tab.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:41:05 -03:00
Emmi Takkinen
7cc2560d2f
Bug 23681: DBIC Schema
To be able to delete and pass tests we need to declare
koha_object[s]_class to DebarmentType.pm. Otherwise
following error is raised:

"Can't locate object method "_new_from_dbic" via package
"Koha::DebarmentType" (perhaps you forgot to load "Koha::DebarmentType"?)
at /kohadevbox/koha/Koha/Object.pm line 237"

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:41:05 -03:00
Emmi Takkinen
20349d8737
Bug 23681: Fix QA issues
This patch fixes following QA issues:
- convert intaller files as .yml
- change column name readonly as is_system
- change column name is_system as default_value
- add column can_be_added_manually (testplan for this below)
- move syspref "PatronRestrictionTypes" to "Accounting > Features" tab
- tweak page title
- tweak tests to apply these changes

Also atomicupdate files have been updated. Issues with delete and tests
is fixed with adding additional schema change file.

To test:
1) Add new restriction type and make it manual.
2) Navigate to patron details page.
3) Add new restriction to patron.
=> Only selectable restriction should be the one
you just created.

Also prove t/db_dependent/RestrictionTypes.t.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:41:05 -03:00
eb28de78fe
Bug 23681: (QA follow-up) Rename columns
Renames ronly to readonly and dflt to is_system.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:41:04 -03:00
67b03d9374
Bug 23681: (QA follow-up) Fix preferences
Add the missing `.` and switch from `yes/no` to `1/0`.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:41:04 -03:00