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-08-13] [Due for payment 2025-08-11] [$250] Expense - Admin has no option to remove hold in expense report when there is only one expense #62436
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: 9.1.47-2 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:#62003 Email or phone of affected tester (no customers):applausetester+sdsdom3jo@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Mac 15.4 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Log in with Expensifail account.
Admin invites member to the workspace.
Go to staging.new.expensify.com
[Member] Submit an expense to the workspace chat.
[Member] Click on the expense preview.
[Member] Click More > Hold.
[Member] Enter reason and save it.
[Admin] Go to workspace chat with member.
[Admin] Right click on the expense preview.
[Admin] There is an option to remove hold in the context menu.
[Admin] Click on the expense preview.
[Admin] Click More.
[Admin] Click on the report header.
Expected Result:
There should be an option to remove hold in the expense report when there is only one expense.
Actual Result:
There is no option to remove hold in the expense report when there is only one expense.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We should add test for the function isRemoveHoldAction to cover this scenario
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.
changed the title [-]Expense - Admin has no option to remove hold in expense report when there is only one expense[/-][+][$250] Expense - Admin has no option to remove hold in expense report when there is only one expense[/+]on May 21, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-05-21 21:27:42 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense - Admin has no option to remove the hold in the expense report when there is only one expense
What is the root cause of that problem?
In ReportSecondaryActionUtils.ts, we didn't create CONST.REPORT.SECONDARY_ACTIONS.REMOVE_HOLD and a function, like isRemoveHoldAction, for getSecondaryReportActions to check if it can push CONST.REPORT.SECONDARY_ACTIONS.REMOVE_HOLD into the option when their is a single expense or multiple expenses.
Since CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.REMOVE_HOLD doesn't exist, we should create it in its Dropdown, and a new function called isRemoveHoldActionForTransaction.
Then, getSecondaryTransactionThreadActions will use isRemoveHoldActionForTransaction to check if CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.REMOVE_HOLD should be push as an option.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.88-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@dominictb@kadiealexander 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]
changed the title [-][Due for payment 2025-08-11] [$250] Expense - Admin has no option to remove hold in expense report when there is only one expense[/-][+][Due for payment 2025-08-13] [Due for payment 2025-08-11] [$250] Expense - Admin has no option to remove hold in expense report when there is only one expense[/+]on Aug 6, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.89-21 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@dominictb@kadiealexander 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]
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
2b. Reported on staging (eg. found during regression or PR testing)
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[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: NA, the original design missed this case
[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: NA
[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.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon May 20, 2025
Triggered auto assignment to @kadiealexander (
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.twilight2294 commentedon May 20, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Admin has no option to remove hold in expense report when there is only one expense
What is the root cause of that problem?
The condition to show the unapprove option is wrong:
App/src/libs/ReportSecondaryActionUtils.ts
Line 145 in 55a87d8
This causes the unhold option to not show up correctly as
isReportApprovedis false hereWhat changes do you think we should make in order to solve the problem?
We need to use the correct conditions from
canHoldUnholdReportActionto display the unhold button:App/src/libs/ReportUtils.ts
Lines 3932 to 3939 in 55a87d8
We need to use this one to display the button correctly
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A UI issue, but if we want, we can render the options and check for the button to be present
What alternative solutions did you explore? (Optional)
N/A
nkdengineer commentedon May 21, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-05-21 00:03:31 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
There is no option to remove hold in the expense report when there is only one expense.
What is the root cause of that problem?
We only show
remove holdbutton for holder in this conditionApp/src/libs/ReportPrimaryActionUtils.ts
Lines 212 to 215 in 55a87d8
What changes do you think we should make in order to solve the problem?
policyforisRemoveHoldActionfunctionApp/src/libs/ReportPrimaryActionUtils.ts
Lines 212 to 215 in 55a87d8
OR update function
isRemoveHoldActionlike we did here to show remove hold button ifcanModifyUnholdStatusis trueApp/src/libs/ReportUtils.ts
Lines 3974 to 3975 in 55a87d8
App/src/libs/ReportUtils.ts
Line 3980 in 55a87d8
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We should add test for the function
isRemoveHoldActionto cover this scenarioWhat 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.
[-]Expense - Admin has no option to remove hold in expense report when there is only one expense[/-][+][$250] Expense - Admin has no option to remove hold in expense report when there is only one expense[/+]melvin-bot commentedon May 21, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021925044052011969294
melvin-bot commentedon May 21, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dominictb (
External)Tony-MK commentedon May 21, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-05-21 21:27:42 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense - Admin has no option to remove the hold in the expense report when there is only one expense
What is the root cause of that problem?
In
ReportSecondaryActionUtils.ts, we didn't createCONST.REPORT.SECONDARY_ACTIONS.REMOVE_HOLDand a function, likeisRemoveHoldAction, forgetSecondaryReportActionsto check if it can pushCONST.REPORT.SECONDARY_ACTIONS.REMOVE_HOLDinto the option when their is a single expense or multiple expenses.We only created
isHoldActionForTransactionto check if an expense can be held.App/src/libs/ReportSecondaryActionUtils.ts
Lines 458 to 463 in 3c43978
What changes do you think we should make in order to solve the problem?
Create a function similar to
isRemoveHoldActionand theCONST.REPORT.SECONDARY_ACTIONS.REMOVE_HOLDinCONSTS.ts.Since other functions reuse the same original name in
ReportPrimaryActionUtils.tsandReportSecondaryActionUtils.ts, we can keep the same name,isRemoveHoldAction.Use
isRemoveHoldActioningetSecondaryReportActionsto pushCONST.REPORT.SECONDARY_ACTIONS.REMOVE_HOLDamong the secondary options just likegetReportPrimaryAction.Finally, in
MoneyReportHeader, add aDropdownOptionforCONST.REPORT.SECONDARY_ACTIONS.REMOVE_HOLDinsecondaryActionsImplementation.Note
Since
CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.REMOVE_HOLDdoesn't exist, we should create it in itsDropdown, and a new function calledisRemoveHoldActionForTransaction.Then,
getSecondaryTransactionThreadActionswill useisRemoveHoldActionForTransactionto check ifCONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.REMOVE_HOLDshould be push as an option.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
ReportSecondaryActionUtilsTest.tsalready has some test cases except for the unhold option forgetSecondaryTransactionThreadActions. So let's add one of the hold option and another for this scenioro forgetSecondaryReportActions.Furthermore, in case not all hold actions were created by the employee, let's make sure we add another test case for
isRemoveHoldAction.65 remaining items
melvin-bot commentedon Aug 4, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Aug 4, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.88-3 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-08-11. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Aug 4, 2025
@dominictb @kadiealexander 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]
[-][Due for payment 2025-08-11] [$250] Expense - Admin has no option to remove hold in expense report when there is only one expense[/-][+][Due for payment 2025-08-13] [Due for payment 2025-08-11] [$250] Expense - Admin has no option to remove hold in expense report when there is only one expense[/+]melvin-bot commentedon Aug 6, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.89-21 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-08-13. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Aug 6, 2025
@dominictb @kadiealexander 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]
kadiealexander commentedon Aug 11, 2025
Payment Summary
@dominictb please complete the checklist!
dominictb commentedon Aug 11, 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: NA, the original design missed this case
[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: NA
[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: https://github.com/Expensify/Expensify/issues/535302
Regression Test Proposal
Test:
Do we agree 👍 or 👎