Commit graph

50882 commits

Author SHA1 Message Date
c30dd8d6b0
Bug 34064: Remove no_batch_alters option
This change removes the no_batch_alters option.

When working with real world databases, you really want to use batch
alters to group together changes. Otherwise, the output becomes
too overwhelming/unwieldy.

On real world databases, I'm noticing big discrepancies, although
I think most of the time this is a difference in the collation
at the column level.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 10:54:04 -03:00
5d3bfc5d5b
Bug 34064: Add an audit script to compare database with kohastructure.sql
This script can take a connected database handle and compare that database
schema against kohastructure.sql to see what changes the database would
need in order to match kohastructure.sql

NOTE: It uses SQL::Translation::Diff, which is installed with DBIx::Class.

WARNING: The diff doesn't seem to compare comments, so that difference
won't appear in the output. If we wanted, we could easily enhance the
audit_database.pl script to also compare comments.

WARNING: The output is a proposed series of SQL commands. While they
are useful to review, they won't always duplicate the changes done
by updatedatabase.pl, so it's important to carefully analyze the output.
The key purpose of this audit script is to just highlight the differences
between the two.

Test plan:
0. Apply patch
1. vi ./installer/data/mysql/kohastructure.sql
2. Comment out some columns, change NULL status, or whatever you like
3. perl misc/maintenance/audit_database.pl \
    --filename /kohadevbox/koha/installer/data/mysql/kohastructure.sql
4. Note that the output includes SQL commands to change the database
to match the new kohastructure.sql

5a. Try using koha-foreach and note that the database name appears above
the database comparison
5b. koha-foreach "perl misc/maintenance/audit_database.pl \
    --filename /kohadevbox/koha/installer/data/mysql/kohastructure.sql"

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 10:54:03 -03:00
51e67a2642
Bug 34075: DBRev 23.06.00.033
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 10:54:03 -03:00
4f9fa72828
Bug 34075: Improve JS code
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 10:54:02 -03:00
6247cd9b5e
Bug 34075: (follow-up) Fixes for QA tool errors
- Added missing filter to template variable
- Correct spelling in atomicupdate

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 10:54:01 -03:00
537132da7b
Bug 34075: Add DefaultAuthorityTab system preference
This patch adds a new system preference, DefaultAuthorityTab.
When set, this will choose the default display on the authorities details
page.

To test:
1 - Apply patch, update database
2 - View an authority detail
3 - You should default to the 0XX or first tab
4 - Set DefaultAuthorityTab to a number that there is no tab for in your authority
5 - Reload and verify details page loads the first tba
6 - Set DefaultAuthorityTab to 1XX or another tab that exists in your record
7 - Reload the details and confirm the correct tab is selected

Signed-off-by: Sam Lau <samalau@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 10:54:01 -03:00
Katrin Fischer
f09c5e045e
Bug 31731: (QA follow-up) Add pull down to DefaultLongOverdueLostValue and DefaultLongOverdueChargeValue preferences
Adds LOST pull downs to 2 more preferences.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 10:54:00 -03:00
0f3a7074cb
Bug 31731: Offer user a dropdown of authorized values instead of a text field in preferences
This patch updates the system preferences interface so that preferences
which ask for a single authorized value can offer a dropdown menu of
choices instead of a text field.

The patch also updates a few existing preferences to use the new
feature: BundleLostValue, BundleNotLoanValue, and
ClaimReturnedLostValue.

To test, apply the patch and restart services.

- Go to Administration -> System preferences and search for "authorized
  value."
- The search results should include the entries for BundleLostValue,
  BundleNotLoanValue, and ClaimReturnedLostValue.
- Confirm that the dropdowns show the correct authorized value category
  (LOST or NOT_LOAN)
- Confirm that setting or unsetting each of the preferences works
  correctly.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 10:54:00 -03:00
538e55afef
Bug 29033: Add C4::Context->multivalue_preference
I've seen several places in which a syspref is retrieved and then
splitted using split and the fact they are pipe-separated strings.

It seems it would be simple (and handy) to add a method to do that.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/Context.t
=> SUCCESS: Tests pass, a pipe-separated syspref is correctly retrieved
as an arrayref.
3. Sign off :-D

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

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 10:53:59 -03:00
7730390138
Bug 25560: DBRev 23.06.00.032
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 10:53:58 -03:00
9705aaec77
Bug 25560: Unit tests
Test plan:
1. Run tests
sudo koha-shell <instancename>
prove t/db_dependent/Circulation/issue.t

