Main Koha release repository https://koha-community.org
Find a file
Hammat Wele 5b5b661cc7 Bug 30846: 'If any unavailable' doesn't consider negative notforlan values as unavailable
When we set up a circulation rule where 'On shelf holds allowed' is 'If any unavailable' and we have a record with one 'Ordered' item, we cannot place this item on hold.

This patch allows placing hold on item with negative not for loan values, when using rule with 'On shelf holds allowed' set to 'If any unavailable'

To test:

1. Set up a circulation rule where on shelf holds are not allowed and force the choosing of an item (to facilitate the test)
    1.1. Go to Administration > Circulation and fines rules
    1.2. In the matrix, add a circulation like this
          - Patron category: All
          - Item type: Books
          - Current checkouts allowed: 10
          - Current on-site checkouts allowed: 10
          - Loan period: 21
          - Holds allowed (total): 10
          - Holds allowed (daily): 10
          - Holds per record (count): 10
          - On shelf holds allowed: If any unavailable
          - OPAC item level holds: Force
    1.3. Click Save
2. Create a record with one 'Ordered' item (or any negative value not for loan status)
    2.1. Go to Cataloging
    2.2. Click New record
    2.3. Fill out the mandatory fields (by default in MARC21: 000, 003, 005, 008,  040, 245, and 942 (942 should be set to Books))
    2.4. Click Save
    2.5. Fill out the following item fields
          - Not for loan: Ordered
          - Koha item type: Books
    2.6. Click Add item
    2.7. Click Normal to go to the detailed record
3. Try to place a hold on the 'Ordered' item
    3.1. From the detailed record, click OPAC view: Open in new window.
    --> Note that the 'Place hold' option is not present
4. Add a second 'Available' item
    4.1. Back in the staff interface tab with the detailed record, click New > New item
    4.2. Make sure the item type is set to Books
    4.3. Add a barcode in p
    4.4. Click Add item
5. Try again to place a hold on the 'Ordered' item
    5.1. Go back to the OPAC tab and refresh the page
    --> Note that the 'Place hold' option is still not present
6. Check out the available item to a patron
    6.1. In the staff interface tab, copy the barcode from the available item
    6.2. Go to Patrons
    6.3. Click on Search
    6.4. Click Check out next to one of the patrons
    6.5. Paste the barcode in the box and click Check out
7. Try again to place a hold on the 'Ordered' item
    7.1. Go back to the OPAC tab and refresh the page
    --> Note that the 'Place hold' option is now present
    7.2. Click Place hold
    --> Note that only the checked out item is available to place on hold, if you click Show unholdable items, it will show the Ordered item, but you can't place a hold on it.
8. Apply the patch
9. Go to the OPAC tab and click on the book title right next to 'Place a hold on' checkbox to go back to the record details.
        --> Note that the 'Place hold' option is still present
        9.1. Click Place hold
        --> Note that you can now place a hold on the 'Checked out' or the 'Ordered' item.
10. Check in the item to make it available again
    10.1. In the staff interface tab, click on 'Show checkouts' button
    10.2. Select the Checked out item and click on 'Renew or check in selected items' button.
11. Try again to place a hold on the 'Ordered' item
    11.1. Go back to the OPAC tab and click on the book title right next to 'Place a hold on' checkbox to go back to the record details.
    --> Note that the 'Place hold' option is still present
    11.2. Click Place hold
    --> Note that only the 'Ordered' item is available to place on hold, if you click Show unholdable items, it will show the Available item and you can't place a hold on it.
12. Delete the available item to keep only the Ordered item
    12.1 in the staff interface tab, click on 'Search catalog' and search for the record
    12.2 click on 'Edit' then 'Edit items'
    12.3 Delete the available item
13. Try to place a hold on the remain 'Ordered' item
    13.1 Go back to the OPAC tab and click on the book title right next to 'Place a hold on' checkbox to go back to the record details.
        --> Note that the 'Place hold' option is present
    13.2. Click Place hold
    --> Note that you can place a hold on the Ordered item.

