Commit graph

8861 commits

Author SHA1 Message Date
14f7660b2e
Bug 34529: Offline circulation should be able to accept userid as well as cardnumber
Like everywhere else in Koha, offline circulation should be able to use userid as well as cardnumber to look up the patron for a transaction ( checkouts and fine payments ).

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Download the test.koc file attached to this bug
4) Verify you have an item with the barcode 39999000001396
   create it if needed
5) Set a patron's username to "hacevedo"
6) Upload and import the test.koc file into offline circ
7) Verify the item was checked out and the payment was made

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-06 11:34:44 -03:00
Katrin Fischer
7e0cd0e211
Bug 27992: (QA follow-up) Perltidy
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-06 11:34:40 -03:00
fe0f8389b2
Bug 27992: Call AddReturn on stats patron
To test:
1. Create a Statistical Patron
2. Check out an item to the Stat Patron, that is checked out to another user
3. See that the local use is recorded, but the item does not get checked in
4. Check out an item that has a lost status and note that the local use is recorded, and the lost status is cleared.
5. Item is NOT checked in
6. Apply patch
7. Repeat steps 2 - 4. Item is checked in.
8. Set BlockReturnOfLostItems to Block.
9. Have a checkout to another patron then mark it as lost.
10. Check it out to the Statistical Patron. You should see the message "Item was lost, cannot be returned."
12. Conform the item remains on the patron's account.
13. Turn off BlockReturnOfLostItems, check out the same item to the Statistical Patron. You should see a message "Item was lost, now found."
14. Conform the item was actually checked in.

15. Set BlockReturnOfWithdrawnItems to Block.
16. Have a checkout to another patron then mark it as withdrawn.
17. Check it out to the Statistical Patron. You should see the message "Item was withdrawn, cannot be returned."
18. Conform the item remains on the patron's account.
19. Turn off BlockReturnOfWithdrawnItems, check out the same item to the Statistical Patron. You should see a message "Item was withdrawn."
20. Conform the item was actually checked in.

21. Have an item on a regular patron account that has a hold on it.
22. Check it out to the Statistical Patron
23. See the message "Item on hold, please checkin."

24. Have an item on a regular patron account that has a claim return on it.
25. Checkit it out to the Statistical Patron.
26. See the message "Item claimed returned, please checkin."

27. Have an item on a regular patron account that has been recalled.
28. Checkit it out to the Statistical Patron.
29. See the message "Item can fill a recall, please checkin."

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-06 11:34:39 -03:00
3ec73d80e2
Bug 17798: Confirm hold when printing slip from another patron's account
This patch adds a few pieces of information to the print slip button
and makes the code confirm the hold

As we are printing before the confirm, we also add the ability to pass
in the itemnumber to 'ReserveSlip'

This is slightly hacky, however, I don't see another way to allow
printing without an additional page reload.

To test:
 1 - Place a title level hold for patron A, for delivery to library B
 2 - Attempt to checkout an item from the record above to Patron B from
     library A
 3 - You receive an alert about the hold
 4 - Click "Don't check out, confirm hold, and print slip"
 5 - Confirm the slip looks correct and has item info
 6 - Confirm that item is in transit to fill hold
 7 - Revert transit status
 8 - Attempt to checkout the item to Patron B from Library B
 9 - Click "Don't check out, confirm hold, and print slip"
10 - Confirm slip is correct
11 - Confirm item is marked waiting

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-11-06 08:42:41 -03:00
ef9d9a006a
Bug 33749: (QA follow-up) Tidy code for qa script
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-03 12:08:07 -03:00
b6d39225bc
Bug 33749: Use TrimFields instead of stripWhitespaceChars
This patch replaces the uses of the static method with the new filter.
It also moves the tests to the relevant place and removes the (now)
unused method.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-03 12:08:06 -03:00
53ccbc7b61
Bug 35231: Resolve crash on unexisting patron in Auth
Test plan:
Without this patch:
Logout from OPAC. Crash.
Try to login. Crash.

With this patch:
Enable login in tracking triggers. Clear lastseen.
Flush memcache.
Login. Check lastseen.
Logout.
Login.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-03 12:04:42 -03:00
6b7e493448
Bug 29002: Tidy
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-03 12:04:30 -03:00
3b1612cf27
Bug 29002: Circulation
This patch adds handling for circulation of booked materials.

