[Bug 14324] New: "Add Child" button missing on moremember.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 Bug ID: 14324 Summary: "Add Child" button missing on moremember.pl Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: barton@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com The code which adds the "Add child" button is in koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc at line 151: 149 [% IF ( CAN_user_borrowers ) %] 150 [% IF ( adultborrower AND activeBorrowerRelationship ) %] 151 <a id="addchild" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=add&guarantorid=[% borrowernumber %]&category_type=C"><i class="icon-plus"></i> Add child</a> 152 [% END %] 153 [% IF ( CAN_user_borrowers ) %] 154 <a id="changepassword" class="btn btn-small" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]"><i class="icon-lock"></i> Change password</a> 155 [% END %] 156 <a id="duplicate" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&borrowernumber=[% borrowernumber %]&category_type=[% category_type %]"><i class="icon-copy"></i>Duplicate</a> 157 [% END %] I added code to dump CAN_user_borrowers, adultborrower and activeBorrowerRelationship, and found that adultborrower was not set, even for a borrower whose borrower's category type is 'A'. 'adultborrower' is set in moremember.pl at line 192, but *only if $count returned by GetGuarantees is not 0*. 172 my ( $count, $guarantees ) = GetGuarantees( $data->{'borrowernumber'} ); 173 if ( $count ) { 174 $template->param( isguarantee => 1 ); 175 176 # FIXME 177 # It looks like the $i is only being returned to handle walking through 178 # the array, which is probably better done as a foreach loop. 179 # 180 my @guaranteedata; 181 for ( my $i = 0 ; $i < $count ; $i++ ) { 182 push(@guaranteedata, 183 { 184 borrowernumber => $guarantees->[$i]->{'borrowernumber'}, 185 cardnumber => $guarantees->[$i]->{'cardnumber'}, 186 name => $guarantees->[$i]->{'firstname'} . " " 187 . $guarantees->[$i]->{'surname'} 188 } 189 ); 190 } 191 $template->param( guaranteeloop => \@guaranteedata ); 192 ( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' || $category_type eq 'I' ); 193 } In other words, you can't add children unless you already have children. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |barton@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 --- Comment #1 from Barton Chittenden <barton@bywatersolutions.com> --- Created attachment 40337 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40337&action=edit Bug 14324: Set "adultborrower" regardless of guarantor status. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 --- Comment #2 from Barton Chittenden <barton@bywatersolutions.com> --- Test plan: 1) Start with an instance of Koha that has borrowers of category type 'A' (Adult) and 'S' (Staff) defined. 2) Search for an adult borrower who has no Guarantees (Children). 3) Navigate to members/moremember.pl -- note that the 'Add Child' button does not appear on the toolbar. 4) Apply the patch 5) Navigate to members/moremember.pl again. The 'Add Child' button should appear. The 'Add Child' button should appear for category type 'A' (Adult) and 'I' (Institution/Organization). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40337|0 |1 is obsolete| | --- Comment #3 from Barton Chittenden <barton@bywatersolutions.com> --- Created attachment 40426 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40426&action=edit Attachment to Bug 14324 - "Add Child" button missing on moremember.pl Bug 14324: Set "adultborrower" regardless of guarantor status. Signed-off-by: Jason Robb - SEKLS (jrobb@sekls.org) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- Barton, Please detail, it seems to work here. The adultborrower flag is set in circ/circulation if the category_type is 'A': 423 $template->param( adultborrower => 1 ) 424 if ( $borrower->{'category_type'} eq 'A' ); -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 --- Comment #5 from Barton Chittenden <barton@bywatersolutions.com> --- Jonathan, The "Add Child" button is not missing in circ/circulation, only in members/moremember.pl. In members/moremember.pl, the adult borrower flag was only being set if the patron had guarantees (i.e. children for parents, professional members for Institutions), and this was causing the 'Add Child' button not to appear on moremember.pl for any adult patrons who did not have children defined. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Barton Chittenden from comment #5)
Jonathan,
The "Add Child" button is not missing in circ/circulation, only in members/moremember.pl.
Oops, sorry about that. I will test again. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40426|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 40510 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40510&action=edit Bug 14324: Set "adultborrower" regardless of guarantor status. Signed-off-by: Jason Robb - SEKLS (jrobb@sekls.org) Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 40511 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40511&action=edit Bug 14324: Display "Add Child" for Organisations on circ/circulation.pl On moremember, the button is displayed for Organisations. To be consistent, it should be displayed on the circulation page too. Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Barton and Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #10 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.20.x will be in 3.20.2 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz --- Comment #11 from Liz Rea <liz@catalyst.net.nz> --- Pushed to 3.18.x will be in 3.18.09 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #12 from Mason James <mtj@kohaaloha.com> --- Pushed to 3.16.x, will be in 3.16.13 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 --- Comment #13 from Marc Véron <veron@veron.ch> --- Created attachment 45498 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45498&action=edit Bug 15324: Do not display 'Waiting holds:" if no holds are waiting Test plan: - Make sure that you have a patron A with waiting holds and a patron B without waiting holds - Go to the checkout page for patron A (Home > Circulation > Checkouts > ...) - At the right, there is a title "Waiting holds:" and a list of holds waiting - Go to the checkout page for patron B => Without this patch "Waiting holds:" is displayed Sign-off on Jonathan's patch Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14324 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch Attachment #45498|0 |1 is obsolete| | --- Comment #14 from Marc Véron <veron@veron.ch> --- Comment on attachment 45498 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45498 Bug 15324: Do not display 'Waiting holds:" if no holds are waiting Sorry, wrong bug number... -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org