Signed-off-by: Amaury GAU <amaury.gau@bulac.fr>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a09a926458)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e1d7b41822)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-28 10:17:10 +00:00
acqui Bug 34469: Block editing for received order lines 2023-08-18 13:38:16 +00:00
admin Bug 32271: (QA follow-up) Convert all positive numbers to monetary float and convert all 0 equivilents to blank value 2023-08-18 10:36:00 +00:00
api Bug 32739: Allow other patron identifier on pwd validation 2023-08-28 10:07:15 +00:00
authorities Bug 33803: Remove comment about tab width 2023-06-12 10:28:26 +00:00
basket Bug 33102: Display fields from biblioitems in OPAC/staff interface cart 2023-05-12 16:34:19 +01:00
bin
C4 Bug 30846: 'If any unavailable' doesn't consider negative notforlan values as unavailable 2023-08-28 10:17:10 +00:00
catalogue Bug 33167: (RMAINT fix) Revert 33167 2023-07-20 08:41:00 +00:00
cataloguing Bug 34288: Allow access to the cataloguing module with tools permission 2023-07-19 10:14:21 +00:00
circ Bug 34094: Use DefaultPatronSearchMethod consistently 2023-07-18 13:11:38 +00:00
clubs Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
course_reserves Bug 31893: Use checkauth and do not fetch about.tt template 2023-01-31 14:09:05 +00:00
debian Bug 28493: Make koha-passwd display the username 2023-08-18 10:38:41 +00:00
docs Bug 33899: Add the 23.11 release team 2023-07-12 09:36:01 +00:00
erm Bug 32922: Remove space in shebang 2023-02-24 07:51:37 +00:00
errors
etc Bug 24517: Add missing 6th position to date-entered-on-file index 2023-07-18 10:47:02 +00:00
ill Bug 28909: Allow illview to use backend template 2022-08-09 13:21:39 -03:00
installer Bug 30451: DBRev 22.11.08.002 2023-08-18 14:21:11 +00:00
Koha Bug 32739: (follow-up) QA Cleanup 2023-08-28 10:07:15 +00:00
koha-tmpl Bug 34289: Add missing class to one condition of the checkin template 2023-08-28 10:08:12 +00:00
labels Bug 31633: (follow-up) Group template params 2022-10-03 14:09:59 -03:00
lib/CGI/Session/Serialize
members Bug 22990: Add CSRF protection to boraccount, pay and suggestion 2023-07-28 11:14:30 +00:00
misc Bug 34470: Initialize random seed after spawning a child worker process 2023-08-18 13:31:45 +00:00
offline_circ Bug 30016: Remove GetOpenIssue subroutine 2022-08-31 08:50:37 -03:00
opac Bug 30846: 'If any unavailable' doesn't consider negative notforlan values as unavailable 2023-08-28 10:17:10 +00:00
patron_lists
patroncards
plugins Bug 30367: (follow-up) Same adjustment for gitlab 2023-05-12 15:58:09 +01:00
pos Bug 30619: Add email receipt to POS 2022-09-07 15:59:34 -07:00
recalls Bug 34013: Recalls awaiting pickup doesn't show count on each tab 2023-07-18 11:21:31 +00:00
reports Bug 29664: (QA follow-up) Typo transacton 2023-07-18 13:11:38 +00:00
reserve Bug 30687: Allow pickup location to be forced when override is allowed 2023-05-15 13:01:46 +00:00
reviews
rotating_collections
serials Bug 34146: Counterpart for serials-edit 2023-07-18 13:11:36 +00:00
services
skel
suggestion Bug 22990: (follow-up) Fix suggestion.pl 2023-07-28 11:14:54 +00:00
svc Bug 33944: Don't fetch item object unless using recalls 2023-07-18 11:11:10 +00:00
t Bug 32739: Allow other patron identifier on pwd validation 2023-08-28 10:07:15 +00:00
tags Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
tools Bug 33755: Set profile_id and add missing import 2023-08-18 13:50:43 +00:00
virtualshelves Bug 22990: Fix for shelves table 2023-07-28 11:14:36 +00:00
xt Bug 30002: Remove unused xt/perltidyrc 2023-07-12 09:16:19 +00:00
.editorconfig
.eslintrc.json
.gitignore Bug 33710: Ignore how-to related files 2023-05-15 13:03:55 +00:00
.htaccess
.mailmap Update .mailmap 2023-07-18 09:22:47 +00:00
.perlcriticrc
.perltidyrc Bug 30002: Adjust perltidy 2023-07-12 09:16:19 +00:00
.proverc.dist
.stylelintrc.json Bug 31528: (follow-up) A few additional rules 2022-10-03 08:23:15 -03:00
about.pl Bug 33934: Add more detail to 'No encryption_key in koha-conf.xml' 2023-06-12 11:53:36 +00:00
app.psgi
build-resources.PL Bug 32609: Use the current yarn.lock to generate node_modules 2023-03-10 12:27:47 +00:00
changelanguage.pl
cpanfile Bug 32558: (QA follow-up) Move ForkManager to required 2023-03-08 14:39:16 +00:00
cypress.json Bug 33408: Extend defaultCommandTimeout for cypress 2023-05-15 13:15:43 +00:00
fix-perl-path.PL
gulpfile.js Bug 32609: Improve yarn build commands 2023-03-10 12:27:27 +00:00
help.pl
INSTALL
Koha.pm Bug 30451: DBRev 22.11.08.002 2023-08-18 14:21:11 +00:00
koha_perl_deps.pl
kohaversion.pl
LICENSE
mainpage.pl Bug 33133: Add fast cataloging to 'Cataloging' page 2023-04-11 10:51:27 +00:00
Makefile.PL Bug 30002: (QA follow-up) Add .perltidyrc to Makefile.PL mapping 2023-07-12 09:41:28 +00:00
MANIFEST.SKIP
package.json Bug 33066: Introduce a KohaTable Vue component 2023-05-11 17:01:22 +01:00
README
README.md
README.robots
rewrite-config.PL
tsconfig.json Bug 32030: Move cypress to t - fix build_js/watch_js 2022-11-08 09:44:52 -03:00
webpack.config.js Bug 32806: Move main-erm.ts to modules/erm.ts 2023-02-28 18:54:57 +00:00
yarn.lock Bug 33066: Introduce a KohaTable Vue component 2023-05-11 17:01:22 +01:00

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo