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] [$500] Expense - Green dot disappears from LHN when paying one out of many unpaid reports #34767
Version Number: 1.4.27-1 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
Precondition: There is a Collect workspace on Old Dot with admin and employee
pre-steps to have multiple reports for testing -
Go to the workspace settings > More features > Enable Workflows
Go to the Workflows tab in the LHN
Enable Delay submissions
Keep the default workflow of Submit and Close
[Employee] Create a manual request in the workspace chat and submit it
[Employee] Create another manual request and submit it
{Admin] Go to workspace chat with employee
[Admin] Pay the second submitted report (submitted in Step 2)
Note that the LHN does not show green dot
[Admin] Click on the preview of first submitted report (Step 1) and return to the main chat
Expected Result:
In Step 4, green dot should still appear for the workspace chat in LHN because there is still unpaid report
Actual Result:
In Step 4, LHN for the workspace chat with unpaid report does not show green dot after paying one of the reports. It only shows green dot when revisiting main chat from the expense report
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Expense - Green dot disappears from LHN when paying one out of many unpaid reports[/-][+][$500] Expense - Green dot disappears from LHN when paying one out of many unpaid reports[/+]on Jan 18, 2024
Please re-state the problem that we are trying to solve in this issue.
In Step 4, LHN for the workspace chat with unpaid report does not show green dot after paying one of the reports. It only shows green dot when revisiting main chat from the expense report.
What is the root cause of that problem?
We're setting the hasOutstandingChildRequest to false immediately here when paying money request, without checking whether there're still more outstanding child requests that are unpaid.
What changes do you think we should make in order to solve the problem?
Check that there're no other outstanding child requests first before setting hasOutstandingChildRequest to false in optimistic data above.
There're a couple of ways to do this:
1.
Fix the back-end to return hasOutstandingChildRequest: true properly for the unpaid IOU report (currently it's returning hasOutstandingChildRequest: false even though those IOU reports are unpaid)
Then in here, check the list of IOU report that corresponds to the report preview report actions in the chat report, and only set hasOutstandingChildRequest to false if no other IOU reports have hasOutstandingChildRequest: true
Or we can use conditions similar to this to check if the REPORTPREVIEW needs to be paid (instead of using the hasOutstandingChildRequest on the IOU report)
What alternative solutions did you explore? (Optional)
We can add a back-end field outstandingChildRequestCount that is the total count of outstanding child requests (similar idea to the childVisibleActionCount of the reportAction). When we pay the request, in optimistic data we reduce the outstandingChildRequestCount by 1, and only set hasOutstandingChildRequest to false if after paying this request, the outstandingChildRequestCount becomes 0.
changed the title [-][Due for payment 2025-03-21] [$250] Expense - Green dot disappears from LHN when paying one out of many unpaid reports[/-][+][Due for payment 2025-03-21] [$500] Expense - Green dot disappears from LHN when paying one out of many unpaid reports[/+]on Mar 22, 2025
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: This required a backend fix, and wasn't a regression caused by any frontend PR.
[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:
Go to the workspace settings > More features > Enable Workflows
Go to the Workflows tab in the LHN
Enable Delay submissions
Keep the default workflow of Submit and Close
Enable ACH reimbursements set up for the workspace.
Test:
[Employee] Create a manual request in the workspace chat and submit it
[Employee] Create another manual request and submit it
[Admin] Go to workspace chat with employee
[Admin] Pay the second submitted report (submitted in Step 2)
[Admin] Click on the preview of first submitted report (Step 1) and return to the main chat
Verify that: In Step 4, green dot should still appear for the workspace chat in LHN because there is still unpaid report
Activity
[-]Expense - Green dot disappears from LHN when paying one out of many unpaid reports[/-][+][$500] Expense - Green dot disappears from LHN when paying one out of many unpaid reports[/+]melvin-bot commentedon Jan 18, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01fffa54d6d963be62
melvin-bot commentedon Jan 18, 2024
Triggered auto assignment to @peterdbarkerUK (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 18, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts (
External)lanitochka17 commentedon Jan 18, 2024
#wave6-collect-submitters
tienifr commentedon Jan 19, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
In Step 4, LHN for the workspace chat with unpaid report does not show green dot after paying one of the reports. It only shows green dot when revisiting main chat from the expense report.
What is the root cause of that problem?
We're setting the
hasOutstandingChildRequestto false immediately here when paying money request, without checking whether there're still more outstanding child requests that are unpaid.What changes do you think we should make in order to solve the problem?
Check that there're no other outstanding child requests first before setting
hasOutstandingChildRequestto false in optimistic data above.There're a couple of ways to do this:
1.
hasOutstandingChildRequest: trueproperly for the unpaid IOU report (currently it's returninghasOutstandingChildRequest: falseeven though those IOU reports are unpaid)hasOutstandingChildRequestto false if no other IOU reports havehasOutstandingChildRequest: trueREPORTPREVIEWneeds to be paid (instead of using thehasOutstandingChildRequeston the IOU report)What alternative solutions did you explore? (Optional)
We can add a back-end field
outstandingChildRequestCountthat is the total count of outstanding child requests (similar idea to thechildVisibleActionCountof the reportAction). When we pay the request, in optimistic data we reduce theoutstandingChildRequestCountby 1, and only sethasOutstandingChildRequestto false if after paying this request, theoutstandingChildRequestCountbecomes 0.allroundexperts commentedon Jan 21, 2024
I think Option 2 from @tienifr's proposal should work fine and be inline with the code that we are already using.
🎀 👀 🎀 C+ reviewed
melvin-bot commentedon Jan 21, 2024
Triggered auto assignment to @roryabraham, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
281 remaining items
tienifr commentedon Mar 21, 2025
@trjExpensify The rule was stated here https://expensify.slack.com/archives/C01GTK53T8Q/p1712256409152489
This issue was created before the date so should stay at $500
melvin-bot commentedon Mar 21, 2025
Payment Summary
Upwork Job
BugZero Checklist (@slafortune)
trjExpensify commentedon Mar 21, 2025
Sounds good!
[-][Due for payment 2025-03-21] [$250] Expense - Green dot disappears from LHN when paying one out of many unpaid reports[/-][+][Due for payment 2025-03-21] [$500] Expense - Green dot disappears from LHN when paying one out of many unpaid reports[/+]melvin-bot commentedon Mar 22, 2025
Upwork job price has been updated to $500
slafortune commentedon Mar 22, 2025
@allroundexperts Role C+ requires payment through NewDot Manual Requests - owed $500
@tienifr Role Contributor - requires payment through UpWorks - offer sent here for $500 https://www.upwork.com/nx/wm/offer/106622769
tienifr commentedon Mar 22, 2025
@slafortune Thanks, offer accepted
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: This required a backend fix, and wasn't a regression caused by any frontend PR.
[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: In Step 4, green dot should still appear for the workspace chat in LHN because there is still unpaid report
Do we agree 👍 or 👎
slafortune commentedon Mar 24, 2025
@allroundexperts Role C+ requires payment through NewDot Manual Requests - Owed $500
@tienifr Role Contributor - requires payment through Upworks - Paid $500 ✅
JmillsExpensify commentedon Jun 10, 2025
$500 approved for @allroundexperts