We prevent checkouts of booked items during the booking period where the
booking is for another user.

We update the due date to match the end of booking period when checking
out to the user who the booking is for.

If a checkout would overlap a booking to another user, we ask the user if
they will accept a reduced due date so the booked item is returned in
time to fulfill the booking.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-03 12:04:26 -03:00
Magnus Enger
6fec4ea0df
Bug 26170: Add protected status for patrons
This set of patches makes it possible to protect patrons from being accidetally
deleted or merged with other patrons, from the UI and from (well behaved) cron
jobs. The following subroutines are affected:
- Koha::Patron::delete
- Koha::Patron::merge_with
- Koha::Patron::safe_to_delete
- C4::Members::GetBorrowersToExpunge

Please note:
- This does not intend to protect patrons from being edited, only from being
  deleted

To test:

* Tests
- Run the affected tests:
  prove t/db_dependent/Members.t
  prove t/db_dependent/Koha/Patrons.t

* Editing protected status and manual deletion
- Add a new user, note the presence of the "Protected" field under "Library
  management", but leave it at the default "No", for now.
- Note that "Protected" is displayed in the "Library use" section of the patron
  details.
- Note that More > Delete is avaiable as an action when the patron is saved
- Edit the user and set "Protected" to "Yes"
- Note that More > Delete is now disabled, with a note that the patron is protected

* Batch patron deletion
- Go to Tools > Batch patron deletion and anonymization
- Check the box for "Verify you want to delete patrons"
- Choose the category of your protected patron for "whose patron category is"
  and click "Next" to run the actual deletion
- Check that your protected patron was not deleted

* Merging patrons
- Make sure you have two patrons with similar names or the same category, so
  you can find them with one search. One should be protected, one not.
- Search for the patrons, tick their boxes and click on "Merge selected patrons"
- Select one of the patrons as the "patron to keep".
. Click on "Merge patrons"
- "No valid patrons to merge were found" should be shown
- Repeat this with the other patron as the "patron to keep"
(A future enhancement could be to not allow a protected patron to be selected for
merging in the first place.)

* misc/cronjobs/delete_patrons.pl
- Make sure you have a protected patron, in a category with at least one more
  patron.
- Run something like this (at least in ktd):
  $ perl misc/cronjobs/delete_patrons.pl --category_code <code> -v --confirm
  (Replace <code> with the actual categorycode.)
- Make sure the borrowernumber of the protected patron is not mentioned in the
  output of the script.
- Check the protected patron was not deleted
- Check the non-protected patrons were deleted

* REST API (with ktd)
- Make sure you still have a protected patron, and note their borrowernumber
- Enable RESTBasicAuth and restart all the things
- Run these two commands from the command line on the host:
  $ curl -u koha:koha --request GET "http://localhost:8081/api/v1/patrons/54"
  $ curl -u koha:koha --request DELETE "http://localhost:8081/api/v1/patrons/54"
  (Replace 54 with the actual borrowernumber of your protected patron.)
- The first curl command should give you the patron details. The second should
  give this output:
  {"error":"Protected patrons cannot be deleted","error_code":"is_protected"}

There could be more functions/scripts where patrons are deleted that I have not
thought about. Please report them on the bug if you find any!

Update 2023-10-19: Fix "More > Delete" on patron, so link can not be clicked.
Update 2023-10-19: Rebase

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-11-01 17:23:06 -03:00
7ecb05f4ec
Bug 34924: Add 'auto_renew_final' and 'auto_unseen_final' return to CanBookBeRenewed
There is a desire for auto_renewals to treat the final renewal differently. We would like to notify the patron of the final renewal - but not again when the next renewal fails. This patch adds the new return value and tests.

To test:
prove -v t/db_dependent/Circulation.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-31 11:02:46 -03:00
Katrin Fischer
a04f9447f7
Bug 27943: (QA follow-up) Perltidy
I have some trouble to get the tidyness test on
AuthoritiesMarc.pm passing. There are several outstanding
patches touching this file, so I didn't dare to perltidy
the whole file just yet.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-30 09:02:21 -03:00
George Veranis
b724bb579c
Bug 27943: (follow-up) Fix unit test, and use systempreference AuthoritySeparator
Instead of hardcoding the separator we take the value from systempreference.
Also adjust the unit test to expect the "equalterm" array.
Test plan same as before.

