-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix: Empty transaction data on log in #31302
Conversation
@fedirjh Can you check? |
Reviewer Checklist
Screenshots/VideosAndroid: NativeCleanShot.2023-11-20.at.02.23.16.mp4Android: mWeb ChromeCleanShot.2023-11-20.at.01.59.21.mp4iOS: NativeCleanShot.2023-11-20.at.01.46.13.mp4iOS: mWeb SafariCleanShot.2023-11-20.at.01.49.58.mp4MacOS: Chrome / SafariCleanShot.2023-11-19.at.23.04.48.mp4MacOS: DesktopCleanShot.2023-11-20.at.02.05.56.mp4 |
@tienifr it Looks we have a bug: The currency changes after opening older requests CleanShot.2023-11-17.at.15.58.20.mp4 |
src/libs/ReportUtils.js
Outdated
if (_.isEmpty(transaction)) { | ||
return lodashGet(reportAction, ['message', 0, 'text'], '').replace(/(\r\n|\n|\r)/gm, ' '); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a comment to the code.
@fedirjh I can't reproduce the issue. Can you verify if it also happens on staging or prod? |
On staging I get the initial bug, the amount is displayed as CleanShot.2023-11-22.at.15.35.09.mp4 |
@tienifr I think I found the problem. It may be related to the backend? Steps to reproduce :
Expected: LHN and money request header should display the correct data on the first load. CleanShot.2023-11-22.at.16.24.43.mp4 |
@tienifr were you able to replicate the issue with these steps ? |
Thanks, working on it. |
Root cause is the changes in transaction details are not reflected in parent report action. There's no way we can retrieve them unless we open the transaction. I'm not sure if this is a BE bug. But if it's ok, I think it's safe just to fallback to |
Thank you @tienifr. It seems that we have limited options in this case. cc @puneetlath I'd like your opinion on this. Currently, when a money request is updated (amount, date, etc.), the
|
I think I prefer 2. It will be more consistent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tienifr Let's move it forward.
Co-authored-by: Fedi Rajhi <fedirjh@gmail.com>
@tienifr Could you please merge main. It seems something was broken : |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
@fedirjh Things work fine now! |
Updated Screenshots/VideosAndroid: NativeCleanShot.2023-11-29.at.15.26.48.mp4Android: mWeb ChromeCleanShot.2023-11-29.at.15.29.33.mp4iOS: NativeCleanShot.2023-11-29.at.02.13.25.mp4iOS: mWeb SafariCleanShot.2023-11-29.at.14.25.13.mp4MacOS: Chrome / SafariCleanShot.2023-11-29.at.14.26.35.mp4MacOS: DesktopCleanShot.2023-11-29.at.14.28.57.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me and tests well.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/puneetlath in version: 1.4.7-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.7-4 🚀
|
Details
OpenApp
API does not return transaction data thus on first load, transaction reports show0.00
in title. This PR sets fallback title if transaction data has not been loaded yet.Fixed Issues
$ #30687
PROPOSAL: #30687 (comment)
Tests
Offline tests
NA
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)/** comment above it */
this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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.2023-11-14.at.19.56.37-compressed.mov
Android: mWeb Chrome
Screen.Recording.2023-11-14.at.20.04.47-compressed.mov
iOS: Native
Screen.Recording.2023-11-14.at.19.49.41-compressed.mov
iOS: mWeb Safari
Screen.Recording.2023-11-14.at.19.52.29-compressed.mov
MacOS: Chrome / Safari
Screen.Recording.2023-11-14.at.19.45.22-compressed.mov
MacOS: Desktop
Screen.Recording.2023-11-14.at.19.54.37-compressed.mov