Bug 25250 - JS code for checkboxes also affects hidden modules inputs
Summary: JS code for checkboxes also affects hidden modules inputs
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on: 24982
Blocks: 25249
  Show dependency treegraph
 
Reported: 2020-04-22 12:39 UTC by Nick Clemens
Modified: 2020-05-08 21:49 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00


Attachments
Bug 25250: (bug 24982 follow-up) Don't disable checkboxes if modification log (1.52 KB, patch)
2020-04-22 13:52 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25250: (bug 24982 follow-up) Don't disable checkboxes if modification log (1.79 KB, patch)
2020-04-22 13:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25250: [alternate] target checkboxes only (1.95 KB, patch)
2020-04-22 14:41 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 25250: (bug 24982 follow-up) Don't disable checkboxes if modification log (2.69 KB, patch)
2020-04-22 15:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25250: (bug 24982 follow-up) Don't disable checkboxes if modification log (2.76 KB, patch)
2020-04-22 15:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25250: (bug 24982 follow-up) Don't disable checkboxes if modification log (2.83 KB, patch)
2020-04-27 10:43 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2020-04-22 12:39:14 UTC
bug 24982 added checkboxes to the log viewer and added js to control them. The JS conflicts with code form 19791 and affects the hidden inputs that limit viewing a patrons circ info when coming from their account (i.e. the Modification log tab on a patron)

The JS should be adjusted to only affect the checkboxes
Comment 1 Jonathan Druart 2020-04-22 13:52:28 UTC
Created attachment 103478 [details] [review]
Bug 25250: (bug 24982 follow-up) Don't disable checkboxes if modification log

If we are coming from the "Modification logs" of the patron module we
should not disable the checkboxes (that are not visible).
Otherwise the logs are not longer filtered and all are visible.

Test plan:
0. Don't apply this patch
1. Modify a patron, add them a fine, and do a checkout
2. Click the "Modification logs"
=> You see the Patrons and Circulation logs
3. Click submit
=> You see all the logs (KO)
4. Apply this patch
5. Click the "Modification logs"
=> You see the Patrons and Circulation logs
6. Click submit
=> You see the Patrons only (KO)
7. Apply the patch from bug 25249
8. Click the "Modification logs"
=> You see the Patrons and Circulation logs
9. Click submit
=> You see the Patrons and Circulation logs (OK!)
Comment 2 Jonathan Druart 2020-04-22 13:57:34 UTC
Created attachment 103479 [details] [review]
Bug 25250: (bug 24982 follow-up) Don't disable checkboxes if modification log

If we are coming from the "Modification logs" of the patron module we
should not disable the checkboxes (that are not visible).
Otherwise the logs are not longer filtered and all are visible.

Test plan:
0. Don't apply this patch
1. Modify a patron, add them a fine, and do a checkout
2. Click the "Modification logs"
=> You see the Patrons and Circulation logs
3. Click submit
=> You see all the logs (KO)
4. Apply this patch
5. Click the "Modification logs"
=> You see the Patrons and Circulation logs
6. Click submit
=> You see the Patrons only (KO)
7. Apply the patch from bug 25249
8. Click the "Modification logs"
=> You see the Patrons and Circulation logs
9. Click submit
=> You see the Patrons and Circulation logs (OK!)
Comment 3 Nick Clemens 2020-04-22 14:41:08 UTC
Created attachment 103484 [details] [review]
Bug 25250: [alternate] target checkboxes only
Comment 4 Jonathan Druart 2020-04-22 15:01:21 UTC
Created attachment 103486 [details] [review]
Bug 25250: (bug 24982 follow-up) Don't disable checkboxes if modification log

If we are coming from the "Modification logs" of the patron module we
should not disable the checkboxes (that are not visible).
Otherwise the logs are not longer filtered and all are visible.

Test plan:
0. Don't apply this patch
1. Modify a patron, add them a fine, and do a checkout
2. Click the "Modification logs"
=> You see the Patrons and Circulation logs
3. Click submit
=> You see all the logs (KO)
4. Apply this patch
5. Click the "Modification logs"
=> You see the Patrons and Circulation logs
6. Click submit
=> You see the Patrons only (KO)
7. Apply the patch from bug 25249
8. Click the "Modification logs"
=> You see the Patrons and Circulation logs
9. Click submit
=> You see the Patrons and Circulation logs (OK!)
Comment 5 Jonathan Druart 2020-04-22 15:07:32 UTC
Created attachment 103487 [details] [review]
Bug 25250: (bug 24982 follow-up) Don't disable checkboxes if modification log

If we are coming from the "Modification logs" of the patron module we
should not disable the checkboxes (that are not visible).
Otherwise the logs are not longer filtered and all are visible.

Test plan:
0. Don't apply this patch
1. Modify a patron, add them a fine, and do a checkout
2. Click the "Modification logs"
=> You see the Patrons and Circulation logs
3. Click submit
=> You see all the logs (KO)
4. Apply this patch
5. Click the "Modification logs"
=> You see the Patrons and Circulation logs
6. Click submit
=> You see the Patrons only (KO)
7. Apply the patch from bug 25249
8. Click the "Modification logs"
=> You see the Patrons and Circulation logs
9. Click submit
=> You see the Patrons and Circulation logs (OK!)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Martin Renvoize 2020-04-27 10:42:52 UTC
Works well, Passing QA
Comment 7 Martin Renvoize 2020-04-27 10:43:30 UTC
Created attachment 103747 [details] [review]
Bug 25250: (bug 24982 follow-up) Don't disable checkboxes if modification log

If we are coming from the "Modification logs" of the patron module we
should not disable the checkboxes (that are not visible).
Otherwise the logs are not longer filtered and all are visible.

Test plan:
0. Don't apply this patch
1. Modify a patron, add them a fine, and do a checkout
2. Click the "Modification logs"
=> You see the Patrons and Circulation logs
3. Click submit
=> You see all the logs (KO)
4. Apply this patch
5. Click the "Modification logs"
=> You see the Patrons and Circulation logs
6. Click submit
=> You see the Patrons only (KO)
7. Apply the patch from bug 25249
8. Click the "Modification logs"
=> You see the Patrons and Circulation logs
9. Click submit
=> You see the Patrons and Circulation logs (OK!)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2020-04-27 10:45:25 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 9 Joy Nelson 2020-05-08 21:49:38 UTC
missing dependencies - not backported