Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk actions makes false assumption that ids will always be a number #8563

Closed
lb- opened this issue May 19, 2022 · 0 comments · Fixed by #8625
Closed

Bulk actions makes false assumption that ids will always be a number #8563

lb- opened this issue May 19, 2022 · 0 comments · Fixed by #8625

Comments

@lb-
Copy link
Member

lb- commented May 19, 2022

Issue Summary

Steps to Reproduce

  1. Start a new project with wagtail start mysite & then cd into folder
  2. Run python manage.py startapp users
  3. Add to file users/models.py
import uuid
from django.contrib.auth.models import AbstractUser
from django.db import models

class UserProfile(AbstractUser):
    id = models.UUIDField(primary_key=True, default=uuid.uuid4)
  1. Update settings.py AUTH_USER_MODEL = 'users.UserProfile'
  2. Run pip install -r requirements.txt (update to Wagtail 3.0 in requirements if needed)
  3. Run python manage.py makemigrations and then python manage.py migrate
  4. python manage.py createsuperuser
  5. python manage.py runserver 0:8000
  6. Now go to the users section (signed in as the superuser) and create a new user
  7. On the user listing, manually select each one (but not the header checklist)
    11a. Expected: It should behave the same way as the other bulk actions when all items are manually selected and select the 'header' checkbox and the 'select all' checked in the footer bulk actions bar.
    11b. Actual: When manually selecting all it does not correctly auto-tick the all selected checkbox.
  8. Expected: now, hard refresh the page and then click the 'select all' checkbox in the header, then when un-checking one item it should still show the bottom bar as if one is still selected
    12b. Actual: the bottom bar hide as if nothing was selected.

Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?

  • I have confirmed that this issue can be reproduced as described on a fresh Wagtail project: (yes)

Technical details

  • Python version: Run 3.9.7
  • Django version: 4.0.2
  • Wagtail version: 3.0
  • Browser version: Firefox 99

Root cause

Screenshots

Screenshot - manually select each item, not showing as 'all selected'

Screen Shot 2022-05-19 at 8 58 50 pm

Screenshot - click select all and manually unselect one item - showing in broken state

Screen Shot 2022-05-19 at 8 58 28 pm

Screenshot - user object id as uuid (not a normal number)

Screen Shot 2022-05-19 at 9 02 55 pm

@lb- lb- added type:Bug component:Frontend component:Bulk Actions status:Unconfirmed Issue, usually a bug, that has not yet been validated as a confirmed problem. labels May 19, 2022
@lb- lb- removed the status:Unconfirmed Issue, usually a bug, that has not yet been validated as a confirmed problem. label May 31, 2022
@lb- lb- self-assigned this May 31, 2022
lb- added a commit to lb-/wagtail that referenced this issue Jun 3, 2022
- add bulk actions baseline tests
- move to includes/bulk-actions
- fix linting issues
- fixes wagtail#8563
lb- added a commit to lb-/wagtail that referenced this issue Jun 3, 2022
- add bulk actions baseline tests
- move to includes/bulk-actions
- fix linting issues
- fixes wagtail#8563
lb- added a commit to lb-/wagtail that referenced this issue Jun 9, 2022
- add bulk actions baseline tests
- move to includes/bulk-actions
- fix linting issues
- fixes wagtail#8563
lb- added a commit to lb-/wagtail that referenced this issue Jun 24, 2022
- add bulk actions baseline tests
- move to includes/bulk-actions
- fix linting issues
- fixes wagtail#8563
lb- added a commit to lb-/wagtail that referenced this issue Jul 5, 2022
- add bulk actions baseline tests
- move to includes/bulk-actions
- fix linting issues
- fixes wagtail#8563
lb- added a commit to lb-/wagtail that referenced this issue Jul 20, 2022
- add bulk actions baseline tests
- move to includes/bulk-actions
- fix linting issues
- fixes wagtail#8563
lb- added a commit to lb-/wagtail that referenced this issue Aug 4, 2022
- add bulk actions baseline tests
- move to includes/bulk-actions
- fix linting issues
- fixes wagtail#8563
@lb- lb- closed this as completed in #8625 Aug 4, 2022
lb- added a commit that referenced this issue Aug 4, 2022
- add bulk actions baseline tests
- move to includes/bulk-actions
- fix linting issues
- fixes #8563
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant