Bug 6964

Summary: 'Add child' function should be dependant on system preference 'borrowerRelationship'
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: TemplatesAssignee: Aleksa Vujicic <aleksa>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: m.de.rooy, paul.poulain
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: The 'Add Child' button is not shown if 'borrowerRelationship' is empty. System preference description also changed.
[SIGNED-OFF] Bug 6964 - 'Add child' function should be dependant on system preference 'borrowerRelationship'
Followup for typo on borrowernumber
Follow-up fixing typo

Description Katrin Fischer 2011-10-04 13:11:00 UTC
In academic libraries the features to 'Add childs' is not used and the button in patron account causes confusion.

I suggest to check if the system preference 'borrowerRelationship' is not empty to decide if the button is shown or not. 
The description of the system preference could be amended to say 'Leave empty to deactivate'.
Comment 1 Aleksa Vujicic 2012-01-24 00:55:07 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2012-01-24 14:45:58 UTC Comment hidden (obsolete)
Comment 3 Paul Poulain 2012-02-02 10:43:44 UTC
QA comment:
* tiny patch, nothing to say about the code, it's OK
* I think it's an ENH, that could surprise some libraries. Changing the severity & version to have it for 3.8
Comment 4 Marcel de Rooy 2012-02-03 07:47:05 UTC
Note that a follow-up fixed missing comma after total_due:

diff --git a/members/paycollect.pl b/members/paycollect.pl
index cbddc05..e05a5a6 100755
--- a/members/paycollect.pl
+++ b/members/paycollect.pl
@@ -138,6 +138,7 @@ $template->param(
     borrowenumber => $borrowernumber,    # some templates require global
     borrower      => $borrower,
     total         => $total_due
+	activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
 );

As Paul noted in commit: Seems everybody forgot to test paycollect, as there was a syntax error!
Comment 5 Marcel de Rooy 2012-02-03 07:54:31 UTC Comment hidden (obsolete)
Comment 6 Marcel de Rooy 2012-02-03 07:58:10 UTC
Created attachment 7431 [details] [review]
Follow-up fixing typo

Second try to add attachment..