Bug 22150 - Make it easier to unselect one member permission after selecting all
Summary: Make it easier to unselect one member permission after selecting all
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Amy King
QA Contact: Kyle M Hall
URL:
Keywords: Academy
Depends on:
Blocks: 28882
  Show dependency treegraph
 
Reported: 2019-01-17 02:31 UTC by Aleisha Amohia
Modified: 2022-06-06 20:25 UTC (History)
8 users (show)

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


Attachments
Bug 22150: Ability to select or unselect all member flags (3.84 KB, patch)
2019-01-17 23:17 UTC, Jasmine Amohia
Details | Diff | Splinter Review
Bug 22150: (follow-up) ensuring superlibrarian flag not checked when select all (1.34 KB, patch)
2021-01-21 02:21 UTC, Amy King
Details | Diff | Splinter Review
Bug 22150: Ability to select or unselect all member flags (4.39 KB, patch)
2021-01-21 12:03 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22150: ensuring superlibrarian flag not checked when select all (1.34 KB, patch)
2021-01-21 12:03 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22150: Ability to select or unselect all member flags (4.45 KB, patch)
2021-01-21 19:05 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22150: ensuring superlibrarian flag not checked when select all (1.39 KB, patch)
2021-01-21 19:05 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22150: Ability to select or unselect all member flags (4.51 KB, patch)
2021-01-21 19:43 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22150: Ability to select or unselect all member flags (4.51 KB, patch)
2021-01-21 19:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22150: ensuring superlibrarian flag not checked when select all (1.46 KB, patch)
2021-01-21 19:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22150: (follow-up) ensuring superlibrarian flag not checked when select all (1.15 KB, patch)
2021-01-22 13:20 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 Aleisha Amohia 2019-01-17 02:31:38 UTC
Go to a patron account page
Click more -> Set permissions

At the moment, if you select Superlibrarian, it is the same as selecting all. However, you can't then unselect one permission because the checkboxes are disabled. It is very slow and tedious to have to select every other checkbox one by one.

There should be a way to disable the checkboxes when I want to unselect one or some permissions.
Comment 1 Katrin Fischer 2019-01-17 06:11:42 UTC
I think it is on purpose - superlibrarian means all, but it's actually more than 'all'. Superlibrarians can do more than some of the permissions, especially when it comes to Independentbranches. So there would be conflicts if you could have superlibrarian without some of the other permissions.
Comment 2 Owen Leonard 2019-01-17 15:44:58 UTC
This conversation has nudged me to rebase my patch for Bug 11375 which redesigns the patron permission interface.

I think that even with my redesign this is still an issue. I wonder if it could be solved by adding "check all" and "check none" controls where "check all" would automatically de-select the superlibrarian flag?
Comment 3 Aleisha Amohia 2019-01-17 20:09:17 UTC
(In reply to Owen Leonard from comment #2)
> 
> I think that even with my redesign this is still an issue. I wonder if it
> could be solved by adding "check all" and "check none" controls where "check
> all" would automatically de-select the superlibrarian flag?

This is exactly what I had in mind.

(In reply to Katrin Fischer from comment #1)
> I think it is on purpose - superlibrarian means all, but it's actually more
> than 'all'. Superlibrarians can do more than some of the permissions,
> especially when it comes to Independentbranches. So there would be conflicts
> if you could have superlibrarian without some of the other permissions.

I meant that if you unselected any checkbox, the superlibrarian box would also be unselected.
Comment 4 Katrin Fischer 2019-01-17 20:12:47 UTC
Thx for commenting, I agree!
Comment 5 Jasmine Amohia 2019-01-17 23:17:49 UTC Comment hidden (obsolete)
Comment 6 Owen Leonard 2019-01-18 01:23:17 UTC
This works well, but the superlibrarian checkbox shouldn't be checked when you click "Select all." If you check all, including the superlibrarian checkbox, and save, you'll get an error when you return to the permissions page:

"Inconsistency detected! The superlibrarian privilege is mutually exclusive of other privileges, as it includes them all. This patron's privileges will now be reset to include only superlibrarian."
Comment 7 Amy King 2021-01-21 02:21:35 UTC Comment hidden (obsolete)
Comment 8 Owen Leonard 2021-01-21 12:03:08 UTC
Created attachment 115530 [details] [review]
Bug 22150: Ability to select or unselect all member flags

To test:
1) Find a patron
2) Click More -> Set permissions
3) Click 'Clear all', confirm all checkboxes get cleared and disabled
4) Click 'Select all', confirm all checkboxes get selected
5) Unselect one checkbox (not superlibrarian), and confirm that the
   superlibrarian checkbox also gets unselected