Sponsored-By: Waikato Institute of Technology, NZ

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 10:53:58 -03:00
54b52815f6
Bug 25560: Define item-type specific rules in UpdateNotForLoanStatusOnCheckin
This enhancement respects the 'item-level_itypes' syspref, so will look
at the authoritative item type when determining to update the notforloan
status.

Test plan:
1. Set -1 to 'Ordered', and 1 to 'Not for Loan' in Administration > Authorised values > NOT_LOAN

2. Make sure the 'item-level_itypes' syspref is set to 'specific item'

3. Add the following rules in UpdateNotForLoanStatusOnCheckin system
preference:
-1: 0

4. Apply patch & update database
cd installer/data/mysql
sudo koha-shell <instancename>
./updatedatabase.pl

5. Restart plack

6. Observe the UpdateNotForLoanStatusOnCheckin syspref values have
updated to the following format:
_ALL_:
 -1: 0

7. Check in an 'Ordered' item of any item type and confirm it is changed
to 'Available for loan' (NOT_LOAN=0)

8. Reset the UpdateNotForLoanStatusOnCheckin syspref to:
_ALL_:
 -1: 0

CD:
 -1: 2
 2: 0

9. Check-in an 'ordered' (NOT_LOAN=-1) CD item (item level itype='CD') and observe the item's notforloan status updates to 'Staff collection' (NOT_LOAN=2). This is because the _ALL_ rule does not override all other rules.

10. Check-in a 'Staff collection' (NOT_LOAN=2) CD item (item level itype='CD') and
observe the item's notforloan status updates to 'Available for loan'
(NOT_LOAN=0)

11. Check-in a 'Staff collection' (NOT_LOAN=2) DVD item (item level itype='DVD') and observe
the items notforloan status does not change

12. Check-in an 'ordered' (NOT_LOAN=-1) DVD item (item level itype='DVD') and observe the items notforloan status updates to 'Available for loan' (NOT_LOAN=0)

Sponsored-By: Waikato Institute of Technology, NZ

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 10:53:57 -03:00
123d021c75
Bug 25560: Template changes
Sponsored-by: Waikato Institute of Technology, New Zealand

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 10:53:57 -03:00
53cd638098
Bug 25560: Database changes
Sponsored-by: Waikato Institute of Technology, New Zealand

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 10:53:56 -03:00
emlam
4506145b91
Bug 33426: Add DataTables saveState to suggestion.tt
To test:
1. In the staff client, go to Purchase Suggestion management page and
   add a suggestion if needed to make the table display.
2. Make some changes to the table settings (hide/show columns, change
   sort column, and/or change number of rows to display)
3. Navigate to a different page.
4. Navigate back to Purchase Suggestions page. Note that the table
   settings have been reset.
5. Apply patch and restart_all
6. Repeat steps 1-4. Note that this time the changes to the table
   settings were preserved.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 10:53:55 -03:00
a45e79c1f4
Bug 31692: Tidy and rebase fix
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:59 -03:00
Lari Taskula
889853bc9d
Bug 31692: (follow-up) Adjust reserves.item_level_hold
Original patch missed handling reserves.item_level_hold column.

To test:
1. prove t/db_dependent/Koha/Hold.t

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:58 -03:00
Lari Taskula
b0f49d5daf
Bug 31692: Allow librarians to change hold type in staff client
To test:
1. Apply patch
2. Add item level hold to a record/item, make sure patron has no other
   holds on that record
3. Go to /cgi-bin/koha/reserve/request.pl?biblionumber=xxx where xxx is
   the record you placed the hold for
4. Under "Existing holds" table, in "Details" column you should see
   "Only item <barcode>" dropdown
5. Select "Next available" from the dropdown
6. Click Update hold(s)
7. Observe dropdown is gone and cell value has changed from
   "Only item <barcode>" to "Next available"
8. Cancel the hold and add two item level holds for the same patron
9. Under "Existing holds" table, in "Details" column you should see
   "Only item <barcode>", but no select dropdown

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:57 -03:00
Lari Taskula
26afea24f8
Bug 31692: Add Koha::Hold::change_type and unit tests
To test:
1. prove t/db_dependent/Koha/Hold.t

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:57 -03:00
b703d97816
Bug 26053: Add unit test for Koha::Patron::Restriction
Run:
prove t/db_dependent/Koha/Patron/Restriction.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:56 -03:00
79be5f361b
Bug 26053: Distinguish expired patron restrictions
On the patron detail page, in restrictions table to show that the restriction has expired.
With text and a grey color line.
Uses 'text-muted' boostrap class (already used in OPAC).

