Bug 26598

Summary: Display guarantee's fines on guarantor's details page
Product: Koha Reporter: Maryse Simard <maryse.simard>
Component: PatronsAssignee: Maryse Simard <maryse.simard>
Status: ASSIGNED --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose, gmcharlt, jonathan.druart, kyle.m.hall, martin.renvoize, philippe.blouin
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Who signed the patch off: Text to go in the release notes:
Version(s) released in:
Attachments: Bug 26598: Display guarantee's fines on guarantor's details page
Bug 26598: Display guarantee's fines on guarantor's details page
Bug 26598: Display guarantee's fines on guarantor's details page

Description Maryse Simard 2020-10-02 04:17:41 UTC
Add a new tab to the details page of a patron to show, in a table, the fines of the patron's guarantees. A warning appears in the "Guarantees" section of the patron to make it obvious that fines exists.

Note: This was first introduced as part of Bug 12446, but ultimately was split into it's own bug.
Comment 1 Maryse Simard 2020-10-02 04:23:41 UTC
Created attachment 111055 [details] [review]
Bug 26598: Display guarantee's fines on guarantor's details page

A new tab is added to the details page of a patron to show, in a table, the fines of the patron's guarantees. A warning appears in the "Guarantees" section of the patron to make it obvious that fines exists.

To test:
1) Apply patch
2) Choose a patron that has guarantees and navigate to the patron's details page
3) If the guarantees don't have any fines, the display should be unchanged
4) Add fines to the guarantee
5) Go back to the guarantor's details page
    => A warning should appear in the "Guarantees" section with the total due
6) Clicking on the link accompanying the warning focuses on the new
"Guarantees' fines" tab containing a table of all guarantee's and their
fines.
Comment 2 David Nind 2020-10-06 19:25:27 UTC
Created attachment 111320 [details] [review]
Bug 26598: Display guarantee's fines on guarantor's details page

A new tab is added to the details page of a patron to show, in a table, the fines of the patron's guarantees. A warning appears in the "Guarantees" section of the patron to make it obvious that fines exists.

To test:
1) Apply patch
2) Choose a patron that has guarantees and navigate to the patron's details page
3) If the guarantees don't have any fines, the display should be unchanged
4) Add fines to the guarantee
5) Go back to the guarantor's details page
    => A warning should appear in the "Guarantees" section with the total due
6) Clicking on the link accompanying the warning focuses on the new
"Guarantees' fines" tab containing a table of all guarantee's and their
fines.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2020-10-20 14:34:17 UTC
We might want to rethink the display a little later as we are getting a lot of tabs, but I like this a lot better than the table at the top that was proposed first. Thank you Maryse for all your patience!
Comment 4 Martin Renvoize 2020-10-21 15:37:51 UTC
Created attachment 112110 [details] [review]
Bug 26598: Display guarantee's fines on guarantor's details page

A new tab is added to the details page of a patron to show, in a table, the fines of the patron's guarantees. A warning appears in the "Guarantees" section of the patron to make it obvious that fines exists.

To test:
1) Apply patch
2) Choose a patron that has guarantees and navigate to the patron's details page
3) If the guarantees don't have any fines, the display should be unchanged
4) Add fines to the guarantee
5) Go back to the guarantor's details page
    => A warning should appear in the "Guarantees" section with the total due
6) Clicking on the link accompanying the warning focuses on the new
"Guarantees' fines" tab containing a table of all guarantee's and their
fines.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2020-10-21 15:38:27 UTC
Nice enhancement, works as expected and code is clear.

Passing QA
Comment 6 Jonathan Druart 2020-11-04 09:04:44 UTC
1. I think you should call Koha::Patron->relationships_debt to get the guarantees' fines

2. Why did you put the new tab between "checkouts" and "holds"? I don't think it's the more appropriate. Maybe just before "Restrictions"?