Signed-off-by: Christian Nelson <christian.nelson@uwasa.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-30 09:02:20 -03:00
George Veranis
a8b075a4d3
Bug 27943: Add support for 7XX equal terms on authorities marc21 display
Currently when a MARC21 authority has 7XX field they do not display on
authority search result page. 7XX is equal term of 1XX based on LC rules.
Applying this patch will enable that feature, which is important for non latin
catalogues.

Test plan:
1) Add a new authority with 1XX and 7XX fields.
2) Try to search that authority and check if 7XX values are displayed
3) Apply this patch
4) Try to search that authority and you will see that 7XX values are displayed
   like "1XX = 7XX"

Sponsored-by: Keratsini-Drapetsona Municipal Library, Greece
Mentored-by: Andreas Roussos
Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>

Works for me!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-30 09:02:19 -03:00
bbeab36789
Bug 34678: Allow new entries to overwrite hold_fill_targets
When using background jobs, there is a possibility of a race condition where two jobs will be updating the holds queue for the same biblio. We should try to minimize those cases (see bug 34596)

In the meantime though, we should prevent jobs possibly dying, and allow the most recent update to succeed.

There is a possibility two updates wil assign different items to the same reserve, and that a reserve could end up in the queue twice, however, whichever one is filled first will delete both entries. as filling the hold deletes by reserve id (see bug 24359)

This patch adds a transaction to delete and then inset the new row

To test:
1 - prove -v t/db_dependent/Reserves.t
2 - It fails
3 - Apply patch
4 - t/db_dependent/Reserves.t
5 - It succeeds!

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2023-10-27 16:44:24 -03:00
af01b62d2f
Bug 33608: (QA follow-up) Remove ->insert method
Might come back on the subject when resuming with bug 33636.

Test plan:
Run t/db_dependent/Koha/Statistics.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Tidy Koha/Item.pm bit further. Ordered hash keys too.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 11:07:59 -03:00
7ceb3959c3
Bug 33608: Redirect UpdateStats to Koha namespace
Moving code to Koha::Statistic->new and ->insert.
Polishing code a bit further in next patch.

Test plan:
Run t/db_dependent/Stats.t
Run t/db_dependent/Koha/Statistics.t
Run t/db_dependent/Koha/Pseudonymization.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

[EDIT] POD headers, use plural module and tidy Koha::Statistic

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 11:07:56 -03:00
3f70c17fd8
Bug 33608: Add two new circulation types in Statistics module
These are: item_lost and item_found. Speak for themself.

Test plan:
Run t/db_dependent/Stats.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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-25 11:07:53 -03:00
fde91e178d
Bug 8838: Add digest option for HOLD notice
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the new digest option for "Hold filled" messages
5) Trap multiple holds for a patron
6) Note a single notices is generated for all the trapped holds!

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Laura ONeil <laura@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 11:07:48 -03:00
Katrin Fischer
7082820aee
Bug 10762: (QA follow-up) Perltidy
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 10:35:31 -03:00
Thibaud Guillot
b5986ba8e2
Bug 10762: (follow-up) Update test plan, add kohastructure.sql files
I also change the default value for scale_height to '0.01'

Test plan:

1)Home > Cataloguing > Tools: Label creator > Manage Layout or New Layout
2)Make a new layout or edit an existing one
3)Notice the 2 new fields "Barcode width/Barcode height"
4)Save it like this
5)Create a batch of barcode and export if in PDF
6)Notice the size of barcode
7)Go back to your existing layout
8)Enter some values (Barcode width: 1.6 / Barcode height: 0.02), save
9)Take back your batch of barcode and export it in PDF
10)The barcode should be 2x bigger

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 10:35:30 -03:00
Jérémy Breuillard
2cf45462fe
Bug 10762: Change the size of barcodes in label creator
Test plan:
1)Home > Tools > Label creator > Manage Layout or New Layout
2)Make a new layout or edit an existing one
3)Notice the 2 new fields "Barcode width/Barcode height"
4)Save it like this
5)Create a batch of barcode and export if in PDF
6)Notice the size of barcode
7)Go back to your existing layout
8)Enter some values (Barcode width: 1.6 / Barcode height: 0.04), save
9)Take back your batch of barcode and export it in PDF
10)The barcode should be 2x bigger

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 10:35:29 -03:00
43d9ee68fc
Bug 31846: (QA follow-up) Tidy code to make qa script happy
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 10:35:28 -03:00
David Gustafsson
eae494fb33
Bug 31846: Add syspref for serials search results limit
To test:

