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-10-14] [$250] Expense-Thread message for hold expense not shown in offline #49335
@anmurali FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
we are only creating the report actions optimistically but not updating the parentReportAction with the necessary data such as childVisibleActionCount ...
Same problem exists in Unhold too.
What changes do you think we should make in order to solve the problem?
In putOnHold we should optimistically update parentReportAction. We can use ReportUtils.getOptimisticDataForParentReportAction to get optimistic data with the necessary props for the parent action and set it to the optimistic data
One related problem I saw here is we are not updating the lastVisibleActionCreated of the report so the app doesn't auto- scroll to the newly created hold report actions so we can set lastVisibleActionCreated of the report optimistically for both hold (createdReportActionComment.created) and unhold (createdReportActionComment.created) cases.
What alternative solutions did you explore? (Optional)
changed the title [-]Expense-Thread message for hold expense not shown in offline[/-][+][$250] Expense-Thread message for hold expense not shown in offline[/+]on Sep 25, 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:
[@ntdiary] The PR that introduced the bug has been identified. Link to the PR: N/A
[@ntdiary] 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: N/A
[@ntdiary] 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: ** N/A**
[@ntdiary] Determine if we should create a regression test for this bug. No need
[@ntdiary] 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. N/A
[@anmurali] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
I think this is a feature we missed during the development of the parent report, rather than a bug introduced by any specific PR. After we fix this, the issue shouldn’t occur again, so regression test won’t be necessary. :)
Activity
melvin-bot commentedon Sep 17, 2024
Triggered auto assignment to @anmurali (
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.IuliiaHerets commentedon Sep 17, 2024
@anmurali FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
FitseTLT commentedon Sep 17, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense-Thread message for hold expense not shown in offline
What is the root cause of that problem?
In putOnHold here
App/src/libs/actions/IOU.ts
Lines 7841 to 7844 in 00bc167
we are only creating the report actions optimistically but not updating the parentReportAction with the necessary data such as
childVisibleActionCount...Same problem exists in Unhold too.
What changes do you think we should make in order to solve the problem?
In
putOnHoldwe should optimistically update parentReportAction. We can useReportUtils.getOptimisticDataForParentReportActionto get optimistic data with the necessary props for the parent action and set it to the optimistic datawe can also revert the changes on failureData.
Same should also be done unHoldRequest
One related problem I saw here is we are not updating the lastVisibleActionCreated of the report so the app doesn't auto- scroll to the newly created hold report actions so we can set
lastVisibleActionCreatedof the report optimistically for both hold (createdReportActionComment.created) and unhold (createdReportActionComment.created) cases.What alternative solutions did you explore? (Optional)
melvin-bot commentedon Sep 20, 2024
@anmurali Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Sep 24, 2024
@anmurali Still overdue 6 days?! Let's take care of this!
[-]Expense-Thread message for hold expense not shown in offline[/-][+][$250] Expense-Thread message for hold expense not shown in offline[/+]melvin-bot commentedon Sep 25, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021838745172566353951
melvin-bot commentedon Sep 25, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary (
External)23 remaining items
FitseTLT commentedon Oct 15, 2024
@anmurali Payment overdue here.
ntdiary commentedon Oct 16, 2024
I think this is a feature we missed during the development of the parent report, rather than a bug introduced by any specific PR. After we fix this, the issue shouldn’t occur again, so regression test won’t be necessary. :)
melvin-bot commentedon Oct 17, 2024
@Beamanator, @ntdiary, @anmurali, @FitseTLT Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Oct 21, 2024
@Beamanator, @ntdiary, @anmurali, @FitseTLT Still overdue 6 days?! Let's take care of this!
FitseTLT commentedon Oct 22, 2024
@anmurali Payment overdue here Thx
muttmuure commentedon Oct 23, 2024
@FitseTLT paid $250 on Upwork
muttmuure commentedon Oct 23, 2024
@ntdiary - $250 for C+
JmillsExpensify commentedon Oct 23, 2024
$250 approved for @ntdiary