Repository navigation
[CP Staging] Fix opening receipt page from IOU report leads to not found page - #39419
Conversation
|
@dukenv0307 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] |
|
Additional video of:
Screen.Recording.2024-04-03.at.00.15.51.mov
Screen.Recording.2024-04-03.at.00.10.40.mov
Screen.Recording.2024-04-03.at.00.02.06.mov |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-04-02.at.23.36.02.movAndroid: mWeb ChromeScreen.Recording.2024-04-02.at.23.31.31.moviOS: NativeScreen.Recording.2024-04-02.at.23.46.04.moviOS: mWeb SafariScreen.Recording.2024-04-02.at.23.32.25.movMacOS: Chrome / SafariScreen.Recording.2024-04-02.at.23.25.52.movMacOS: DesktopScreen.Recording.2024-04-02.at.23.47.44.mov |
|
Hey @bernhardoj |
shubham1206agra
left a comment
There was a problem hiding this comment.
Please fix this for track expense too
|
Ah yes, I can reproduce it after re-login. The transaction reportID for track expense is set to chat report optimistically, Lines 1252 to 1255 in 35b4d1b but looks like BE doesn't save that, so when re-login, the reportID is lost (it becomes '0'). |
|
@shubham1206agra Do I need to review this PR? |
|
Fixed for track expense too. |
@dukenv0307 Please continue. |
| const moneyRequestReportID = ReportUtils.isMoneyRequestReport(report) ? report?.reportID : report?.parentReportID; | ||
| const isTrackExpenseReport = ReportUtils.isTrackExpenseReport(report); | ||
|
|
||
| const shouldShowNotFoundPage = !isTrackExpenseReport && (moneyRequestReportID ?? '') !== transaction?.reportID; |
There was a problem hiding this comment.
This might not be most optimal way to handle this.
There was a problem hiding this comment.
Just updated again, lmk if you have any suggestion
@shubham1206agra Is it the expected that BE doesn't save |
|
@bernhardoj Lint check is failing. |
|
fixed lint. |
|
@dukenv0307 Don't worry about this. I have discussed this internally, and BE behaviour is correct. I will correct optimistic FE behaviour in other PR. |
dukenv0307
left a comment
There was a problem hiding this comment.
LGTM, all yours @iwiznia.
NikkiWines
left a comment
There was a problem hiding this comment.
works great
Untitled.mov
| const isTrackExpenseReport = ReportUtils.isTrackExpenseReport(report); | ||
|
|
||
| // eslint-disable-next-line rulesdir/no-negated-variables | ||
| const shouldShowNotFoundPage = isTrackExpenseReport ? !transaction : (moneyRequestReportID ?? '') !== transaction?.reportID; |
There was a problem hiding this comment.
NAB - for brevity
| const isTrackExpenseReport = ReportUtils.isTrackExpenseReport(report); | |
| // eslint-disable-next-line rulesdir/no-negated-variables | |
| const shouldShowNotFoundPage = isTrackExpenseReport ? !transaction : (moneyRequestReportID ?? '') !== transaction?.reportID; | |
| // eslint-disable-next-line rulesdir/no-negated-variables | |
| const shouldShowNotFoundPage = ReportUtils.isTrackExpenseReport(report) ? !transaction : (moneyRequestReportID ?? '') !== transaction?.reportID; |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…-page [CP Staging] Fix opening receipt page from IOU report leads to not found page (cherry picked from commit 935df86)
|
🚀 Cherry-picked to staging by https://github.com/marcaaron in version: 1.4.59-3 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.60-13 🚀
|
Details
The not found page shows because the report ID doesn't match the transaction report ID. This PR fixes it by getting the correct report ID.
Fixed Issues
$ #39404
PROPOSAL: #39404 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2024-04-03.at.00.08.57.mov
Android: mWeb Chrome
Screen.Recording.2024-04-03.at.00.11.31.mov
iOS: Native
Screen.Recording.2024-04-03.at.00.08.42.mov
iOS: mWeb Safari
Screen.Recording.2024-04-03.at.00.07.33.mov
MacOS: Chrome / Safari
Screen.Recording.2024-04-03.at.00.03.42.mov
MacOS: Desktop
Screen.Recording.2024-04-03.at.00.05.21.mov