[Django] #32647: Select multiple action checkboxes with shift+mouseclick in django admin

35 views
Skip to first unread message

Django

unread,
Apr 13, 2021, 4:25:22β€―PM4/13/21
to django-...@googlegroups.com
#32647: Select multiple action checkboxes with shift+mouseclick in django admin
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
varicocelehealing |
Type: Bug | Status: new
Component: | Version: 3.2
contrib.admin | Keywords: Admin, Changelist,
Severity: Normal | Shift Click
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
This feature which allowed users to select multiple checkboxes in Django
3.1 seems to have been disabled or removed in Django 3.2. I am not able to
select multiple action checkboxes in the django admin changelist.

--
Ticket URL: <https://code.djangoproject.com/ticket/32647>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 14, 2021, 3:34:30β€―AM4/14/21
to django-...@googlegroups.com
#32647: Select multiple action checkboxes with shift+mouseclick in django admin
-------------------------------------+-------------------------------------
Reporter: varicocelehealing | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 3.2
Severity: Normal | Resolution:
Keywords: Admin, Changelist, | Triage Stage:
Shift Click | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* Attachment "changelist-action-select.gif" added.

Action select buttons working on 3.2

Django

unread,
Apr 14, 2021, 3:38:31β€―AM4/14/21
to django-...@googlegroups.com
#32647: Select multiple action checkboxes with shift+mouseclick in django admin
-------------------------------------+-------------------------------------
Reporter: varicocelehealing | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 3.2
Severity: Normal | Resolution: needsinfo

Keywords: Admin, Changelist, | Triage Stage:
Shift Click | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* status: new => closed
* resolution: => needsinfo


Comment:

Hi β€” thanks for the report. I'm not able to reproduce.

> I am not able to select multiple action checkboxes in the django admin
changelist.

Here's me doing that with the 3.2:

[[Image(https://code.djangoproject.com/raw-attachment/ticket/32647
/changelist-action-select.gif)]]

Can you provide more details as to what you're seeing?

The JavaScript for this was changed for 3.2 (in
30e59705fc3e3e9e8370b965af794ad6173bf92b) β€”Β It might be a caching issue:
can you make sure to clear your browser cache and try again?

Other than that without more info I'm not sure what to say.
Thanks again!

--
Ticket URL: <https://code.djangoproject.com/ticket/32647#comment:1>

Django

unread,
Apr 14, 2021, 6:51:19β€―AM4/14/21
to django-...@googlegroups.com
#32647: Select multiple action checkboxes with shift+mouseclick in django admin
-------------------------------------+-------------------------------------
Reporter: varicocelehealing | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 3.2
Severity: Normal | Resolution: needsinfo
Keywords: Admin, Changelist, | Triage Stage:
Shift Click | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by varicocelehealing):

* Attachment "checkbox.png" added.

Django

unread,
Apr 14, 2021, 6:57:59β€―AM4/14/21
to django-...@googlegroups.com
#32647: Select multiple action checkboxes with shift+mouseclick in django admin
-------------------------------------+-------------------------------------
Reporter: varicocelehealing | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 3.2
Severity: Normal | Resolution: needsinfo
Keywords: Admin, Changelist, | Triage Stage:
Shift Click | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by varicocelehealing):

Hey Carlton,

Thanks for the reply! So the bug was not clear on my end. In django 3.1.5,
I was able to shift click the first selected checkbox and then another
shift click on the second selected checkbox and all the check boxes in
between would be auto selected(Seen in the image below). Not sure what the
exact term for this particular feature is but it seems to be missing in
django 3.2. I also cleared my cache and the issue still persists.

My guess is that the js code enabling this feature was accidentally
removed, I am new to django so this is just my opinion.

[[Image(checkbox.png)]]

--
Ticket URL: <https://code.djangoproject.com/ticket/32647#comment:2>

Django

unread,
Apr 14, 2021, 1:19:41β€―PM4/14/21
to django-...@googlegroups.com
#32647: Select multiple action checkboxes with shift+mouseclick in django admin
-------------------------------------+-------------------------------------
Reporter: varicocelehealing | Owner: nobody
Type: Bug | Status: new