Test plan :
1) Go to a patron details page cgi-bin/koha/members/moremember.pl
2) Create 2 restrictions in the future
3) Edit in database to se the first restriction into the past
4) Create a retriction without date
5) Check you see on expired line text : (expired)
6) Check line is grey

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:55 -03:00
5b25b26f70
Bug 35014: Only set time for enable-time flatpickr
This patch adds a check to the onChange function such that we only
attempt to set the default time on change for time enabled flatpickrs
when the date is entered manually.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:55 -03:00
69a19fb526
Bug 12532: DBRev 23.06.00.031
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:54 -03:00
9dc1852d8f
Bug 12532: (follow-up) Catch more cases in tests
This patch added lots more cases to the unit tests to try and catch all
the new functionality.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:54 -03:00
b9325a9177
Bug 12532: Fix test
The mock was working. The problem was that the to_address of the notice
was set from the previous send.

A fix would be to update the message, but it seems better to simply
re-enqueue it.

This patch also use Koha::Notice::Messages.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:53 -03:00
273440924d
Bug 12532: (QA follow-up) Fix issues highlighted by unit tests
* YesNo preferences yield '1' or '0' not 'yes' and 'no'.
* Set message_cc address so we can report later that the message went to
  a cc address.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:52 -03:00
50f5458d27
Bug 12532: DBIC Schema
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:52 -03:00
eef928e5d9
Bug 12532: Expose CC address in patron notices display
Add the CC address into the patrons notices on the staff client to
highlight that the message was copied to another user.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:51 -03:00
157bab3b90
Bug 12532: (QA follow-up) Add cc_address to message_queue
Add the cc_address field to the message_queue so we may report back that
an email was copied to the guarantor email addresses.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:50 -03:00
91a5d20e24
Bug 12532: (QA follow-up) Add tests for SendQueuedMessages
This patch adds unit tests for the changes made to
_send_message_by_email for Guarantor CC

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:50 -03:00
5c5c335e6b
Bug 12532: (QA follow-up) Remove defunkt test
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:49 -03:00
0a35ec19e1
Bug 12532: (QA follow-up) More cleanup
Minor QA cleanup, perltidy, remove Data::Dumper and clarify warn

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:49 -03:00
Hammat Wele
54c9b488dc
Bug 12532: (follow-up) Send email to guarantor using the CC field
In This patch the CC field is used to send the message to the guarantors. If the «to» field is empty (the guarantee has no address) we send the message «to» the garantors.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:48 -03:00
82a4d40890
Bug 12532: (QA follow-up) Clean up notice_email_address
Reduce some of the code duplication

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:47 -03:00
7517fb6235
Bug 12532: (QA follow-up) Undo changes to Koha::Email
The changes here aren't required (Email::Address already deals with
lists of addresses internally)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:47 -03:00
Hammat Wele
dc629ea7b5
Bug 12532: Send email to guarantee and guarantor
This patch allows guarantors to receive emails sended to their
guarentees. This patch is a rebase of the previous patches.
I took all the content of previous commit and put it in one commit.

TO TEST:

Before applying:
1) Search, or create, a patron with guarantor.
2) For both guarantors and guarantees:
   - Add an email address
   - Update the 'Patron messaging preferences' section so that an email is sent for item checkouts
3) Checkout an item. An email should be sent only to the guarantee.
4) Apply the patch.
5) Run updatedatabase.pl
6) Run prove t/db_dependent/Members.t and prove t/db_dependent/Letters.t
7) Enable 'RedirectGuaranteeEmail'
8) Run misc/cronjobs/process_message_queue.pl
9) Notice that the email should be sended to both the guarantee AND the
guarantor.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:58:46 -03:00
101eabfd9d
Bug 34828: Fix test
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:22:37 -03:00
ed6a556df3
Bug 23241: Remove unused koha-index-daemon-ctl.sh
This script was never fully promoted or documented and it requires third
party libraries are installed to use. This patch removes it from the
repository and the Makefile so it is no longer installed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:22:37 -03:00
Katrin Fischer
4b1d4ca170
Bug 35015: (QA follow-up) Fix paid transactions filter in the staff interface
Same problem: we added a column without adjusting the filter.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:22:36 -03:00
7cf209a550
Bug 35015: Adjust column index in fnFilter
This patch fixes the column index in the call to fnFilter following the
addition of a new column to the table in bug 32341

Test plan:
1) Add some charges to a patron account
2) Pay some of these charges so that they are no longer outstanding
3) In the OPAC log in as that patron and navigate to the Charges tab in
   their account
4) Observe that all charges are listed, even if they have been paid and
   clicking the Show all transactions button has no effect even if
   clicked multiple times between the different filtering options
