-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
fix(issues): show correct notification when deleting all issues in query #101452
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
fix(issues): show correct notification when deleting all issues in query #101452
Conversation
- Fix incorrect count in deletion notification when 'all in query' is selected - When itemIds is undefined (all in query), show generic 'Deleted all selected issues' message - Previously showed count of loaded items (25) instead of actual deleted count - Add comprehensive tests to verify the fix Fixes issue where notification showed '25 issues deleted' when more than 25 issues were actually deleted from the backend.
|
Hello Maintainers, @evanpurkhiser I’ve submitted a Pull Request for this issue(#100277) as part of Hacktoberfest. |
- Changed notification message from 'Deleted all selected issues' to 'Deleted selected issues' for better accuracy. - Updated corresponding test to reflect the new message.
0dcd75d to
d4d07c4
Compare
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
45841e5 to
ec78bb9
Compare
ryan953
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I'll merge this in. Thanks @dev-shahed !
🐛 Bug Identified
The issue was in
sentry/static/app/stores/groupStore.tsxin theonDeleteSuccessmethod. When users selected "all in query" and deleted more than 25 issues, the notification showed "25 issues deleted" instead of the actual count because:allInQuerySelectedis true,itemIdsis passed asundefinedtobulkDelete204 No Contentwith no countonDeleteSuccessmethod calledthis.itemIdsOrAll(itemIds)which returnedthis.getAllItemIds()whenitemIdswasundefinedgetAllItemIds()only returned the IDs of issues currently loaded in the store (typically 25), not the actual number deleted🔧 Fix Implemented
Modified the
onDeleteSuccessmethod to handle theundefinedcase properly:✅ Expected Result
Now when users delete more than 25 issues using "Select all in query":
🧪 Tests Added
Added comprehensive tests to verify the fix:
itemIdsisundefineditemIdsis provided📁 Files Modified
/home/shahed/Documents/sentry/static/app/stores/groupStore.tsx- Main fix/home/shahed/Documents/sentry/static/app/stores/groupStore.spec.tsx- TestsIssue: #100277
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.