Bug 14741

Summary: Selecting all child permissions doesn't select the top level check box
Product: Koha Reporter: Joonas Kylmälä <joonas.kylmala>
Component: Staff interfaceAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: gmcharlt, jdemuth, katrin.fischer, martin.renvoize, maryse.simard
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 14741: Selecting all child permissions doesn't select the top level check box
Bug 14741: Selecting all child permissions doesn't select the top level check box
Bug 14741: Selecting all child permissions doesn't select the top level check box

Description Joonas Kylmälä 2015-08-27 12:47:38 UTC
Set permissions doesn't tick the top level check box and doesn't always clear child check boxes.

How to reproduce this bug:

1. Go to /cgi-bin/koha/members/member-flags.pl?member=<borroweid> / search for some patron and click set permissions from the more menu.
2. Choose all child checkboxes of some top level checkbox
3. Notice that the top level check box didn't got the tick automatically.

1. 1. Go to /cgi-bin/koha/members/member-flags.pl?member=<borroweid> / search for some patron and click set permissions from the more menu.
2. Choose all child checkboxes of some top level checkbox
3. Check the top level check box
4. Uncheck the top level check box
5. Notice that the child checkboxes didn't become unchecked.
Comment 1 Katrin Fischer 2018-05-16 22:58:52 UTC
Still valid.
Comment 2 Owen Leonard 2019-11-21 17:17:05 UTC
The first half of this report is still valid. I can't reproduce the second half (child checkboxes not becoming unchecked), so I'm modifying the report title.
Comment 3 Owen Leonard 2019-11-21 17:26:07 UTC
Created attachment 95702 [details] [review]
Bug 14741: Selecting all child permissions doesn't select the top level check box

This patch modifies the patron flags page so that manually selecting all
the child permissions also checks the checkbox for the parent
permission.

To test, apply the patch, open a patron record, select More -> Set
permissions.

 - Expand a set of permissions, for instance "Add, modify, and view
   patron information."
 - If any boxes are checked, uncheck them.
 - Check each of the "child" checkboxes ("Add, modify, and view..." and
   "View patron infos..." ).
 - When both checkboxes are checked, the "Add, modify, and view" parent
   permission should be automatically checked.
Comment 4 Maryse Simard 2019-11-22 22:00:23 UTC
Created attachment 95751 [details] [review]
Bug 14741: Selecting all child permissions doesn't select the top level check box

This patch modifies the patron flags page so that manually selecting all
the child permissions also checks the checkbox for the parent
permission.

To test, apply the patch, open a patron record, select More -> Set
permissions.

 - Expand a set of permissions, for instance "Add, modify, and view
   patron information."
 - If any boxes are checked, uncheck them.
 - Check each of the "child" checkboxes ("Add, modify, and view..." and
   "View patron infos..." ).
 - When both checkboxes are checked, the "Add, modify, and view" parent
   permission should be automatically checked.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Comment 5 Jonathan Druart 2019-11-25 14:26:05 UTC
Created attachment 95791 [details] [review]
Bug 14741: Selecting all child permissions doesn't select the top level check box

This patch modifies the patron flags page so that manually selecting all
the child permissions also checks the checkbox for the parent
permission.

To test, apply the patch, open a patron record, select More -> Set
permissions.

 - Expand a set of permissions, for instance "Add, modify, and view
   patron information."
 - If any boxes are checked, uncheck them.
 - Check each of the "child" checkboxes ("Add, modify, and view..." and
   "View patron infos..." ).
 - When both checkboxes are checked, the "Add, modify, and view" parent
   permission should be automatically checked.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Martin Renvoize 2019-11-26 11:12:30 UTC
Thanks everyone, Pushed to master for 19.11.00