Component: contrib.admin | Version: 3.2
Severity: Normal | Resolution:
Keywords: Admin, Changelist, | Triage Stage:
Shift Click | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* status: closed => new
* resolution: needsinfo =>


Comment:

OK, thanks for the follow up. Let me reopen to assess.

--
Ticket URL: <https://code.djangoproject.com/ticket/32647#comment:3>

Django

unread,
Apr 15, 2021, 2:54:44β€―AM4/15/21
to django-...@googlegroups.com
#32647: Select multiple action checkboxes with shift+mouseclick in django admin
-------------------------------------+-------------------------------------
Reporter: varicocelehealing | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 3.2
Severity: Release blocker | Resolution:
Keywords: Admin, Changelist, | Triage Stage: Accepted
Shift Click |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* cc: Jon Dufresne (added)
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted


Comment:

OK, yes, that does work on Django 3.1. (In all these years I never knew
that. πŸ™‚)

Reproduced on stable/3.1.x at 6b0c7e6f5081a0dbe8acdbdcba9cfa6e5dff2792.
Regression in 30e59705fc3e3e9e8370b965af794ad6173bf92b

--
Ticket URL: <https://code.djangoproject.com/ticket/32647#comment:4>

Django

unread,
Apr 15, 2021, 2:56:50β€―AM4/15/21
to django-...@googlegroups.com
#32647: Select multiple action checkboxes with shift+mouseclick in django admin
-------------------------------------+-------------------------------------
Reporter: varicocelehealing | Owner: nobody
Type: Bug | Status: new

Component: contrib.admin | Version: 3.2
Severity: Release blocker | Resolution:
Keywords: Admin, Changelist, | Triage Stage: Accepted
Shift Click |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson):

[https://github.com/django/django/commit/30e59705fc3e3e9e8370b965af794ad6173bf92b
#diff-
6748af738cf7486771562b9dd0c67a328ec6a5c090052a77703574e52d371cedL99-L107
Looks like this (removed) block was responsible for the old behaviour.]

--
Ticket URL: <https://code.djangoproject.com/ticket/32647#comment:5>

Django

unread,
Apr 15, 2021, 10:02:30β€―AM4/15/21
to django-...@googlegroups.com
#32647: Select multiple action checkboxes with shift+mouseclick in django admin
-------------------------------------+-------------------------------------
Reporter: varicocelehealing | Owner: nobody
Type: Bug | Status: new

Component: contrib.admin | Version: 3.2
Severity: Release blocker | Resolution:
Keywords: Admin, Changelist, | Triage Stage: Accepted
Shift Click |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson):

This diff to the tests covers what should be the correct behaviour:

