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-07-10] [$250] "Expense" is showing as a "new comment" when opening the one expense report for the first time #42472
So this action is displayed as a action in combine report
What changes do you think we should make in order to solve the problem?
I see that the logic to calculate reportActionsToDisplay is added in this PR Display total and money request in offline #36657. As this comment, the aim of this to generate created action for money request report if it doesn't exist so I think we should use allReportActions which are all report actions of current report to calculate reportActionsToDisplay firstly and then we will use this to get the combine report actions here. So we should move this block here to before this block and use allReportActions instead of reportActions
// When we are offline before opening an IOU/Expense report,
// the total of the report and sometimes the expense aren't displayed because these actions aren't returned until `OpenReport` API is complete.
// We generate a fake created action here if it doesn't exist to display the total whenever possible because the total just depends on report data
// and we also generate an expense action if the number of expenses in reportActions is less than the total number of expenses
// to display at least one expense action to match the total data.
constreportActionsToDisplay=useMemo(()=>{
We should add an extra param in getCombinedReportActions like isCombineReport and then we only return reportActions if transactionThreadReportActions is empty and the report isn't a combine report
if (isEmptyObject(transactionThreadReportActions) && !isCombineReport) {
return reportActions;
}
changed the title [-]"Expense" is showing as a "new comment" when opening the one expense report for the first time[/-][+][$250] "Expense" is showing as a "new comment" when opening the one expense report for the first time[/+]on May 24, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-7 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:
[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
[@mollfpr] 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:
[@mollfpr] 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:
[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] 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.
[@lschurr / @zanyrenney] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
[@mollfpr] 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:
No specific PR causing the bug.
[@mollfpr] 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:
The regression step should be enough.
[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] 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.
Submit an expense report with one expense as an employee
Sign in as an approver of the expense report (shouldn't be signed in before so that you don't have the expense report or transaction thread locally)
Throttle network connection to slow 3G, so that OpenReport takes a little bit to return
The regression steps look good to me. @zanyrenney once you're back from OOO and you have some time, do you know who's in charge of adding the regression test to TestRail?
Activity
melvin-bot commentedon May 22, 2024
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.nkdengineer commentedon May 23, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
"Expense" is showing as a "new comment" with greenline
What is the root cause of that problem?
Before
OpenReportAPI of theexpenseReportis called, transaction thread report actions is emptyApp/src/pages/home/report/ReportActionsView.tsx
Lines 152 to 153 in aa9bbcf
and then we return all report actions of the expense report which contains the
IOUaction hereApp/src/libs/ReportActionsUtils.ts
Lines 313 to 315 in aa9bbcf
So this action is displayed as a action in combine report
What changes do you think we should make in order to solve the problem?
reportActionsToDisplayis added in this PR Display total and money request in offline #36657. As this comment, the aim of this to generate created action for money request report if it doesn't exist so I think we should useallReportActionswhich are all report actions of current report to calculatereportActionsToDisplayfirstly and then we will use this to get the combine report actions here. So we should move this block here to before this block and useallReportActionsinstead ofreportActionsApp/src/pages/home/report/ReportActionsView.tsx
Lines 480 to 485 in aa9bbcf
getCombinedReportActionslikeisCombineReportand then we only returnreportActionsif transactionThreadReportActions is empty and the report isn't a combine reportApp/src/libs/ReportActionsUtils.ts
Lines 313 to 315 in aa9bbcf
!!transactionThreadReportIDasisCombineReportparam intogetCombinedReportActionsfunctionApp/src/pages/home/report/ReportActionsView.tsx
Lines 152 to 153 in aa9bbcf
sortedReportActions={reportActions}here instead ofreportActionsToDisplayApp/src/pages/home/report/ReportActionsView.tsx
Line 554 in aa9bbcf
What alternative solutions did you explore? (Optional)
NA
zanyrenney commentedon May 24, 2024
Adding the external label - looks like NK engineer already has a proposal.
[-]"Expense" is showing as a "new comment" when opening the one expense report for the first time[/-][+][$250] "Expense" is showing as a "new comment" when opening the one expense report for the first time[/+]melvin-bot commentedon May 24, 2024
Job added to Upwork: https://www.upwork.com/jobs/~011a3e7a662efa0b69
melvin-bot commentedon May 24, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (
External)zanyrenney commentedon May 24, 2024
hey there @mollfpr - please can you review the proposal from @nkdengineer above! thanks!
52 remaining items
melvin-bot commentedon Jul 3, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-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 2024-07-10. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jul 3, 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:
zanyrenney commentedon Jul 10, 2024
payment summary
@mollfpr requires payment through NewDot Manual Requests - owed $250 once comment above is complete.
@nkdengineer requires payment automatic offer (Contributor) - paid $250 on upwork.
zanyrenney commentedon Jul 10, 2024
@srikarparsi please can you do me a favour and once this checklist is complete, close out the issue?
I am OOO until Tuesday 16th so don't want to keep this open during my OOO if all the steps are complete.
I have also DM'd @mollfpr
mollfpr commentedon Jul 11, 2024
Sorry for the delay 🙏
No specific PR causing the bug.
The regression step should be enough.
JmillsExpensify commentedon Jul 11, 2024
$250 approved for @mollfpr
srikarparsi commentedon Jul 15, 2024
The regression steps look good to me. @zanyrenney once you're back from OOO and you have some time, do you know who's in charge of adding the regression test to TestRail?
zanyrenney commentedon Jul 17, 2024
Yep, i can add them!
zanyrenney commentedon Jul 17, 2024
Added, closing! #45595