Bug 17436

Summary: Add a way to know in patron module where renew of an item was made
Product: Koha Reporter: Marjorie Barry-Vila <marjorie.barry-vila>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, josef.moravec, kyle.m.hall, martin.renvoize, patrick.robitaille, sally.healey
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 23838    
Bug Blocks:    
Attachments: number of renewals
Bug 17436: Add 'renewals' API route
Bug 17436: Add renewals modal
Bug 17436: Add 'renewals' API route
Bug 17436: Add renewals modal

Description Marjorie Barry-Vila 2016-10-12 15:19:31 UTC
Created attachment 56297 [details]
number of renewals

Hi,
In statistic's table, we have possibility to know where a renew was made (opacrenew in sys pref OpacRenewalBranch).

It will be great to see this information on patron page in circulation history maybe? Number of renewals column? a number for opacrenew and a number for librarian interface.

Regards,

Marjorie
Comment 1 Andrew Isherwood 2019-10-18 08:06:15 UTC
Created attachment 94390 [details] [review]
Bug 17436: Add 'renewals' API route

This patch adds a /patrons/x/renewals API GET route which returns a patron's
renewals, optionally filtered by item_id. Tests are also included
Comment 2 Andrew Isherwood 2019-10-18 08:06:20 UTC
Created attachment 94391 [details] [review]
Bug 17436: Add renewals modal

This patch adds the display of the renewals modal when appropriate. A
"View" link is displayed next to renewals that have logs associated with
them. Clicking the link opens the modal that displays the logged
renewals.
Comment 3 Andrew Isherwood 2019-10-18 08:07:53 UTC
Created attachment 94392 [details] [review]
Bug 17436: Add 'renewals' API route

This patch adds a /patrons/x/renewals API GET route which returns a patron's
renewals, optionally filtered by item_id. Tests are also included

Sponsored-by: Loughborough University
Comment 4 Andrew Isherwood 2019-10-18 08:07:56 UTC
Created attachment 94393 [details] [review]
Bug 17436: Add renewals modal

This patch adds the display of the renewals modal when appropriate. A
"View" link is displayed next to renewals that have logs associated with
them. Clicking the link opens the modal that displays the logged
renewals.
Comment 5 Andrew Isherwood 2019-10-18 08:08:26 UTC
Test plan
---------

- Apply the patch
- Navigate to Koha administration and locate the "RenewalLog" syspref
- Ensure the syspref is initially set to "Don't log"
- Navigate to Patrons
- Find a patron with at least one loan, or loan an item to a patron
- Renew an item that is on loan, feel free to do this a few times
- Click "Circulation history"
- TEST: Observe that the item renewal count is displayed but it is not possible to view details of the renewals
- Navigate to Koha administration and locate the "RenewalLog" syspref
- Set the syspref to "Log"
- Return to the patron's loans
- Renew the item a few more times
- Click "Circulation history"
- TEST: Note that the renewal count has increased appropriately, and there is now a "View" link
- Click the "View" link
- TEST: Observe that an "Item renewals" modal appears containing details of the renewals
- TEST: Observe that, since not all renewals were logged, information about what proportion of renewals were logged is displayed
Comment 6 Andrew Isherwood 2019-10-18 08:11:13 UTC
Ignore those patches and the test plan. I just realised there's something missing. Apologies!
Comment 7 Andrew Isherwood 2019-10-18 08:56:49 UTC
It turns out that the development I have carried out for our customer, although similar to the requirements specified in this bug, has more basic requirements. Our customer simply wants to be able to click a link next to the renewal count and view details of renewal date and who the renewal was carried out by, all of which is currently recorded when the RenewalLog syspref is enabled.

The requirements specified in this bug would require more work as the information they wish to display is not currently recorded.

Consequently, I have create a new bug (Bug 23838) where I will attach the patches and test plan for the work I have done. Hopefully that work will ease the path for whoever tackles this bug. I will make this bug dependent on 23838.

Apologies for the confusion!
Comment 8 Martin Renvoize 2022-08-05 10:16:05 UTC
I think with the subsequent work on bug 23838 and friends this is probably fully covered..