1) Make sure SerialsSearchResultsLimit syspref is unset or set to 0.
2) Perform an advanced search on serials without any conditions
   and confirm all serials are listed as expected.
3) Set SerialsSearchResultsLimit to a value less the the number
   of total subscriptions, perform the search again, and confirm
   that the number of serials has been limited to the set value.
4) Ensure all tests pass in t/db_dependent/Serials.t

Sponsored-by: Gothenburg University Library
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 10:35:27 -03:00
795c60e577
Bug 35027: Add 'hold' to patron activity triggers
This patch adds 'hold' to the list of triggers available for tracking
patron activity.

Test plan
1) Select 'Placing a hold on an item' in the
   TrackPatronLastActivityTriggers system preference
2) As a staff member, place a hold on any item for a test user
3) Confirm that the borrowers.lastseen field is updated for that test
   borrower

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-24 10:05:25 -03:00
b46b614b6c
Bug 15504: Remove PatronLastActivity preference
This patch removes the older PatronLastActivity preference opting to
replace it by the new PatronLastActivityTriggers preference. The feature
can now be disabled by simply not selecting any triggers

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-24 10:05:22 -03:00
0ae97bba6b
Bug 15504: (follow-up) Use borrowernumber in Koha::Patrons->find
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-24 10:05:16 -03:00
75f68914be
Bug 15504: (follow-up) Migrate to one clear method
We were using a series of similarly named methods spread in distinct places
around the codebase. This combines the logic of C4::Auth::track_login_daily
and Koha::Patron->track_login into a new Koha::Patron->update_lastseen method.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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-24 10:05:15 -03:00
2db5afffa1
Bug 15504: Remove update_lastseen method
This patch removes update_lastseen which has been replaced by a call to track_login_daily

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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-24 10:05:13 -03:00
68f1154f6d
Bug 15504: Add triggers to instances of track_login_daily
This patch adds a trigger to every instance of track_login_daily

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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-24 10:05:13 -03:00
6b20144bbb
Bug 15504: Update track_login_daily to accept triggers
This patch adds triggers to track_login_daily so that it only tracks activity when that trigger is active

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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-24 10:05:12 -03:00
10649d4921
Bug 33547: Add print slip
Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-23 11:33:51 -03:00
a5d75c47e7
Bug 28166: (QA follow-up) Fix and tidy tests and code
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-23 11:33:50 -03:00
Mark Hofstetter
1e1616b993
Bug 28166: Optionally add MARC fields to authority search
adds the same feature to Authority Search as in the "normal" Z39.50 search, to display
arbitrary marc fields in the search results

1. apply patch
2. go to System preferences->Authorities preferences
3. the new option "AdditionalFieldsInZ3950ResultAuthSearch" shows up
4. enter the additional field numbers you want to see eg '001'
5. make an "Authority" search via Z39.50
6. the new new column "Additional fields" will display
7. sign off ;-)

Sponsored-by: Steiermärkische Landesbibliothek
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>

Bug 28166: Removed comments and _add_rowdata

Bug 28166: (follow-up) Restore custom fields for biblios

To test:
1 - Add "245$a" to AdditionalFieldsInZ3950ResultSearch preference
2 - Cataloging -> new from z3950
3 - Search and see results have 'additional fields' including the title
4 - Apply other patches
5 - Restart all
6 - Repeat Z39 Additional fields are now blank
7 - Apply thi patch, restart all
8 - Repeat Z39 search. Additional fields are restored

