Bug 12132

Summary: Show guarantees in staff patron details too
Product: Koha Reporter: paxed <pasi.kallinen>
Component: Staff interfaceAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: f.demians, gmcharlt, katrin.fischer, kyle, nick, tomascohen, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Show guarantees in staff patron details too
[Signed-off] Show guarantees for staff patron details too. Staffers are adult borrowers.
[PASSED QA] Show guarantees for staff patron details too. Staffers are adult borrowers.
[COUNTER-PATCH] Bug 12132: display guarantees if a patron has them, regardless of category type
[SIGNED-OFF] Bug 12132: display guarantees if a patron has them, regardless of category type
[PASSED QA] Bug 12132: display guarantees if a patron has them, regardless of category type

Description paxed 2014-04-24 05:58:37 UTC Comment hidden (obsolete)
Comment 1 Katrin Fischer 2014-04-24 06:00:40 UTC
I think that's because patrons with the staff category are not supposed to have children currently - I think this probably needs more than a display fix. Would also require changing documentation etc.

We favor that the staff account should not be identical with the personal account for a staff member, so keep it separate.

But there is bug 6922
Comment 2 Katrin Fischer 2014-04-24 06:01:41 UTC
I think one of the things to check is that you can actually search for a guarantor that is a staff member - if you do it the other way around and create a 'child' first and then link it to the 'adult'.
Comment 3 paxed 2014-04-24 06:34:02 UTC
(In reply to Katrin Fischer from comment #2)
> I think one of the things to check is that you can actually search for a
> guarantor that is a staff member - if you do it the other way around and
> create a 'child' first and then link it to the 'adult'.

Yes, you can.
Comment 4 paxed 2014-04-24 06:38:49 UTC
(In reply to Katrin Fischer from comment #1)
> I think that's because patrons with the staff category are not supposed to
> have children currently - I think this probably needs more than a display
> fix. Would also require changing documentation etc.
> 
> We favor that the staff account should not be identical with the personal
> account for a staff member, so keep it separate.
> 
> But there is bug 6922

The current behaviour is completely inconsistent: Change a patron's type from adult to staff, and their guarantees aren't showing up in the patron details.
If the patron has guarantees, those should be shown, no matter what the patron's type is.

If you use separate accounts for staff use and personal use, then your staff account shouldn't have the guarantees. But some other places might not do that kind of separation.
Comment 5 paxed 2014-04-29 07:04:21 UTC
To test:

1) Look at a staffer's detail page. Even if he or she has guarantees, they won't show up there.
2) Install patch
3) Look at a staffer's detail page. If the staffer has guarantees, they will be shown.
Comment 6 Marc Véron 2014-04-29 11:51:41 UTC
This bug has a working patch but has status "NEW". Change status to "Needs signoff".
Comment 7 Marc Véron 2014-04-29 11:55:30 UTC Comment hidden (obsolete)
Comment 8 Kyle M Hall 2014-05-16 11:23:16 UTC Comment hidden (obsolete)
Comment 9 Galen Charlton 2014-05-26 03:16:28 UTC Comment hidden (obsolete)
Comment 10 Galen Charlton 2014-05-26 03:17:05 UTC
(In reply to paxed from comment #4)
> If the patron has guarantees, those should be shown, no matter what the
> patron's type is.

That is reasonable.  The submitted patch, however, does not actually do this; I have attached a counter-patch that does.
Comment 11 Frédéric Demians 2014-10-27 11:19:12 UTC Comment hidden (obsolete)
Comment 12 Frédéric Demians 2014-10-27 11:21:20 UTC
Just hope switching bug status directly from In discussion to Signed-off doesn't violate any rule.
Comment 13 Katrin Fischer 2014-10-27 19:44:12 UTC
Created attachment 32805 [details] [review]
[PASSED QA] Bug 12132: display guarantees if a patron has them, regardless of category type

If a patron has guarantees, always display them on the patron summary,
even if the patron is of a type that ordinarily would have them.

For example, at present you can cannot directly add a guarantee to
a staff record the way you can do for an adult patron, but if you create
a juvenile patron and add a guarantor to it, you can override that
restriction.  Note that this patch ignores whether that is strictly
desirable behavior.

To test:

[1] Create a juvenile patron.  While editing it, make a staff
    account a guarantor of the new patron.
[2] View patron details for the staff account.  Note that the
    juvenile patron is not displayed as a guarantee.
[3] Apply this patch.
[4] Refresh details for the staff account.  The juvenile should
    now show up.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Frederic Demians <f.demians@tamil.fr>

Galen patch works as described. The way it's implemented seems sensible.
Whatever the reason why a patron has guarantes, it make sense to display
them. So it's better to check the count of guarantes rather than the
current patron type to decide to display guarantes.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, small change, no regressions found.
Comment 14 Tomás Cohen Arazi 2014-11-19 16:35:30 UTC
Patch pushed to master.

Thanks, Galen!