Commit graph

50674 commits

Author SHA1 Message Date
5fd8317552
Bug 34825: Merge Letters.t into t/db/Letters.t
Test plan:
Run t/db_dependent/Letters.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:32:47 -04:00
22aee4db67
Bug 34825: Remove Test::DBIx::Class from Letters.t
Includes a tidy.

Test plan:
Run t/Letters.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:32:47 -04:00
23a8497123
Bug 34968: Remove unneeded module from Search.t
Test::DBIx::Class is not even used here.
Just like C4::Biblio.
We should remove TestBuilder too (this is t not t/db)!

Test plan:
Run t/Search.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:32:46 -04:00
af093305b8
Bug 34969: Remove unneeded module from buildQuery.t
Test plan:
Run t/Search/buildQuery.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:15:42 -04:00
a408421b9b
Bug 34905: Fix icon
Test plan, on k-t-d:
1) Install FreeForm, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)

2) Create a new FreeForm ILL request:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm

3) Pick a request type and input "42" in cardnumber and select a random library.

4) Notice the "Place request with partners" icon is gone from the top action bar.

5) Apply patch. Repeat.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:15:41 -04:00
80db256a47
Bug 34970: Remove most modules from SuggestionEngine_AuthorityFile.t
There is really no need for all those modules here.
What remains, is just a trivial test.

Test plan:
Run t/SuggestionEngine_AuthorityFile.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:15:41 -04:00
10ef1fe672
Bug 34944: Remove the use of event attributes from OPAC full serial issue page
This patch removes the use of event attributes (onclick) from the OPAC's
full serial issues template. These events are defined now along with the
other in-page JS.

To test you must have a serial record with issues from multiple years.

- Locate the serial record and view the detail page.
- Click "More details" at the bottom of the "Subscriptions" tab.
- Click the "Full history" tab.
- Test the "Show year" controls to confirm that clicking each year
  correctly filters the table of issues to show only issues from that
  year.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:15:40 -04:00
8d4b10fc84
Bug 34912: Add 14 hours to 1970 date in Account(s).t
This makes those tests pass in whatever timezone.

Test plan:
Do not yet apply patch.
Change timezone on commandline with: export TZ='Etc/GMT-14'
NOTE: GMT-14 is what we also call UTC+14 (sign reversed).
Run prove t/db_dependent/Accounts.t t/db_dependent/Koha/Account.t
This fails now.
Apply patch.
Rerun tests and verify that they pass now.
Bonus: Try some other time zone.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:15:39 -04:00
7d93d18548
Bug 34916: Fix wrong borrowernumber in ArticleRequests.t
Simple fix: Send patron to userenv instead of library only.

Test plan:
Do not apply patch.
Remove borrowernumber 51.
Run t/db_dependent/Koha/ArticleRequests.t. (FAIL)
Apply patch, rerun test (PASS)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:15:39 -04:00
ff00e77f46
Bug 34939: Set hour:minute to 23:59 when inputing dates unless explicitly set
1. Find some places in the staff interface where data-flatpickr-enable-time is set to true. Examples: renew.tt or circulation.tt
2. Directly input a date in whatever date format you have specified in DateFormat but omit the hour/minute. Example: 12/12/2023
3. See that the hour/minute default to 00:00 if your TimeFormat is 24hr and 12:00 AM if your time format is 12hr
4. Apply patch, clear browser cache.
5. Try step again, setting a date like '12/12/2023'. The hour:minute should be added as 23:59.
6. With TimeFormat set to 24hr try entering a date with the hour:minute like '12/12/2023 11:22'. The hour:minute should be set to 11:22.
7. With TimeFormat set to 12hr try entering a date with the hour:minute like '12/12/2023 11:22 AM'. The hour:minute should be set to 11:22 AM.
8. Play with this in as many TimeFormat and DateFormat combonatinons as you can.

Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:15:38 -04:00
b50d43c14e
Bug 34822: Process real time holds along with indexing
Current code already skips indexing when adding record to instead index in a single call. This patch pdates the code to do the same thing for real time holds queue updates.

Note: Newly added records do not need to be updated as they won't have holds yet.

To test:
1 - Have a marc file with several records that match records in your catalog
    You can export part of your catalog to generate one
