-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the same logic to get the money request amount for LHN last message and report preview #34717
Use the same logic to get the money request amount for LHN last message and report preview #34717
Conversation
@cubuspl42 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
That's a clean little change! Are the other uses of |
Will any valid receipt do? Isn't there some condition that triggered the different values to appear in the first place? |
Yes, any valid receipt will do but the Pusher is already fixed (the last time I tested), so there is no way to trigger the different value anymore.
Most likely not. That's what I thought too about other usages of |
Please check each of the usages of |
The problem is that the Pusher already sends the correct data, so we actually have no real way to check it, except if we have a repro step to create a money request that will have the same amount of Btw, here are the remaining cases of
For MoneyReportHeader and ReportUtils.getMoneyRequestReportName, we can see that it has the same problem from the OP video of the issue (around 0:32) I think we can optimistically replace all |
If you actually confirmed this stuff is unused, I can see no reason to keep it. The only downside is that if it is used "creatively" in one place, we risk having a regression. But I'm always up to taking some reasonable risk 🙂
I think that it's always our role as engineers to do some reasonable XY problem reasoning on what is reported by the QA team. By what you say, it sounds like it's kind of "the same" problem (same symptoms, related to the same API we classified as flawed). We can conclude from this that fixing that fragment just lies in the scope of the issue we're supposed to fix.
Do I understand correctly that you have the necessary repro steps for case no. 4, but don't have for cases 5 and 6? |
We can definitely include it in the scope.
Nope, I don't have it for all cases. |
Please fix it for the cases where you have the repro steps so we don't act blindly. For the ones we don't, we'll bring it to the internal engineer's attention. |
All cases (4, 5, 6, and last message) require this:
so we can see the difference (between So, I think the first step is, can you ask internally for the repro steps? |
Asking internally won't be any more efficient than asking on Just to double-confirm: do your QA Steps fail on |
It succeeds on both the main and this PR. I just remembered that perhaps we can use the step from the PR that implements It manually alters the report though. |
We're getting somewhere!
It's not good. Does this step from "Actions Performed" help in any way?
|
Nope
I guess so. Before the pusher is fixed, we can see the last message and preview amount are different on the main, but as it's fixed now, there are no differences. |
I'm sorry; I understood we need to adjust the frontend to utilize the backend fix. I think we should switch the discussion back to the issue: #34064 (comment) |
Details
LHN last message and report preview amount have different logic to get the amount.
LHN last message uses ReportUtils.getMoneyRequestReimbursableTotal, but the report preview uses ReportUtils.getMoneyRequestSpendBreakdown
Fixed Issues
$ #34064
PROPOSAL: #34064 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2024-01-18.at.17.38.04.mov
Android: mWeb Chrome
Screen.Recording.2024-01-18.at.17.40.36.mov
iOS: Native
Screen.Recording.2024-01-18.at.17.33.49.mov
iOS: mWeb Safari
Screen.Recording.2024-01-18.at.17.31.08.mov
MacOS: Chrome / Safari
Screen.Recording.2024-01-18.at.17.25.23.mov
MacOS: Desktop
Screen.Recording.2024-01-18.at.17.27.08.mov