You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-06-06] [$250] Tags - After deleting a Tag, the select button is not showing the correct amount #42271
changed the title [-]Tags - After deleting a Tag, the select button is not showing the correct amount[/-][+][$250] Tags - After deleting a Tag, the select button is not showing the correct amount[/+]on May 17, 2024
The toggleAllTags function does not properly filter out tags with pending delete actions. And the logic for checking isAllSelected also be wrong
What changes do you think we should make in order to solve the problem?
It's necessary to filter out tags that have pending delete actions. And then we also need to update the logic for checking isAllSelected, it's crucial to filter out tags with pending delete actions to maintain correct functionality when offline
The same fix should be applied to other pages as well
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Proposal: Fix for Incorrect Tag Count After Deletion
Overview:
The current issue arises because tags pending deletion are still considered in the selection logic, leading to an incorrect tag count.
Technical Explanation:
To address this issue, I will modify the toggleAllTags function to exclude tags that have a pendingAction set to CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE.
Proposed Code Change:
The revised toggleAllTags function will look as follows:
This update ensures that tags pending deletion are not considered when determining if all tags are selected and when toggling all tags. I recommend applying the same correction to other pages.
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.77-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@thesahindia] The PR that introduced the bug has been identified. Link to the PR:
[@thesahindia] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@thesahindia] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@thesahindia] Determine if we should create a regression test for this bug.
[@thesahindia] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@stephanieelliott] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Activity
melvin-bot commentedon May 16, 2024
Triggered auto assignment to @stephanieelliott (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.izarutskaya commentedon May 16, 2024
We think this issue might be related to the #collect project.
Krishna2323 commentedon May 16, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Tags - After deleting a Tag, the select button is not showing the correct amount
What is the root cause of that problem?
We are not filtering out tags with pending action of delete.
What changes do you think we should make in order to solve the problem?
Filter out tags with pending action of delete in
toggleAllTagscallback.App/src/pages/workspace/tags/WorkspaceTagsPage.tsx
Lines 122 to 125 in 1faad15
We apply same logic as in
WorkspaceCategoriesPage.App/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx
Lines 109 to 113 in 1faad15
What alternative solutions did you explore? (Optional)
melvin-bot commentedon May 17, 2024
Job added to Upwork: https://www.upwork.com/jobs/~010953527677d8e414
[-]Tags - After deleting a Tag, the select button is not showing the correct amount[/-][+][$250] Tags - After deleting a Tag, the select button is not showing the correct amount[/+]melvin-bot commentedon May 17, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)cretadn22 commentedon May 18, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Tags - Upon removal of a tag, the select button fails to display the accurate quantity
What is the root cause of that problem?
App/src/pages/workspace/tags/WorkspaceTagsPage.tsx
Lines 122 to 125 in 1faad15
The toggleAllTags function does not properly filter out tags with pending delete actions. And the logic for checking
isAllSelectedalso be wrongWhat changes do you think we should make in order to solve the problem?
It's necessary to filter out tags that have pending delete actions. And then we also need to update the logic for checking
isAllSelected, it's crucial to filter out tags with pending delete actions to maintain correct functionality when offlineThe same fix should be applied to other pages as well
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
RandikaSilva commentedon May 18, 2024
Proposal: Fix for Incorrect Tag Count After Deletion
Overview:
The current issue arises because tags pending deletion are still considered in the selection logic, leading to an incorrect tag count.
Technical Explanation:
To address this issue, I will modify the
toggleAllTagsfunction to exclude tags that have apendingActionset toCONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE.Proposed Code Change:
The revised
toggleAllTagsfunction will look as follows:Note
This update ensures that tags pending deletion are not considered when determining if all tags are selected and when toggling all tags. I recommend applying the same correction to other pages.
After changes done:
Screen.Recording.2024-05-19.at.3.14.38.AM.mov
22 remaining items
melvin-bot commentedon May 30, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 30, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.77-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-06-06. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 30, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
stephanieelliott commentedon Jun 4, 2024
Hey @thesahindia can you please complete the BZ checklist?
stephanieelliott commentedon Jun 4, 2024
Summarizing payment on this issue:
Upwork job is here: https://www.upwork.com/jobs/~010953527677d8e414
thesahindia commentedon Jun 4, 2024
This case should have been handled in #37621 but it was missed.
We should add a general test case for all similar instances -
stephanieelliott commentedon Jun 7, 2024
Thanks @thesahindia! Issue for regression test created here: https://github.com/Expensify/Expensify/issues/402937
JmillsExpensify commentedon Jun 17, 2024
$250 approved for @thesahindia