2 - Set system preference:  RealTimeHoldsQueue to 'enable'
3 - Stage and import file, make sure you are matching and overlaying
4 - Go to Administration->Manage jobs
5 - Note a batch update for each updated record
6 - Apply patch
7 - Repeat
8 - Note a single job added for the entire batch containing only updated records

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-04 09:15:38 -04:00
5b9dbe558f
Bug 34689: Ignore itemnumber when creating item hash
A primary key error can be thrown when an item number is included in a new title hash. We need the item creation to ignore an itemnumber even if it is included in a MARC Framework

Test plan:
1) Edit the MARC framework relating to books (BKS in KTD)
2) In the 952$9 field (Koha itemnumber (autogenerated)), change the value of "Managed in tab" to "items (10)"
3) In the catalog, find a record that uses that MARC framework
4) Click "New" and choose to add a new item
5) Enter a barcode and click the "Add & duplicate" button
6) The page will refresh and an item will have been added
7) Enter a new barcode and click the same button again
8) An error will be thrown
9) Click the back button in the browser
10) Apply patch and restart_all
11) Click the add and duplicate button again
12) This time no error will be thrown and the page will refresh with another new item added
13) Sign off!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:15:37 -04:00
9f41a0fb97
Bug 34645: (follow-up) save sort1 and sort2 in order
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:15:36 -04:00
f3bf1f3da5
Bug 34645: always use discount, sort1, and sort2 from MarcFieldsToOrder
These values are stored at the order level, not per item. This patch simply sets the order values from the values retrieved from MarcFieldsToOrder even inf MarcItemFields to order is being used for other fields

To test:
Setup -- Set systempreferences below

MarcFieldsToOrder:
price: 949$g
quantity: 949$k
budget_code: 949$l
discount: 949$m
sort1: 949$n
sort2: 949$q

MarcItemFieldsToOrder:
homebranch: 949$a
holdingbranch: 949$b
itype: 949$y
nonpublic_note: 949$x
public_note: 949$z
loc: 949$c
ccode: 949$8
notforloan: 949$7
uri: 949$u
copyno: 949$t
price: 949$g
replacementprice: 949$v
itemcallnumber: 949$o
quantity: 949$k
budget_code: 949$l

Stage the attached bib-303.marcxml file
Add to basket from the staged file
Note that discount and sort1 and sort2 are not populated per the Marc
Apply patch, restart all
Stage and add to basket again
Confirm discount and sort1 and sort2 are populated correctly

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:15:36 -04:00
7dd57db429
Bug 34911: Test files from HEAD instead of 'master'
Since bug 34303 the test suite (when ran on jenkins) is no longer testing Perl::Critic

koha_1       | fatal: Not a valid object name master
koha_1       | [14:58:14] t/00-testcritic.t

We are not cloning the whole repo and "master" is not available. Additionally we do not want to test master's files on stable branches anyway...

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:15:35 -04:00
ca4da5e17e
Bug 34932: Patron.t - Pass borrowernumber of manager to userenv
Test plan:
Make sure that you do not have borrowr 51.
Run t/db_dependent/Koha/Patron.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:51 -04:00
1628a576c4
Bug 34967: Move to db_dependent
No further changes.

Test plan:
Run t/db_dependent/Prices.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:50 -04:00
e36b873a47
Bug 34967: Add sample biblios and tidy some lines
Test plan:
Run t/Prices.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:50 -04:00
7378865f4e
Bug 34967: Remove Test::DBIx::Class
Move everything in one subtest

Test plan:
Run t/Prices.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:49 -04:00
3b190d625b
Bug 34801: Fix incorrect use of __() in .tt and .inc files (bug 34038 follow-up)
__() should be used in .js files, not .tt files

To test, apply the patch and update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, in this case
  misc/translator/po/fr-FR-staff-prog.po
- Confirm that the strings are now in the .po file for translation. You
  should find the lines in the commit

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:48 -04:00
Jacob O'Mara
20524530c8
Bug 34917: Fix default sort column of table in suggestion.tt
Test plan:
1. Navigate to Acquisitions and load the suggestions management page
2. Ensure that there are some suggestions in the table
3. Observe that the default sort is on the "Suggester Category" column
4. Apply Patch
5. Observe that the default sort is now on the "Suggested on" column
   instead

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:48 -04:00
86628b3523
Bug 34389: Fix inconsistencies in debit types titles, breadcrumbs, and header
This patch fixes a couple of inconsistencies in the debit types
administration page, making sure the page title, breadcrumb
navigation, and page headers are consistent with each other.

To test, apply the patch and go to Administration -> Debit types. Test
each variation of the page:

- Main page
- New debit type
- Modify debit type

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-03 09:24:47 -04:00
0b2cc01ca5
Bug 34391: Fix inconsistencies in cash registers titles, breadcrumbs, and headers
Fix inconsistencies in cash register page titles, breadcrumbs, and
header

This patch fixes a couple of inconsistencies in the cash register
administration page, making sure the page title, breadcrumb
navigation, and page headers are consistent with each other.

To test, apply the patch and go to Administration -> Cash register. Test
each variation of the page:

- Main page
- New cash register
- Modify cash register

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-03 09:24:47 -04:00
David Nind
7ec0a8ae60
Bug 34942: Fix typo - 'brower' to 'browser'
This fixes a typo in a message used in the advanced cataloguing
editor when macros are converted from being stored in the browser to
being stored in the database (bug 17268 - Advanced cataloging editor
- rancor - macros are lost when browser storage cleared).

Test plan:
1. Search for 'brower' in the codebase - there should be one occurance:
   grep -rn --exclude=*.po brower *
2. Apply the patch.
3. Run the search in step 1 again, there should now be no occurances.
4. Review the diff for the patch a nd make sure that the change makes
   sense.
5. Sign off! 8-)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:46 -04:00
68e141893c
Bug 27634: Fix self_registration.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:45 -04:00
f4b47321f4
Bug 29145: DBRev 23.06.00.027
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:45 -04:00
db5e08c6a6
Bug 29145: (QA follow-up) Add +x to atomicupdate file
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:44 -04:00
855a18f8ab
Bug 29145: (QA follow-up) Fix tests removing 'unblessed'
This fixes issues with the tests caused by:
Bug 32496: Reduce unnecessary unblessings of objects in Circulation.pm

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:44 -04:00
51ec5d8a62
Bug 29145: Perltidy files and added code
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:43 -04:00
da81704cf2
Bug 29145: Replace GetDebarments in unit tests
GetDebarments was removed and replaced by $patron->restrictions.
The tests needed some adjustments to reflect that change.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:42 -04:00
388762ae0b
Bug 29145: (QA follow-up) Remove debugging line
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:42 -04:00
67bcdeed28
Bug 29145: (QA follow-up) Use objects instead of straight SQL queries
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:41 -04:00
91ecb7405e
Bug 29145: (QA follow-up) Rename has_debarring_overdues to has_restricting_overdues
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:41 -04:00
56d1ff05ff
Bug 29145: (QA follow-up) Fix typo
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:40 -04:00
David Gustafsson
12a6d4d4ba
Bug 29145: (QA follow-up) Add missing POD and don't return undef
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:39 -04:00
Katrin Fischer
0a66a4879a
Bug 29145: (QA follow-up) Fix missing bug number in database update and typos
Fixes some typos in test and update message that were highlighted
by the QA tools.

Add missing bug number to the atomic update file.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:39 -04:00
David Gustafsson
4678505e1e
Bug 29145: Fix conditions for patron debarring overdues
Signed-off-by: Michaela <michaela.sieber@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:38 -04:00
David Gustafsson
ee8ef4b174
Bug 29145: Add tests and modify sysprefs
Add tests, remove ODueDebarmentRemovalAllowUnrestricted syspref and instead
modify AutoRemoveOverduesRestrictions to have a third option

Signed-off-by: Michaela <michaela.sieber@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:38 -04:00
Stefan Berndtsson
f2d2a7839e
Bug 29145: use overdues restrict delays when removing overdues restriction upon return
How to test:
1) Run tests in t/db_dependent/Circulation/MarkIssueReturned.t

Sponsored by: Gothenburg University Library

Signed-off-by: Michaela <michaela.sieber@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:37 -04:00
f8233f44a5
Bug 34918: Fix userenv for safe_to_delete tests
Instead of the fallback to 51, we pass a borrower that has
permission for editing items.

Test plan:
Do not apply patch.
Run test without a borrower 51 in db. (FAIL)
Apply patch.
Run test again. (PASS)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 08:51:16 -04:00
3298b27985
Bug 34918: Fix hardcoded borrowernumber 42
Test plan:
Run t/db_dependent/Koha/Item.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 08:51:15 -04:00
0fb84e424e
Bug 34930: Change timezone in Koha/Object.t where tests assume it
This is the case for subtest: attributes_from_api() tests.

Test plan:
export TZ='Europe/Amsterdam'
prove t/db_dependent/Koha/Object.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 08:51:15 -04:00
6109a41ca6
Bug 34489: Fix timezone problem in Patrons.t
See also bug 34930. Using same approach.

