-
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
Remove the hasOutstandingIOU key #32653
Remove the hasOutstandingIOU key #32653
Conversation
…ture/32187-referral-page-redesign
…ture/32187-referral-page-redesign
…ture/32187-referral-page-redesign
…ture/32187-referral-page-redesign
…/32565-deprecate-hasOutstandingIOU-key
…/32565-deprecate-hasOutstandingIOU-key
…/32565-deprecate-hasOutstandingIOU-key
@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] |
Sorry, this one is a bit early for reviewing 😅 |
@rezkiy37 Lets get this one ready for a review today if possible, thanks! |
Yes, will be 👍 |
…/32565-deprecate-hasOutstandingIOU-key
@mountiny, I've removed cc @cubuspl42 |
I think the title of this PR should be updated to catch up with this change. It will help with future navigation across our network of issues & PRs. |
Done |
I meant that "deprecating" is like marking something as not recommended anymore, but keeping some usages. Did I understand correctly that we completely removed all uses of this property instead? So this can be summed up as "Remove..." or "Nuke...", if I understood the change correctly |
src/libs/ReportUtils.ts
Outdated
@@ -1728,7 +1725,7 @@ function getMoneyRequestReportName(report: OnyxEntry<Report>, policy: OnyxEntry< | |||
return Localize.translateLocal('iou.payerSpentAmount', {payer: payerName, amount: formattedAmount}); | |||
} | |||
|
|||
if (!!report?.hasOutstandingIOU || isDraftExpenseReport(report) || moneyRequestTotal === 0) { | |||
if ((report?.stateNum === CONST.REPORT.STATE_NUM.PROCESSING && report?.statusNum === CONST.REPORT.STATUS.SUBMITTED) || isDraftExpenseReport(report) || moneyRequestTotal === 0) { |
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.
I understand that this is the essential line, right?
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.
Good that you updated the tests to reflect these assumptions here 👍
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.
Yeah, @rezkiy37 could you add ReportUtils method which will be called: isProcessingReport
which will do this state/ status check? thanks
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.
Yes, sure.
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.
Done - 9939213.
The code looks good, I'll get to testing |
Reviewer Checklist
Screenshots/VideosWebremove-hasOutstandingIOU-web.mp4Mobile Web - Chromeremove-hasOutstandingIOU-android-web-compressed.mp4Mobile Web - Safariremove-hasOutstandingIOU-ios-web.mp4DesktopiOSremove-hasOutstandingIOU-ios.mp4Androidremove-hasOutstandingIOU-android-compressed.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.
Thanks everyone
✋ 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/mountiny in version: 1.4.12-0 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.12-0 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.12-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.12-2 🚀
|
Details
We have been using the
hasOutstandingIOU
key to indicate that there is some active (ie processing or open) report linked to chat report or as a property on the money request report to indicate the same.In case of IOU/expense report its however redundant as we know the state and status and total so we can derive if the report is active
In case of the parent chat reports (DM in case of IOU and workspace chat in case of expense report) we now have the
hasChildOutstandingRequest
property which indicates there is action required from the user.The
hasOutstandingIOU
property now became redundant so we can remove it.Fixed Issues
$ #32565
$ #32281
PROPOSAL: N/A
Tests
Precondition:
Offline tests
Same as "Tests".
QA Steps
Same as "Tests".
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)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
Android.mp4
Android: mWeb Chrome
Android.Chrome.mp4
iOS: Native
IOS.mp4
iOS: mWeb Safari
IOS.Safari.mp4
MacOS: Chrome / Safari
Chrome.Offline.mp4
Chrome.mp4
MacOS: Desktop
Desktop.mp4