Bug 14741 - Selecting all child permissions doesn't select the top level check box
Summary: Selecting all child permissions doesn't select the top level check box
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff Client (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-27 12:47 UTC by j.kylmala
Modified: 2019-11-26 11:12 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
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 (2.50 KB, patch)
2019-11-21 17:26 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 14741: Selecting all child permissions doesn't select the top level check box (2.55 KB, patch)
2019-11-22 22:00 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 14741: Selecting all child permissions doesn't select the top level check box (2.63 KB, patch)
2019-11-25 14:26 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 j.kylmala 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