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
[Due for payment 2025-03-21] [$250] Saved search - Deleting a saved search resets the currently opened search #57749
Version Number: 9.1.8-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: Exp Email or phone of affected tester (no customers):applausetester+ps309@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Mac 15.3 / Chrome App Component: Search
Action Performed:
Precondition:
There are at least two saved searches.
Go to staging.new.expensify.com
Go to Reports.
Open any saved search.
Click 3-dot menu on the other saved search.
Click Delete.
Delete the saved search.
Expected Result:
The currently opened search view will not be reset.
Actual Result:
The currently opened search view is reset after deleting a saved search.
changed the title [-]Saved search - Deleting a saved search resets the currently opened search[/-][+][$250] Saved search - Deleting a saved search resets the currently opened search[/+]on Mar 5, 2025
Adding the external label so we can get some movement here. @allroundexperts please could you take a look at the proposal above and let me know if we want to go forward with that one?
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
This is the wrong logic in a hook, so don't need to test
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.
@Themoonalsofall While your proposal has the correct RCA, you posted the correct solution (using currentSearchHash) only after @nyomanjyotisa's posted there proposal.
@nkdengineer Your proposal is same as what others posted earlier, with an additional bug that you pointed out.
As such, I think we should go with the first proposal that had the correct RCA and the solution. I suggest that we create a new issue for the second bug, and you can post your proposal there.
changed the title [-][$250] Saved search - Deleting a saved search resets the currently opened search[/-][+][Due for payment 2025-03-21] [$250] Saved search - Deleting a saved search resets the currently opened search[/+]on Mar 14, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.12-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@allroundexperts@zanyrenney@allroundexperts The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
There are at least two saved searches.
Test:
Go to Reports.
Open any saved search.
Click the 3-dot menu on the other saved search.
Click Delete.
Delete the saved search.
Verify that the currently open search view is not reset.
Activity
melvin-bot commentedon Mar 4, 2025
Triggered auto assignment to @zanyrenney (
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.nyomanjyotisa commentedon Mar 4, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Saved search - Deleting a saved search resets the currently opened search
What is the root cause of that problem?
We always reset the currently opened search on delete saved search
App/src/hooks/useDeleteSavedSearch.tsx
Lines 19 to 28 in 734bc98
What changes do you think we should make in order to solve the problem?
Only reset the currently opened search if
currentSearchHashfromuseSearchContextis equal tohashToDeleteWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
[-]Saved search - Deleting a saved search resets the currently opened search[/-][+][$250] Saved search - Deleting a saved search resets the currently opened search[/+]melvin-bot commentedon Mar 5, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021897254435294536283
melvin-bot commentedon Mar 5, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts (
External)zanyrenney commentedon Mar 5, 2025
Adding the external label so we can get some movement here. @allroundexperts please could you take a look at the proposal above and let me know if we want to go forward with that one?
nkdengineer commentedon Mar 6, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
The currently opened search view is reset after deleting a saved search.
What is the root cause of that problem?
We have two bugs
The RCA is that we always clear the filter and navigate to the default search
App/src/hooks/useDeleteSavedSearch.tsx
Lines 19 to 25 in c5bba74
The RCA is that we use
navigatewhen navigate to the default search then the delete saved search page still in the navigation stackApp/src/hooks/useDeleteSavedSearch.tsx
Lines 19 to 25 in c5bba74
What changes do you think we should make in order to solve the problem?
We should check if the current opened search is the delete saved search, we shouldn't clear the filter and navigate to the default search
We should use
goBackinstead ofnavigateto remove the delete saved search page in the navigation stackApp/src/hooks/useDeleteSavedSearch.tsx
Lines 19 to 25 in c5bba74
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
This is the wrong logic in a hook, so don't need to test
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.
allroundexperts commentedon Mar 7, 2025
Thanks for the proposals everyone.
@Themoonalsofall While your proposal has the correct RCA, you posted the correct solution (using
currentSearchHash) only after @nyomanjyotisa's posted there proposal.@nkdengineer Your proposal is same as what others posted earlier, with an additional bug that you pointed out.
As such, I think we should go with the first proposal that had the correct RCA and the solution. I suggest that we create a new issue for the second bug, and you can post your proposal there.
@nyomanjyotisa's proposal looks good to me.
🎀 👀 🎀 C+ reviewed
12 remaining items
nyomanjyotisa commentedon Mar 10, 2025
The PR is ready
cc @allroundexperts
[-][$250] Saved search - Deleting a saved search resets the currently opened search[/-][+][Due for payment 2025-03-21] [$250] Saved search - Deleting a saved search resets the currently opened search[/+]melvin-bot commentedon Mar 14, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 14, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.12-7 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 2025-03-21. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Mar 14, 2025
@allroundexperts @zanyrenney @allroundexperts The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
zanyrenney commentedon Mar 21, 2025
payment summary
@allroundexperts requires payment through NewDot Manual Requests - please request $250 via ND.
@nyomanjyotisa requires payment automatic offer (Contributor) - paid $250 via upwork.
allroundexperts commentedon Mar 23, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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: https://github.com/Expensify/App/pull/48566/files#r2009257062
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Verify that the currently open search view is not reset.
Do we agree 👍 or 👎
JmillsExpensify commentedon Jun 13, 2025
$250 approved for @allroundexperts