Bug 28166: (QA follow-up) Fix rebase issue

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-23 11:33:49 -03:00
448aec3fc9
Bug 25393: (QA follow-up) simplify auto_renew condition
_CanBookBeAutoRenewed will only ever return 'auto_too_soon' not 'too_soon' so we can do a simple equality check

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 16:31:24 -03:00
7d28dd0bdf
Bug 25393: Update CanBookBeRenewed pod with bug 25758 changes
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 16:31:21 -03:00
6cd5f3b2fc
Bug 25393: Auto renewals logic reimplementation:
Check if it's too soon for a manual renewal  even if 'Automatic renewals' is enabled
Allow for a manual renewal even if it's too soon for an automatic renewal

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 16:31:20 -03:00
3ddf87aef6
Bug 25393: Distinguish between auto or normal renewals in GetSoonestRenewDate
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 16:31:19 -03:00
0e0929c169
Bug 25393: Use new noautorenewalbefore circulation rule in _CanBookBeAutoRenewed
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 16:31:18 -03:00
cdf18a0015
Bug 31357: Separate holds history from intranetreadinghistory
Currently the system preference intranetreadinghistory determines visibility of both circulation history and holds history tabs in the patron record.  It would be helpful to allow the option of setting each of those independently.

Specifically, libraries have requested the option of being able to view the holds history in a patron record without having to enable viewing of the circulation history.

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Run updatadatabase.pl
4) Verify the new syspref intranetReadingHistoryHolds has the same value
   as the existing syspref intranetreadinghistory
5) Disable intranetreadinghistory, enable intranetReadingHistoryHolds
6) Verify you can view a patron's holds history but not reading history

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

JD amended patch:
* renamed syspref intranetReadingHistoryHolds => IntranetReadingHistoryHolds
* tidy

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 16:31:16 -03:00
472e38f9ad
Bug 14092: (QA follow-up) Avoid fiddling with the hash in the template
prove t/db_dependent/Acquisition.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 16:31:15 -03:00
f5ac2916f2
Bug 31383: Create a parent-child DB relation for additional content
In the design of additional contents the idea of a parent-child relation is implicitly present. You have a default page and translations.
But we do this in one table coming from the old news items.

Several reports show that we would be better off creating a parent table listing the main news items, CMS pages or HTML content. And a child table containing the title, content and lang.

Note that this first step is a prelimenary step to clean this area and make it more robust and extensible. More enhancements to come.

What is this patchset doing?
* DB changes
- Rename additional_contents.idnew with id
- Create a new table additional_contents_localizations(id, additional_content_id, title, content, lang) that will contain the translated contents
- Move the content to this new table
- Remove title, content and lang columns from additional_contents
- Replace the notice templates that are using ''<news>" (should only be ISSUESLIP) and remove support for this syntax. Also add a warning in case other occurrences of uses of the old syntax exist.

* CRUD
- We add a new Koha::AdditionalContentsLocalization[s] couple, and move some logic from Koha::AdditionalContent[s] to there. Note that, to prevent too much drastic changes in notice templates, and to make them easy to use, the different attributes of the content object is accessible from the translated content object (ie. Koha::AdditionalContentsLocatlization->library is available and return $self->additional_content->library). I think it's an elegant way to keep things simple.
- No changes expected for "NewsLog" logging
- Little behaviour changes for pages, see tools/page.pl changes. We are now passing the id of the content, and the desired language, instead of the mix of "page_id" or code and lang. Note that here we certainly need to rename "language" query param to not change the full interface language.

Test plan:
0. Preparation steps, use master
  a. Create notice templates that are using "<< additional_contents.code >>". This won't be replaced, but we want the update process to alert us.
  b. Create several news, additional contents, pages. Some with translated contents, some without.
  c. Make sure ISSUESLIP has the "<news>" section. If you are using the sample data there is nothing to do here
  d. Turn on NewsLogs
1. Apply the patches, restart_all, updatedatabase
=> Confirm that the new table is created and filled with the contents you had prior to the update
=> Confirm that additional_contents_localizations.updated_on has been kept to the previous values
=> Confirm that ISSUESLIP has been replaced properly
=> Confirm that you get a warning about the additional_contents
2. Create, update, delete news, html customs, pages
=> Confirm that the additional_contents_localizations.updated_on is only adjusted when required
=> Confirm that the logs are correctly created when NewsLogs is on
3. Check some items out, generate a slip
=> Confirm that the news are displayed at the bottom of the slip, and that the publication date is correctly formatted
4. Have several HTML customizations (like OpacNav, opacheader), in translated in different languages
=> Confirm that the default values is displayed when you are using the interface in a language without translation
=> Confirm that the translated version is picked when it exists

Notes for QA:
* I am not sure we really need the alert during the update DB process about the additional_contents leftover. We should not have them outside of ISSUESLIP.
Shouldn't it hurt?
* There is something ugly in sample_news.yml, the id is hardcoded. But how do we prevent that and keep translatability?

Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 14:43:56 -03:00
5282a9c4ce
Bug 33947: Remove GetAllIssues
No more occurrences of GetAllIssues, remove it!

