Bug 38441 - ILL - Allow for a history check workflow stage
Summary: ILL - Allow for a history check workflow stage
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low new feature
Assignee: Pedro Amorim
QA Contact: Testopia
URL: https://github.com/PTFS-Europe/koha/c...
Keywords:
Depends on: 36197 37448
Blocks:
  Show dependency treegraph
 
Reported: 2024-11-14 10:49 UTC by Pedro Amorim
Modified: 2024-11-15 16:37 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 38441: New 'ILLHistoryCheck' system preference (2.76 KB, patch)
2024-11-15 16:20 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38441: atomicupdate (1.48 KB, patch)
2024-11-15 16:20 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38441: HistoryCheck Koha class (8.93 KB, patch)
2024-11-15 16:20 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38441: ILLHistoryCheck: Staff UI (7.83 KB, patch)
2024-11-15 16:20 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38441: ILLHistoryCheck: OPAC (6.20 KB, patch)
2024-11-15 16:20 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38441: Allow / render HTML in ILL staff notes (1.17 KB, patch)
2024-11-15 16:20 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38441: Style updates for staffnotes (2.60 KB, patch)
2024-11-15 16:20 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38441: Add tests (9.42 KB, patch)
2024-11-15 16:20 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2024-11-14 10:49:36 UTC
A workflow stage that performs a check on whether an ILL request being placed has already been placed in the past or not.
Comment 1 Pedro Amorim 2024-11-15 16:20:28 UTC
Created attachment 174604 [details] [review]
Bug 38441: New 'ILLHistoryCheck' system preference
Comment 2 Pedro Amorim 2024-11-15 16:20:30 UTC
Created attachment 174605 [details] [review]
Bug 38441: atomicupdate
Comment 3 Pedro Amorim 2024-11-15 16:20:32 UTC
Created attachment 174606 [details] [review]
Bug 38441: HistoryCheck Koha class
Comment 4 Pedro Amorim 2024-11-15 16:20:36 UTC
Created attachment 174607 [details] [review]
Bug 38441: ILLHistoryCheck: Staff UI
Comment 5 Pedro Amorim 2024-11-15 16:20:38 UTC
Created attachment 174608 [details] [review]
Bug 38441: ILLHistoryCheck: OPAC
Comment 6 Pedro Amorim 2024-11-15 16:20:41 UTC
Created attachment 174609 [details] [review]
Bug 38441: Allow / render HTML in ILL staff notes
Comment 7 Pedro Amorim 2024-11-15 16:20:43 UTC
Created attachment 174610 [details] [review]
Bug 38441: Style updates for staffnotes

- Use pre for staffnotes in staff illview
- Ensure <pre> has same font-family as rest of the page
- Render html for staff notes in list. Truncate to 100 chars max
Comment 8 Pedro Amorim 2024-11-15 16:20:45 UTC
Created attachment 174611 [details] [review]
Bug 38441: Add tests

Test plan:
1) Apply patches
2) Run (ignore if using a sandbox):
  $ reset_all
3) Visit ILL system preferences:
  <staff_url>/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans
4) Enable ILLModule and ILLHistoryCheck system preferences

-- STAFF testing --

5) Create a new ILL request, visit:
  <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
6) Pick type = 'Journal article', enter '123' for ISSN, '42' for cardnumber and any library. Click create.
7) Repeat 5) and 6). Notice you're now on the 'Request history check' screen. Verify your previous ILL request is listed. Click 'Submit anyway'.
8) Repeat 5) and 6). But pick a different patron cardnumber this time e.g. '23529000035676'.
9) Verify you're shown the 'Request history check' screen listing the 2 previously created requests. Click 'Submit anyway'.
10) Repeat 5 and 6). Use cardnumber '23529000035676' again.
11) Verify you're shown the 'Request history check' screen. The listing now shows the requests found for this patron first, then lists the remaining found requests for other patrons.

-- OPAC testing --

12) Place a new request through the OPAC, visit:
  <opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard
13) Pick type = 'Journal article', enter '123' for ISSN. Click 'Create'. Notice it shows the 'history check' screen listing the existing 2 requests. Click 'Submit anyway'.
14) Return to the Staff UI:
  <staff_url>/cgi-bin/koha/ill/ill-requests.pl
15) Click on the latest ILL request. Verify 'Staff notes' contain information relating to already existing ILL requests.

-- Bonus testing --
16) On the Staff UI, create a new request for cardnumber 23529000035676 with ISSN = 321
17) On the OPAC, logged in as koha:koha, place a request with ISSN = 321. Verify you don't get shown the history check but the staff notes is still added
18) Play around with ILLModuleDisclaimerByType and
    ILLOpacUnauthenticatedRequest (easy)
19) Play around with ILLCheckAvailability and AutoILLBackendPriority
    (reach out for help using these preferences)

Run tests:
$ prove t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t