-
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
[NoQA] Copy category over from expense when Editing a Money Request #27055
Conversation
@marcochavezf 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] |
efb912d
to
7420167
Compare
src/libs/TransactionUtils.js
Outdated
@@ -142,6 +142,9 @@ function getUpdatedTransaction(transaction, transactionChanges, isFromExpenseRep | |||
updatedTransaction.receipt.state = CONST.IOU.RECEIPT_STATE.OPEN; | |||
} | |||
|
|||
// Always copy over the category for now until we have a way to edit it (Will be implemented in https://github.com/Expensify/App/issues/24464) | |||
updatedTransaction.category = transaction.category; |
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.
Is this... required, we clone the original transaction at the start of this method so that would be included.
What we have to do is to add it as a param to the edit money request call and create a new getter for it and return it in the getTransactionDetails
Lines 1058 to 1071 in 67df8e9
const {created, amount, currency, comment, merchant} = ReportUtils.getTransactionDetails(updatedTransaction); | |
API.write( | |
'EditMoneyRequest', | |
{ | |
transactionID, | |
reportActionID: updatedReportAction.reportActionID, | |
created, | |
amount, | |
currency, | |
comment, | |
merchant, | |
}, | |
{optimisticData, successData, failureData}, | |
); |
Vit is right as always Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
Reviewer Checklist
Screenshots/VideosNo specific QA here. WebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
Updated! |
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!
@mountiny looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
All tests were passing at the time |
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.69-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.69-2 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.70-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.70-8 🚀
|
@mountiny please review
Details
Right now this doesn't really do anything at all since categories are just going to be dropped by the API. However once categories are supported by the API this will ensure we can still call the
EditMoneyRequest
command without resetting the category because there is no selector for it in NewDot (yet, this is coming in #24464)Fixed Issues
A part of #24464 and https://github.com/Expensify/Expensify/issues/312623
Tests/QA
Offline 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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android