Repository navigation
Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.1.32-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
- Log in with Expensifail account
- Go to staging.new.expensify.com
- [User A] Submit two expenses to User B
- [User A] Go to expense report
- [User A] Select one of the expenses via checkbox
- [User A] Click on the dropdown > Hold
- [User A] Enter a reason and save it
- [User B] Open chat with User A
- [User B] Go to expense report
- [User B] Click on the held expense, then click on the report header
- [User B} Note that there is no Unhold option because only the person who holds the expense can unhold it in p2p expense
- [User B] Close the RHP
- [User B].Select the held expense via checkbox
- [User B] Click on the dropdown > Unhold
- [User B] Close the RHP and click on the expense which is now unheld
- [User B] Note that it throws error "Unexpected error taking this expense off hold. Please try again later."
Expected Result:
In Step 13, the receiver should not have the option to unhold the expense because only the person who holds the expense can unhold it in p2p expense
Actual Result:
In Step 13, the receiver is given the option to unhold the expense when they are not the one who holds the expense
In Step 15, when the receiver unholds the expense, it throws error "Unexpected error taking this expense off hold. Please try again later."
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
- Android: Standalone
- Android: HybridApp
- Android: mWeb Chrome
- iOS: Standalone
- iOS: HybridApp
- iOS: mWeb Safari
- Windows: Chrome
- MacOS: Chrome / Safari
- MacOS: Desktop
Platforms Tested:
On which of our officially supported platforms was this issue tested:- Android: Standalone
- Android: HybridApp
- Android: mWeb Chrome
- iOS: Standalone
- iOS: HybridApp
- iOS: mWeb Safari
- Windows: Chrome
- MacOS: Chrome / Safari
- MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
Bug6811753_1745506943148.20250424_225148.mp4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021915823501257164210
- Upwork Job ID: 1915823501257164210
- Last Price Increase: 2025-05-02
Activity
melvin-bot commentedon Apr 24, 2025
Triggered auto assignment to @OfstadC (
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.bernhardoj commentedon Apr 24, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-04-24 16:37:40 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Unhold option is available for the user that doesn't do the hold when selecting from checkbox.
What is the root cause of that problem?
Currently, we show the UNHOLD option without checking who hold it, or whether the user can UNHOLD it or not. We only check if it's currently on hold.
App/src/hooks/useSelectedTransactionsActions.ts
Lines 48 to 52 in f020d19
What changes do you think we should make in order to solve the problem?
We need to follow the same approach in report details page by checking if the user can unhold or not using
canHoldUnholdReportActionutil.App/src/pages/ReportDetailsPage.tsx
Line 781 in f020d19
We only need to get the first transactionID since we only allow to hold/unhold a single expense.
We can apply the same to HOLD option if needed.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Test
useSelectedTransactionsActionshook and verify it returns the correct options.[-]Expense - Unhold option is available for user who does not hold the expense which causes error[/-][+][$250] Expense - Unhold option is available for user who does not hold the expense which causes error[/+]melvin-bot commentedon Apr 25, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021915823501257164210
melvin-bot commentedon Apr 25, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws (
External)Tony-MK commentedon Apr 26, 2025
Should be fixed by #60436.
Nick4dawin commentedon Apr 28, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Unhold option is available for the user that doesn't do the hold when selecting from checkbox.
What is the root cause of that problem?
Currently, we show the UNHOLD option without checking who hold it, or whether the user can UNHOLD it or not. We only check if it's currently on hold.
App/src/hooks/useSelectedTransactionsActions.ts
Lines 48 to 52 in f020d19
What changes do you think we should make in order to solve the problem?
We need to follow the same approach in report details page by checking if the user can unhold or not using canHoldUnholdReportActionUtil.
First, we need to import the utility:
Then we need to modify the code to check permissions before showing the unhold option:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Test useSelectedTransactionsActions hook and verify it returns the correct options.
dangrous commentedon Apr 28, 2025
Can help with internal review on this when it's ready for it!
Ollyws commentedon Apr 30, 2025
@Tony-MK can you confirm if your PR will fix this issue? If not we'll fix it here.
Tony-MK commentedon Apr 30, 2025
Hey @Ollyws, the PR will fix this bug.
Ollyws commentedon May 2, 2025
Ok let's hold for that then.
melvin-bot commentedon May 2, 2025
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
melvin-bot commentedon May 5, 2025
@Ollyws Whoops! This issue is 2 days overdue. Let's get this updated quick!
dangrous commentedon May 5, 2025
That PR is on staging - can we retest/investigate this? Thanks!
melvin-bot commentedon May 7, 2025
@Ollyws Eep! 4 days overdue now. Issues have feelings too...
OfstadC commentedon May 8, 2025
https://expensify.slack.com/archives/C9YU7BX5M/p1746720632531669
izarutskaya commentedon May 8, 2025
Not reproducible
20250509_012024.mp4
OfstadC commentedon May 8, 2025
Since this can no longer be reproduced - closing