5) Apply patch
6) Refresh page and now the settled charges should be filtered out
7) Click the Show all transactions button and it should correctly update

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:22:35 -03:00
40f7a1cc2f
Bug 35013: Font Awesome icons broken in self checkout and self checkin
This patch updates the way Font Awesome icon assets are included on the
self checkout and self checkin pages. This change should have been made
during the upgrade to Font Awesome 6 (Bug 32910).

To test, apply the patch and make sure both SelfCheckInModule and
WebBasedSelfCheck system preferences are enabled.

- Go to the self checkout module (/cgi-bin/koha/sco/sco-main.pl) and log
  in.
- Check that Font Awesome icons are working: You should see an
  information icon by the "Help" link in the header, and a check mark
  icon in the "Finish" button.
- Click the help link to confirm that the icon appears there too.
- Go to the self checkin module (/cgi-bin/koha/sci/sci-main.pl).
- In the header you should see the information icon by the help link and
  an icon with the "Log out" link too.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:22:35 -03:00
dad04bbf0a
Bug 35010: In record checkout history do not show anonymous patron link
In a biblio record checkout history, when a checkout is anonymized the
patron id has been replaced by anonymous patron id.
In this case we should not show anonymous patron link.
It looks like a real patron did this checkout.

Test plan :
1) Set an existing patron id in system preference 'AnonymousPatron'
2) Perform anonymisation on old checkouts (or edit database manually)
3) Look at a record checkout history with old checkouts
=> You see 'Anonymized' for anonymized checkouts
4) Set system preference 'AnonymousPatron' empty
5) Look at same record checkout history
=> Check no error

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:22:34 -03:00
b4f928003e
Bug 34883: Add unit test
prove -v t/db_dependent/Koha/Patrons/Import.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:22:34 -03:00
f4f77357f6
Bug 34883: Stop patron expiry date being set to NULL during import
A regression has been identified whereby an empty field in the dateexpiry field in a patron import file will cause the patron's expiry date to be set to NULL. This patch addresses this by checking for an empty field and using the existing expiry date if one is found.

Test plan:
1) Setup a csv with column headers:
    surname	firstname	branchcode	categorycode	cardnumber	dateenrolled dateexpiry
2) Add values:
    Acosta	Edna	CPL	PT	23529001000463	02/01/2013
3) Leave the dateexpiry column blank
4) Check Edna and make a note of her patron expiry date
5) Run the import_patrons.pl script with the following flags:
    a) --file <filepath_for_your_csv_file>
    b) --matchpoint cardnumber
    c) --confirm
    d) --overwrite
6) Check Edna, note her expiry date is now set to NULL
7) Manually edit Edna's expiry date to be reset to what it was before you ran the script
8) Apply the patch and restart_all
9) Repeat step 5
10) Check Edna, this time her expiry date should be the same as the value you set it to in step 7
11) Sign off!

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:22:33 -03:00
f0477dfd36
Bug 28688: DBRev 23.06.00.030
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:22:32 -03:00
f6119e7503
Bug 28688: (follow-up) Remove redundant options
Test plan:
Run misc/cronjobs/membership_expiry.pl --help
misc/cronjobs/membership_expiry.pl --man

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:22:32 -03:00
bb9f7b5558
Bug 28688: Use pod2usage for incorrect usage
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:22:31 -03:00
5588d688fd
Bug 28688: Add renewal to crontab example
Note: I did not add an example to the debian cron daily file, since
we have no commented lines there. And automatic renewal is no default
behavior.

Test plan:
Read new lines in misc/cronjobs/crontab.example. Just comments.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:22:31 -03:00
9ab80608f1
Bug 28688: Allow to pass another renewal notice
Just as passing another expiry notice.

Test plan:
Pick a patron to expire.
Create another membership renewal notice, say X.
Run misc/cronjobs/membership_expiry.pl -c -n -v -letter_renew X
Check output on command line.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:22:30 -03:00
9022ec16c3
Bug 28688: Add renew option to membership_expiry.pl
Test plan:
[1] Pick an account to expire soon.
[2] Choose MembershipExpiryDaysNotice so that it will be selected.
    (Note: You can extend the selection with -before or -after.)
[3] Run misc/cronjobs/membership_expiry.pl -c -v -renew
[4] Check new expiry date in the notice. Does it correspond with
    enrollment period of category and pref BorrowerRenewalPeriodBase?
[5] If the patron category has an enrollment fee, check account too.
[6] Reset dateexpiry of this patron to original date.
[7] Run misc/cronjobs/membership_expiry.pl -c -v
[8] Check if you got an expiry notice instead and dateexpiry did not
    change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed $fees and $substitute in favor of notice approach

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-10 09:22:29 -03:00