Test plan:
  git grep is your friend

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:03:03 -03:00
4e3b0d6161
Bug 25816: (QA follow-up) Add system preference
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:03:02 -03:00
Matthias Meusburger
71b22b663c
Bug 25816: Add opac messages in SIP display.
Test plan:

 - Add one or more opac messages to a patron
   (patron detail -> add message -> Add a message for: OPAC)

 - Check that the messages will be displayed, with correctly formatted dates.

You can use src/C4/SIP/interactive_patron_dump.pl for easier testing.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:03:01 -03:00
f7630f5de4
Bug 34014: (follow-up) Tidy
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:03:00 -03:00
66d519ae41
Bug 34014: Allow staff to edit degraded records
This patch adds an eval to the call for the record form metadata

If there is an error we catch it, display it, and attempt to strip bad characters from the record

To test:
1 - In koha testing docker attempt to view record 369 in the staff interface
2 - You see a warning about degraded view
3 - Attempt to edit the record
4 - Internal server error
5 - Apply patch, restart all
6 - Reload the editor
7 - Record successfully loads!
8 - You have a warning about encoding issues!
9 - Save the record
10 - No more warning!
11 - Edit again, no more warning!

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:58 -03:00
c48421e6ff
Bug 32721: (QA follow-up) Drop fields from API response
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 32721: (QA follow-up) Rename fields to opac*

This patch updates the field names to reflect that they're OPAC
related.

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

Bug 32721: (QA follow-up) Fix rebase errors

We let some superflous template params creep back in during a rebase
somewhere.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:56 -03:00
6deab09c13
Bug 32721: (QA follow up) - fix QA issues
This patches addresses issues raised by the QA tests. It also adds a missed import of the Branches file in the document head

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

Bug 32721: (QA follow-up) Add missing imports

Missing imports added in three template files
Exec flag added to atomic update file
Tinymce imports removed

A new bug will be created to move codemirror into an inc file at latest
version

Test plan as before

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

Bug 32721: Tidy up - duplicate fetching of userjs and css

Currently UserJS and UserCSS is injected into the template as a parameter through Auth.pm but is then fetched using Koha.Preference() in the template. This patch tidies this up by removing the parameters from Auth.pm

Test plan as per first commit

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:54 -03:00
3ca1ab63ac
Bug 31631: Optionally use tax-exclusive values for calculating fund values
Test plan:
1. Apply patches
2. sudo koha-upgrade-schema <instance>
3. Restart services
4. Set TaxRates syspref = 0.15
5. Create a new fund with amount = 1000
6. Add an order to a basket with the following values:
- Fund = Choose the fund from step #5
- Quantity = 1
- Vendor price = 10
- Tax rate = 15%
- Discount = 20%
- Retail price = 10.00
- Replacement cost = 10.00
- Actual cost = 10.00
- Ensure the basket belongs to a vendor with ("List prices" = "Don't include tax" and "Invoice prices" = "Don't include tax")
7. Go to the Acquisitions home page
8. Confirm the 'Ordered' column for the step #5 fund contains 9.20
9. Click on the 9.20 link and confirm the ordered.pl page that loads
also contains 9.20 as the 'Subtotal'

10. Change 'CalculateFundValuesIncludingTax' = 'Exclude'
11. On the Acquisitions home page confirm the 'Ordered' column now
contains 8.00
12. Click on the 8.00 link and confirm the ordered.pl page also contains
8.00 as the 'Subtotal'

13. Close your basket and receive your order - change the 'Actual costs'
= 8.00 (the $10 retail price less the 20% discount, tax exclusive)
14. Go to the Acquisitions home page and confirm the 'Spent' column now
contains 8.00
15. Click on the 8.00 link and confirm the spent.pl page also contains
8.00 as the 'Subtotal'

16. Change 'CalculateFundValuesIncludingTax' = 'Include'
17. Confirm the 'Spent' column on the Acquisitions home page now shows
9.20
18. Click on the 9.20 link and confirm the spent.pl page also contains
9.20 as the 'Subtotal'

Sponsored-by: Waikato Institute of Technology, New Zealand

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 15:41:35 -03:00