Bug 30823

Summary: Recalls should use 'FILL' in action logs
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Aleisha Amohia <aleisha>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: aleisha, arthur.suzuki, caroline.cyr-la-rose, david, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Caroline Cyr La Rose Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/616
Text to go in the release notes:
This enhancement changes recall fulfillment actions to log with the FILL action, same as holds. It will also update existing recalls FULFILL actions in the database to use the FILL action.
Version(s) released in:
22.11.00, 22.05.04
Circulation function:
Bug Depends on: 19532    
Bug Blocks: 29734    
Attachments: Bug 30823: Filling recalls uses 'FILL' action in action logs
Bug 30823: Filling recalls uses 'FILL' action in action logs
Bug 30823: Filling recalls uses 'FILL' action in action logs

Description Tomás Cohen Arazi (tcohen) 2022-05-20 13:45:56 UTC
Recalls are too close to holds but the action_logs action for filling a 'recall' has been coded as FULFILL. The same thing is coded FILL for holds, they should be named the same.
Comment 1 Tomás Cohen Arazi (tcohen) 2022-05-20 13:47:02 UTC
I think this should be fixed before the release, if agreed. This way we won't need to deal with an atomicupdate for action logs.
Comment 2 Katrin Fischer 2022-05-21 18:10:31 UTC
Do they log as their own module? If so, using the same would make sense, it would also clean up the display of the log viewer to have less options.
Comment 3 Katrin Fischer 2022-05-21 18:14:53 UTC
To be a little clearer: different module, same action :)
Comment 4 Aleisha Amohia 2022-06-07 00:05:38 UTC
Created attachment 135741 [details] [review]
Bug 30823: Filling recalls uses 'FILL' action in action logs

This enhancement changes recall fulfillment actions to log with the
FILL action. It will also update existing recalls FULFILL actions in
the database to use the FILL action.

To test:
1) Enable the UseRecalls system preference and set up your
recalls-related circulation rules. Confirm RecallsLog is enabled.
2) Check out an item to Patron B.
3) Log into the OPAC as Patron A and search for the item.
4) Place a recall on that item.
5) Go back to the staff client and check the item in. Confirm the recall
as waiting for Patron A.
6) Check out the item for Patron A to fill the recall.
7) Go to Tools -> Log Viewer. Confirm there is a FULFILL action. Choose
the following search params to browse system logs:
- modules: recalls
- actions: fill
8) Submit the search and confirm the recall DOES NOT show.
9) Apply the patch, update database, restart services.
10) Refresh the log viewer and repeat step 7. Submit the search and
confirm the recall DOES show. Confirm there is no longer a FULFILL
action as both holds and recalls will use FILL.
11) Check in the item.
12) Repeat steps 2-6. We are ensuring that future recalls are logged
using the FILL action.
13) Repeat step 7. Confirm all test recalls are now showing in search
results.

Sponsored-by: Catalyst IT
Comment 5 David Nind 2022-06-07 23:27:17 UTC
I tried to test, but I'm getting lots of errors with recalls BEFORE applying the patch.

I've logged these as bug 30924
Comment 6 David Nind 2022-06-16 21:53:53 UTC
Created attachment 136212 [details] [review]
Bug 30823: Filling recalls uses 'FILL' action in action logs

This enhancement changes recall fulfillment actions to log with the
FILL action. It will also update existing recalls FULFILL actions in
the database to use the FILL action.

To test:
1) Enable the UseRecalls system preference and set up your
recalls-related circulation rules. Confirm RecallsLog is enabled.
2) Check out an item to Patron B.
3) Log into the OPAC as Patron A and search for the item.
4) Place a recall on that item.
5) Go back to the staff client and check the item in. Confirm the recall
as waiting for Patron A.
6) Check out the item for Patron A to fill the recall.
7) Go to Tools -> Log Viewer. Confirm there is a FULFILL action. Choose
the following search params to browse system logs:
- modules: recalls
- actions: fill
8) Submit the search and confirm the recall DOES NOT show.
9) Apply the patch, update database, restart services.
10) Refresh the log viewer and repeat step 7. Submit the search and
confirm the recall DOES show. Confirm there is no longer a FULFILL
action as both holds and recalls will use FILL.
11) Check in the item.
12) Repeat steps 2-6. We are ensuring that future recalls are logged
using the FILL action.
13) Repeat step 7. Confirm all test recalls are now showing in search
results.

Sponsored-by: Catalyst IT

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Kyle M Hall (khall) 2022-07-01 18:47:49 UTC
Created attachment 137037 [details] [review]
Bug 30823: Filling recalls uses 'FILL' action in action logs

This enhancement changes recall fulfillment actions to log with the
FILL action. It will also update existing recalls FULFILL actions in
the database to use the FILL action.

To test:
1) Enable the UseRecalls system preference and set up your
recalls-related circulation rules. Confirm RecallsLog is enabled.
2) Check out an item to Patron B.
3) Log into the OPAC as Patron A and search for the item.
4) Place a recall on that item.
5) Go back to the staff client and check the item in. Confirm the recall
as waiting for Patron A.
6) Check out the item for Patron A to fill the recall.
7) Go to Tools -> Log Viewer. Confirm there is a FULFILL action. Choose
the following search params to browse system logs:
- modules: recalls
- actions: fill
8) Submit the search and confirm the recall DOES NOT show.
9) Apply the patch, update database, restart services.
10) Refresh the log viewer and repeat step 7. Submit the search and
confirm the recall DOES show. Confirm there is no longer a FULFILL
action as both holds and recalls will use FILL.
11) Check in the item.
12) Repeat steps 2-6. We are ensuring that future recalls are logged
using the FILL action.
13) Repeat step 7. Confirm all test recalls are now showing in search
results.

Sponsored-by: Catalyst IT

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Tomás Cohen Arazi (tcohen) 2022-07-01 19:43:29 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 9 Lucas Gass (lukeg) 2022-08-09 21:26:40 UTC
Backported to 22.05.x for 22.05.04
Comment 10 Arthur Suzuki 2022-08-12 07:09:07 UTC
Depends on recalls. won't apply to 21.11.x