Bug 33990 - Fix 'Recalls awaiting pickup' report if there are recalls waiting a problematic number of days
Summary: Fix 'Recalls awaiting pickup' report if there are recalls waiting a problemat...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Aleisha Amohia
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 19532
Blocks: 33992
  Show dependency treegraph
 
Reported: 2023-06-13 04:01 UTC by Aleisha Amohia
Modified: 2024-07-04 20:37 UTC (History)
3 users (show)

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


Attachments
Bug 33990: Correctly access subtitle for Recalls awaiting pickup report (2.72 KB, patch)
2023-06-13 04:07 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 33990: Correctly access subtitle for Recalls awaiting pickup report (2.76 KB, patch)
2023-06-13 16:24 UTC, Sam Lau
Details | Diff | Splinter Review
Bug 33990: Correctly access subtitle for Recalls awaiting pickup report (2.81 KB, patch)
2023-06-22 21:44 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2023-06-13 04:01:37 UTC
The Recalls awaiting pickup report blows up if a recall has been waiting a problematic number of days for pickup. This is based on the RecallsMaxPickUpDelay system preference.

To reproduce:

1. Enable UseRecalls syspref and set the relevant circulation and fines rules to configure recalls
2. Set the RecallsMaxPickUpDelay to 1 day
3. Check out Item A to Patron A
4. Log into the OPAC as Patron B
5. Search for Item A and place a recall
6. Log back into the staff interface and check in Item A
7. Confirm the recall as waiting for Patron B
8. Go to Circulation -> Recalls awaiting pickup
9. Confirm your recall exists under the 'Recalls waiting' tab
10. Change the waiting_date in the database for this recall to a few days ago so we would expect to see it under the 'Recalls waiting over 1 days' tab

sudo koha-mysql INSTANCE
select * from recalls; # to get the recall_id
update recalls set waiting_date = "2023-06-10 03:54:21" where recall_id = X;

11. Refresh the Circulation -> Recalls awaiting pickup page
12. Confirm the page blows up and there is an error
Comment 1 Aleisha Amohia 2023-06-13 04:07:00 UTC
Created attachment 152286 [details] [review]
Bug 33990: Correctly access subtitle for Recalls awaiting pickup report

This patch fixes how the bibliographic record's subtitle is fetched to prevent the page from exploding when viewing the recalls awaiting pickup for a problematic number of days.

To test:

1. Enable UseRecalls syspref and set the relevant circulation and fines rules to configure recalls
2. Set the RecallsMaxPickUpDelay to 1 day
3. Check out Item A to Patron A
4. Log into the OPAC as Patron B
5. Search for Item A and place a recall
6. Log back into the staff interface and check in Item A
7. Confirm the recall as waiting for Patron B
8. Go to Circulation -> Recalls awaiting pickup
9. Confirm your recall exists under the 'Recalls waiting' tab
10. Change the waiting_date in the database for this recall to a few days ago so we would expect to see it under the 'Recalls waiting over 1 days' tab

sudo koha-mysql INSTANCE
select * from recalls; # to get the recall_id
update recalls set waiting_date = "2023-06-10 03:54:21" where recall_id = X;

11. Refresh the Circulation -> Recalls awaiting pickup page
12. Confirm the page blows up and there is an error

13. Apply the patch and refresh the page

14. Confirm the page loads successfully and your recall is showing as expected under the 'Recalls waiting over 1 days' tab
15. Confirm the subtitle (probably in 245$b) shows as expected

Sponsored-by: Auckland University of Technology
Comment 2 Sam Lau 2023-06-13 16:24:54 UTC
Created attachment 152311 [details] [review]
Bug 33990: Correctly access subtitle for Recalls awaiting pickup report

This patch fixes how the bibliographic record's subtitle is fetched to prevent the page from exploding when viewing the recalls awaiting pickup for a problematic number of days.

To test:

1. Enable UseRecalls syspref and set the relevant circulation and fines rules to configure recalls
2. Set the RecallsMaxPickUpDelay to 1 day
3. Check out Item A to Patron A
4. Log into the OPAC as Patron B
5. Search for Item A and place a recall
6. Log back into the staff interface and check in Item A
7. Confirm the recall as waiting for Patron B
8. Go to Circulation -> Recalls awaiting pickup
9. Confirm your recall exists under the 'Recalls waiting' tab
10. Change the waiting_date in the database for this recall to a few days ago so we would expect to see it under the 'Recalls waiting over 1 days' tab

sudo koha-mysql INSTANCE
select * from recalls; # to get the recall_id
update recalls set waiting_date = "2023-06-10 03:54:21" where recall_id = X;

11. Refresh the Circulation -> Recalls awaiting pickup page
12. Confirm the page blows up and there is an error

13. Apply the patch and refresh the page

14. Confirm the page loads successfully and your recall is showing as expected under the 'Recalls waiting over 1 days' tab
15. Confirm the subtitle (probably in 245$b) shows as expected

Sponsored-by: Auckland University of Technology
Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 3 Katrin Fischer 2023-06-22 21:44:28 UTC
Created attachment 152602 [details] [review]
Bug 33990: Correctly access subtitle for Recalls awaiting pickup report

This patch fixes how the bibliographic record's subtitle is fetched to prevent the page from exploding when viewing the recalls awaiting pickup for a problematic number of days.

To test:

1. Enable UseRecalls syspref and set the relevant circulation and fines rules to configure recalls
2. Set the RecallsMaxPickUpDelay to 1 day
3. Check out Item A to Patron A
4. Log into the OPAC as Patron B
5. Search for Item A and place a recall
6. Log back into the staff interface and check in Item A
7. Confirm the recall as waiting for Patron B
8. Go to Circulation -> Recalls awaiting pickup
9. Confirm your recall exists under the 'Recalls waiting' tab
10. Change the waiting_date in the database for this recall to a few days ago so we would expect to see it under the 'Recalls waiting over 1 days' tab

sudo koha-mysql INSTANCE
select * from recalls; # to get the recall_id
update recalls set waiting_date = "2023-06-10 03:54:21" where recall_id = X;

11. Refresh the Circulation -> Recalls awaiting pickup page
12. Confirm the page blows up and there is an error

13. Apply the patch and refresh the page

14. Confirm the page loads successfully and your recall is showing as expected under the 'Recalls waiting over 1 days' tab
15. Confirm the subtitle (probably in 245$b) shows as expected

Sponsored-by: Auckland University of Technology
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Tomás Cohen Arazi (tcohen) 2023-07-06 15:08:55 UTC
Hi, I'm sorry but the last template refactorings we've made to the codebase have this not apply. Please rebase and I'll make sure it gets pushed with high priority.

Thanks
Comment 5 Aleisha Amohia 2023-07-10 03:07:41 UTC
This patch is no longer needed, bug is fixed upstream