{{{
diff --git a/js_tests/admin/actions.test.js
b/js_tests/admin/actions.test.js
index 0077dd6ff3..302254d1ab 100644
--- a/js_tests/admin/actions.test.js
+++ b/js_tests/admin/actions.test.js
@@ -15,9 +15,24 @@ QUnit.module('admin.actions', {
}
});

-QUnit.test('check', function(assert) {
+QUnit.test('check toggle all', function(assert) {
const $ = django.jQuery;
assert.notOk($('.action-select').is(':checked'));
$('#action-toggle').click();
assert.ok($('.action-select').is(':checked'));
});
+
+QUnit.test('check shift-toggle', function(assert) {
+ const checkboxes = document.querySelectorAll('tr input.action-
select');
+ checkboxes.forEach( c => assert.notOk(c.checked) );
+
+ // Check first and last checkbox, using shift to select those in-
between.
+ checkboxes[0].dispatchEvent(
+ new MouseEvent("click")
+ );
+ checkboxes[checkboxes.length - 1].dispatchEvent(
+ new MouseEvent("click", {shiftKey: true})
+ );
+
+ checkboxes.forEach( c => assert.ok(c.checked) );
+});
diff --git a/js_tests/tests.html b/js_tests/tests.html
index 61bc4ac102..b77599c4fa 100644
--- a/js_tests/tests.html
+++ b/js_tests/tests.html
@@ -22,7 +22,17 @@
</tr>
<tr>
<td class="action-checkbox">
- <input class="action-select" type="checkbox"
value="618">
+ <input class="action-select" type="checkbox"
value="1">
+ </td>
+ </tr>
+ <tr>
+ <td class="action-checkbox">
+ <input class="action-select" type="checkbox"
value="2">
+ </td>
+ </tr>
+ <tr>
+ <td class="action-checkbox">
+ <input class="action-select" type="checkbox"
value="3">
</td>
</tr>
</table>
}}}


We have three checkboxes, check the first and last (using shift), and
expect them all to be checked.

--
Ticket URL: <https://code.djangoproject.com/ticket/32647#comment:6>

Django

unread,
Apr 18, 2021, 3:32:20β€―AM4/18/21
to django-...@googlegroups.com
#32647: Select multiple action checkboxes with shift+mouseclick in django admin
-------------------------------------+-------------------------------------
Reporter: varicocelehealing | Owner: Carlton
| Gibson
Type: Bug | Status: assigned

Component: contrib.admin | Version: 3.2
Severity: Release blocker | Resolution:
Keywords: Admin, Changelist, | Triage Stage: Accepted
Shift Click |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* owner: nobody => Carlton Gibson
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/32647#comment:7>

Django

unread,
Apr 20, 2021, 9:47:52β€―AM4/20/21
to django-...@googlegroups.com
#32647: Select multiple action checkboxes with shift+mouseclick in django admin
-------------------------------------+-------------------------------------
Reporter: varicocelehealing | Owner: Carlton
| Gibson
Type: Bug | Status: assigned
Component: contrib.admin | Version: 3.2
Severity: Release blocker | Resolution:
Keywords: Admin, Changelist, | Triage Stage: Accepted
Shift Click |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/14288https://github.com/django/django/pull/14288
PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/32647#comment:8>

Django

unread,
Apr 21, 2021, 2:18:56β€―AM4/21/21
to django-...@googlegroups.com
#32647: Select multiple action checkboxes with shift+mouseclick in django admin
-------------------------------------+-------------------------------------
Reporter: varicocelehealing | Owner: Carlton
| Gibson
Type: Bug | Status: assigned
Component: contrib.admin | Version: 3.2
Severity: Release blocker | Resolution:
Keywords: Admin, Changelist, | Triage Stage: Ready for
Shift Click | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/32647#comment:9>

Django

unread,
Apr 21, 2021, 3:08:41β€―AM4/21/21
to django-...@googlegroups.com
#32647: Select multiple action checkboxes with shift+mouseclick in django admin
-------------------------------------+-------------------------------------
Reporter: varicocelehealing | Owner: Carlton
| Gibson
Type: Bug | Status: closed
Component: contrib.admin | Version: 3.2
Severity: Release blocker | Resolution: fixed

Keywords: Admin, Changelist, | Triage Stage: Ready for
Shift Click | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson <carlton.gibson@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"5c73fbb6a93ee214678f02ba4027f18dff49337b" 5c73fbb]:
{{{
#!CommitTicketReference repository=""
revision="5c73fbb6a93ee214678f02ba4027f18dff49337b"
Fixed #32647 -- Restored multi-row select with shift-modifier in admin
changelist.

Regression in 30e59705fc3e3e9e8370b965af794ad6173bf92b.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32647#comment:10>

Django

unread,
Apr 21, 2021, 3:08:56β€―AM4/21/21
to django-...@googlegroups.com
#32647: Select multiple action checkboxes with shift+mouseclick in django admin
-------------------------------------+-------------------------------------
Reporter: varicocelehealing | Owner: Carlton
| Gibson
Type: Bug | Status: closed
Component: contrib.admin | Version: 3.2
Severity: Release blocker | Resolution: fixed
Keywords: Admin, Changelist, | Triage Stage: Ready for
Shift Click | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"54d5bfa9c5eb3e2936a0e382724869867059fad3" 54d5bfa9]:
{{{
#!CommitTicketReference repository=""
revision="54d5bfa9c5eb3e2936a0e382724869867059fad3"
[3.2.x] Fixed #32647 -- Restored multi-row select with shift-modifier in
admin changelist.

Regression in 30e59705fc3e3e9e8370b965af794ad6173bf92b.

Backport of 5c73fbb6a93ee214678f02ba4027f18dff49337b from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32647#comment:11>

Reply all
Reply to author
Forward
0 new messages