6) Confirm that saving still works as expected

Edit: Rebased by Owen Leonard
Comment 9 Owen Leonard 2021-01-21 12:03:12 UTC
Created attachment 115531 [details] [review]
Bug 22150: ensuring superlibrarian flag not checked when select all

Test plan:
1. Go to a patron account page
2. Click more, set permissions
3. If you select Superlibrarian, you can't unselect on box.
4. Apply first patch by Jasmine Amohia
5. Follow steps for that patch
6. Apply patch
7. Go through steps 1-4 from Jasmine Amohia, but now notice how when you
click "Select all" the Superlibrarian checkbox is not checked
Comment 10 Owen Leonard 2021-01-21 12:04:36 UTC
The original patch no longer applied for me, so I rebased it and reattached both patches. I think this work well now, and have only one question that keeps me from signing off:

Should the "Select all" action expand all the hidden permissions? I'm wondering if we should make it clear to the user that they are selecting a lot of things.
Comment 11 Katrin Fischer 2021-01-21 19:03:52 UTC
I think as there are so many it might make it less readable to expand all. I like the behaviour now. Signing off - Owen, if you ant to sign off too, we can count mine for QA :)
Comment 12 Katrin Fischer 2021-01-21 19:05:51 UTC
Created attachment 115594 [details] [review]
Bug 22150: Ability to select or unselect all member flags

To test:
1) Find a patron
2) Click More -> Set permissions
3) Click 'Clear all', confirm all checkboxes get cleared and disabled
4) Click 'Select all', confirm all checkboxes get selected
5) Unselect one checkbox (not superlibrarian), and confirm that the
   superlibrarian checkbox also gets unselected
6) Confirm that saving still works as expected

Edit: Rebased by Owen Leonard

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2021-01-21 19:05:55 UTC
Created attachment 115595 [details] [review]
Bug 22150: ensuring superlibrarian flag not checked when select all

Test plan:
1. Go to a patron account page
2. Click more, set permissions
3. If you select Superlibrarian, you can't unselect on box.
4. Apply first patch by Jasmine Amohia
5. Follow steps for that patch
6. Apply patch
7. Go through steps 1-4 from Jasmine Amohia, but now notice how when you
click "Select all" the Superlibrarian checkbox is not checked

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Kyle M Hall 2021-01-21 19:43:26 UTC
Created attachment 115610 [details] [review]
Bug 22150: Ability to select or unselect all member flags

To test:
1) Find a patron
2) Click More -> Set permissions
3) Click 'Clear all', confirm all checkboxes get cleared and disabled
4) Click 'Select all', confirm all checkboxes get selected
5) Unselect one checkbox (not superlibrarian), and confirm that the
   superlibrarian checkbox also gets unselected
6) Confirm that saving still works as expected

Edit: Rebased by Owen Leonard

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 15 Kyle M Hall 2021-01-21 19:45:03 UTC
Created attachment 115611 [details] [review]
Bug 22150: Ability to select or unselect all member flags

To test:
1) Find a patron
2) Click More -> Set permissions
3) Click 'Clear all', confirm all checkboxes get cleared and disabled
4) Click 'Select all', confirm all checkboxes get selected
5) Unselect one checkbox (not superlibrarian), and confirm that the
   superlibrarian checkbox also gets unselected
6) Confirm that saving still works as expected

Edit: Rebased by Owen Leonard

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 16 Kyle M Hall 2021-01-21 19:45:11 UTC
Created attachment 115612 [details] [review]
Bug 22150: ensuring superlibrarian flag not checked when select all

Test plan:
1. Go to a patron account page
2. Click more, set permissions
3. If you select Superlibrarian, you can't unselect on box.
4. Apply first patch by Jasmine Amohia
5. Follow steps for that patch
6. Apply patch
7. Go through steps 1-4 from Jasmine Amohia, but now notice how when you
click "Select all" the Superlibrarian checkbox is not checked

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 17 Jonathan Druart 2021-01-22 13:20:30 UTC
Created attachment 115691 [details] [review]
Bug 22150: (follow-up) ensuring superlibrarian flag not checked when select all

Use #flag-0 to select the superlibrarian checkbox
Comment 18 Jonathan Druart 2021-01-22 13:53:37 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 19 Fridolin Somers 2021-01-29 13:41:25 UTC
Enhancement not pushed to 20.11.x