Bug 18423 - Add child button not always appearing - problem in template variable
Summary: Add child button not always appearing - problem in template variable
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-12 14:26 UTC by Nick Clemens
Modified: 2017-12-07 22:20 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 18423 - Add child button not always appearing - problem in template variable (8.88 KB, patch)
2017-04-12 14:29 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 18423 - Add child button not always appearing - problem in template variable (8.88 KB, patch)
2017-04-12 15:35 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 18423 follow up - fix display off add child on members/notices.pl (771 bytes, patch)
2017-04-12 15:35 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 18423 Follow-up - Add 'Add child' button to statistics tab (732 bytes, patch)
2017-04-17 16:34 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 18423 - Add child button not always appearing - problem in template variable (9.06 KB, patch)
2017-04-17 19:43 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18423 follow up - fix display off add child on members/notices.pl (905 bytes, patch)
2017-04-17 19:44 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18423 Follow-up - Add 'Add child' button to statistics tab (866 bytes, patch)
2017-04-17 19:44 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18423 - Add 'Add child' button to files, housebound, and deletemem pages (1.87 KB, patch)
2017-04-18 17:55 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 18423 - Followup - enable Add child button for institutional borrowers (10.29 KB, patch)
2017-04-18 18:05 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 18423 - Add child button not always appearing - problem in template variable (9.13 KB, patch)
2017-04-18 18:20 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18423 follow up - fix display off add child on members/notices.pl (979 bytes, patch)
2017-04-18 18:20 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18423 Follow-up - Add 'Add child' button to statistics tab (940 bytes, patch)
2017-04-18 18:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18423 - Add 'Add child' button to files, housebound, and deletemem pages (1.94 KB, patch)
2017-04-18 18:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18423 - Followup - enable Add child button for institutional borrowers (10.36 KB, patch)
2017-04-18 18:21 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2017-04-12 14:26:55 UTC
We are seeing on some sites that the 'Add child' button is not appearing on moremember.pl

In these cases it seems the line:
activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
Fails to pass through the correct value
Comment 1 Nick Clemens 2017-04-12 14:29:41 UTC
Created attachment 62094 [details] [review]
Bug 18423 - Add child button not always appearing - problem in template variable

This patch removes the retrieval of the syspref borrowerRelationship
from the scripts and moves it to a check using the Template Toolkit
plugin

To test:
1 - Apply patch
2 - Ensure 'Add child' button displays appropriately on all member pages.
Comment 2 Nick Clemens 2017-04-12 15:35:38 UTC
Created attachment 62100 [details] [review]
Bug 18423 - Add child button not always appearing - problem in template variable

This patch removes the retrieval of the syspref borrowerRelationship
from the scripts and moves it to a check using the Template Toolkit
plugin

To test:
1 - Apply patch
2 - Ensure 'Add child' button displays appropriately on all member pages.
Comment 3 Nick Clemens 2017-04-12 15:35:43 UTC
Created attachment 62101 [details] [review]
Bug 18423 follow up - fix display off add child on members/notices.pl
Comment 4 Alex Buckley 2017-04-17 06:13:29 UTC
Hi Nick

I have tested your patches following your test plan. The 'Add child' button does not appears on the following tab pages in the moremember.pl with your patches attached:
* details
* routing lists
* Notices
* Statistics

You say in your test plan '2 - Ensure 'Add child' button displays appropriately on all member pages.' so I am assuming the 'Add child' button is supposed to be being displayed on the above member pages and so these patches are not meeting the test plan 

Regards
Alex
Comment 5 Nick Clemens 2017-04-17 16:34:00 UTC
Created attachment 62225 [details] [review]
Bug 18423 Follow-up - Add 'Add child' button to statistics tab
Comment 6 Nick Clemens 2017-04-17 16:35:14 UTC
Please retest, I added a patch to add the button to 'Statistics' tabs, all other are displaying for me. The only tab I don't see the button on is 'Modification log' as it does not include the tool bar.
Comment 7 Marc Véron 2017-04-17 19:43:14 UTC
Created attachment 62228 [details] [review]
Bug 18423 - Add child button not always appearing - problem in template variable

This patch removes the retrieval of the syspref borrowerRelationship
from the scripts and moves it to a check using the Template Toolkit
plugin

To test:
1 - Apply patch
2 - Ensure 'Add child' button displays appropriately on all member pages.

Tested 3 pateches together, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Comment 8 Marc Véron 2017-04-17 19:44:02 UTC
Created attachment 62229 [details] [review]
Bug 18423 follow up - fix display off add child on members/notices.pl

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 9 Marc Véron 2017-04-17 19:44:52 UTC
Created attachment 62230 [details] [review]
Bug 18423 Follow-up - Add 'Add child' button to statistics tab

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 10 Jonathan Druart 2017-04-17 21:07:40 UTC
Still 3 others:
- members/deletemem.pl
- members/files.pl
- members/housebound.pl

Noticed something weird:
moremember.pl is the only template passing
   ( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' || $category_type eq 'I' );

others only pass $category_type eq 'A'.
It comes from bug 5112.

Katrin, could you clarify please?
Comment 11 Nick Clemens 2017-04-18 17:55:03 UTC
Created attachment 62307 [details] [review]
Bug 18423 - Add 'Add child' button to files, housebound, and deletemem pages
Comment 12 Nick Clemens 2017-04-18 18:05:01 UTC
Created attachment 62308 [details] [review]
Bug 18423 - Followup - enable Add child button for institutional borrowers

If they can have guarantors and we shwo the button on one page I think
we should in fact show it on all.
Comment 13 Jonathan Druart 2017-04-18 18:20:31 UTC
Created attachment 62312 [details] [review]
Bug 18423 - Add child button not always appearing - problem in template variable

This patch removes the retrieval of the syspref borrowerRelationship
from the scripts and moves it to a check using the Template Toolkit
plugin

To test:
1 - Apply patch
2 - Ensure 'Add child' button displays appropriately on all member pages.

Tested 3 pateches together, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 14 Jonathan Druart 2017-04-18 18:20:56 UTC
Created attachment 62313 [details] [review]
Bug 18423 follow up - fix display off add child on members/notices.pl

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 15 Jonathan Druart 2017-04-18 18:21:03 UTC
Created attachment 62314 [details] [review]
Bug 18423 Follow-up - Add 'Add child' button to statistics tab

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 16 Jonathan Druart 2017-04-18 18:21:16 UTC
Created attachment 62315 [details] [review]
Bug 18423 - Add 'Add child' button to files, housebound, and deletemem pages

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 17 Jonathan Druart 2017-04-18 18:21:23 UTC
Created attachment 62316 [details] [review]
Bug 18423 - Followup - enable Add child button for institutional borrowers

If they can have guarantors and we shwo the button on one page I think
we should in fact show it on all.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 18 Kyle M Hall 2017-04-21 11:43:15 UTC
Pushed to master for 17.05, thanks Nick!
Comment 19 Katrin Fischer 2017-04-21 22:39:00 UTC
It's all about buttons, but doe appear to be safe string wise.

These patches have been pushed to 16.11.x and will be in 16.11.07.
Comment 20 Mason James 2017-05-03 04:36:05 UTC
Pushed to 16.05.x, for 16.05.12 release
Comment 21 Julian Maurice 2017-05-10 09:45:24 UTC
Pushed to 3.22.x for 3.22.21