Test plan:
export TZ='Europe/Amsterdam'
prove t/db_dependent/Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 08:51:14 -04:00
56348379ec
Bug 34934: Remove the use of event attributes from OPAC lists page
This patch removes the use of event attributes (onclick, onchange) from
the OPAC lists template. These events are defined now along with the
other in-page JS.

The patch also removes a "delete list" button which was only shown
when viewing an empty list and which was redundant.

To test, apply the patch and log into the OPAC.

- Go to Lists -> New list.
- Change the category to "Private" and the "Allow changes" dropdown to
  "Staff only."
  - You should see a message, 'The "Staff only" permission has no actual
    effect while this list is strictly private'
- Change the category to "Public." The message should disappear.

- View the contents of a list.
  - Click the "Send list" button at the top of the table of titles.
  - It should trigger the "Sending your list" popup window.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 08:51:13 -04:00
f03cf6cc10
Bug 34936: Remove the use of event attributes from OPAC detail page
This patch removes the use of event attributes (onclick) from the OPAC's
bibliographic detail page template. These events are defined now along
with the other in-page JS.

The patch also adjusts the global "Dopop" function so that the popup
window is a litte bigger. The comments form did not fit well.

In checking for use of the "Dopop" function I found that it was being
redefined in opac-topissues.tt for no reason so I removed it.

To test you must have the OPACComments system preference enabled.

- Log in to the OPAC, locate a bibliographic record, and view the detail
  page.
- Under the "Comments" tab, click the "Post your comments on this title"
  link. It should trigger a popup window.
  - Submit your comment. When the detail page reloads, return to the
    "Comments" tab and click the "Edit" link on your comment. The same
    popup window should be triggered.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 08:51:13 -04:00
Julian Maurice
ee381ca702
Bug 33074: Take ReservesControlBranch into account in opac-reserve.pl
Test plan:
1. Set system preferences:
   - Disable OPACAllowUserToChooseBranch
   - Set ReservesControlBranch to "item's home library"
   - Enable UseBranchTransferLimits
   - Set BranchTransferLimitsType to "item type"
   - Enable canreservefromotherbranches
   - Disable IndependantBranches
2. Create two libraries: ITEM_LIB and PATRON_LIB
3. Set circulation rules:
   - Remove all circulation rules (DELETE FROM circulation_rules)
   - Set a default rule that allow some holds and with "OPAC item level
     holds" = "force". Allow "on shelf" holds for easier testing.
   - In the rules for ITEM_LIB, under "Default checkout, hold and return
     policy",
     - set "Hold policy" to "From any library"
     - set "Hold pickup library match" to "item's home library"
   - In the rules for PATRON_LIB, under "Default checkout, hold and
     return policy",
     - set "Hold policy" to "From any library",
     - set "Hold pickup library match" to "any library"
4. In "Library transfer limits" disable all transfers from ITEM_LIB to
   PATRON_LIB for an item type (let's say "BOOK")
5. Create a biblio with an item:
   - item type must be the same as in previous step ("BOOK")
   - home branch and holding branch must be ITEM_LIB
6. Create a patron at PATRON_LIB, give it a password so it can log in.
7. Go to OPAC, and login with this patron
8. Try to place a hold for the new item. You should be allowed to place
   a hold, but when doing it, no holds will be created.
9. Apply patch, restart Koha
10. Try to place a hold for the new item. This time the hold should be
    created

Signed-off-by: Jessie Zairo <jzairo@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Merged tidy patch and switch to Koha::Policy::Holds here.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 08:51:12 -04:00
97307b881d
Bug 34842: Fix Illrequest/Config.t if DB upgraded twice
Not sure this is correct, but I think it is!

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 08:51:12 -04:00
4fadf73a95
Bug 34836: Add patron check to isbd and marc detail pages
Test plan:
- Go to circulation rules and set On shelf holds allowed to If all unavailable
- Log out
- Visit a MARC detail or ISBD detail bib record on OPAC:
http://localhost:8080/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=76
http://localhost:8080/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=76
- Notice it blows up with error 500, on both occasions
- Apply patch. Repeat.

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-03 08:51:11 -04:00
ea91896f15
Bug 34369: Fix 'Did you mean'
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>
2023-09-25 18:18:41 -03:00
3c6dd02acb
Bug 34369: Pass csrf token from syspref API client (for Vue app)
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>
2023-09-25 18:18:40 -03:00