Bug 26598 - Display guarantee's fines on guarantor's details page
Summary: Display guarantee's fines on guarantor's details page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Shi Yao Wang
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on:
Blocks: 33774
  Show dependency treegraph
 
Reported: 2020-10-02 04:17 UTC by Maryse Simard
Modified: 2023-12-28 20:43 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/693
Text to go in the release notes:
This enhancement adds a new tab in the patron details page to show guarantees' unpaid charges.
Version(s) released in:
23.05.00
Circulation function:


Attachments
Bug 26598: Display guarantee's fines on guarantor's details page (6.40 KB, patch)
2020-10-02 04:23 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 26598: Display guarantee's fines on guarantor's details page (6.46 KB, patch)
2020-10-06 19:25 UTC, David Nind
Details | Diff | Splinter Review
Bug 26598: Display guarantee's fines on guarantor's details page (6.51 KB, patch)
2020-10-21 15:37 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26598: Display guarantee's fines on guarantor's details page (6.61 KB, patch)
2022-08-24 13:00 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 26598: Display guarantee's fines on guarantor's details page (6.40 KB, patch)
2022-09-09 15:20 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 26598: Display guarantee's fines on guarantor's details page (7.03 KB, patch)
2022-10-25 20:35 UTC, geraud.frappier
Details | Diff | Splinter Review
Bug 26598: Display guarantee's fines on guarantor's details page (7.08 KB, patch)
2022-11-21 12:46 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 26598: Display guarantee's fines on guarantor's details page (7.14 KB, patch)
2022-12-16 17:58 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 26598: (QA follow-up) Fix up tab for guarantees' charges (3.16 KB, patch)
2022-12-16 17:58 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 33774: Loading club table in every tab in patron details (1.53 KB, patch)
2023-05-20 01:57 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 (ashimema) 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 (ashimema) 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"?
Comment 7 Caroline Cyr La Rose 2022-03-21 14:36:37 UTC
(In reply to Jonathan Druart from comment #6)

> 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"?

Not that I want to get in the middle of the fire here, but I noticed the new tab is right next to the patron's own charge tab. I don't think it would be appropriate to separate the charges tab and the guarantee's charges tab, just like we didn't separate the patron's own checkout tab and the relative's checkout tab and put the latter before the patron's own holds tab.

Anyway, just my grain of salt, I don't think the placement of the tab is a problem that should stall this bug. (I don't comment on the other thing about Koha::something bc I don't know what it means.)

Caroline
Comment 8 Shi Yao Wang 2022-08-24 13:00:38 UTC
Created attachment 139712 [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 9 Owen Leonard 2022-09-02 18:08:05 UTC
This change must be made to both the patron detail page (moremember) and the checkout page (circulation).

Since the guarantees' checkouts tab is labeled "Relatives' checkouts" I think the new tab should be labeled "Relatives' charges".

I would also like to see the format of the patron name under the new tab look the same as under the relatives' checkouts tab, i.e. "surname, firstname (cardnumber)". The patron-title.inc include file might be appropriate to use here.
Comment 10 Shi Yao Wang 2022-09-09 15:20:57 UTC
Created attachment 140376 [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 11 Shi Yao Wang 2022-09-09 15:30:31 UTC
(In reply to Owen Leonard from comment #9)
> This change must be made to both the patron detail page (moremember) and the
> checkout page (circulation).
> 
> Since the guarantees' checkouts tab is labeled "Relatives' checkouts" I
> think the new tab should be labeled "Relatives' charges".
> 
> I would also like to see the format of the patron name under the new tab
> look the same as under the relatives' checkouts tab, i.e. "surname,
> firstname (cardnumber)". The patron-title.inc include file might be
> appropriate to use here.

The patron checkout page does not have fines tab so it would be weird to add guarantees' fines tab there.

"Relatives' checkouts" tab can be accessed by both the guarantee and the guarantor to view each others checkouts. "Guarantees' charges" tab can only be viewed by the guarantor so it would be more accurate to keep the name as it is.

Changed the format to make it the same as relatives' checkouts tab.
Comment 12 Lisette Scheer 2022-09-23 14:12:46 UTC
(In reply to Shi Yao Wang from comment #11)
> (In reply to Owen Leonard from comment #9)
> > This change must be made to both the patron detail page (moremember) and the
> > checkout page (circulation).
> > 
> > Since the guarantees' checkouts tab is labeled "Relatives' checkouts" I
> > think the new tab should be labeled "Relatives' charges".
> > 
> > I would also like to see the format of the patron name under the new tab
> > look the same as under the relatives' checkouts tab, i.e. "surname,
> > firstname (cardnumber)". The patron-title.inc include file might be
> > appropriate to use here.
> 
> The patron checkout page does not have fines tab so it would be weird to add
> guarantees' fines tab there.
> 
> "Relatives' checkouts" tab can be accessed by both the guarantee and the
> guarantor to view each others checkouts. "Guarantees' charges" tab can only
> be viewed by the guarantor so it would be more accurate to keep the name as
> it is.
> 
> Changed the format to make it the same as relatives' checkouts tab.

Maybe instead of as a tab it could be an alert under messages like it is when the patron has fines? Additionally Surname, Firstname (cardnumber) is more consisent, especially since there is a system preferences that asks if name should be shown or only patron barcode, which I believe looks at he patron-title.inc include file.
Comment 13 geraud.frappier 2022-10-25 20:35:17 UTC
Created attachment 142655 [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.

+ resolve a git merge conflict

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 14 Hammat wele 2022-11-21 12:46:53 UTC
Created attachment 144110 [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.

+ resolve a git merge conflict

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>
Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>
Comment 15 Kyle M Hall (khall) 2022-12-16 17:47:05 UTC
The new guarantee's charges table is showing up on every tab.
Comment 16 Kyle M Hall (khall) 2022-12-16 17:58:10 UTC
Created attachment 144696 [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.

+ resolve a git merge conflict

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>
Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 17 Kyle M Hall (khall) 2022-12-16 17:58:26 UTC
Created attachment 144697 [details] [review]
Bug 26598: (QA follow-up) Fix up tab for guarantees' charges

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 18 Tomás Cohen Arazi (tcohen) 2023-04-06 13:03:51 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 19 Jacob O'Mara 2023-04-17 07:20:26 UTC
Enhancement - not backporting to 22.11.x

Nice work everyone!
Comment 20 Victor Grousset/tuxayo 2023-05-20 01:57:32 UTC Comment hidden (obsolete)
Comment 21 Victor Grousset/tuxayo 2023-05-20 01:59:11 UTC Comment hidden (obsolete)