-
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
Refactor custom unit rate update #10557
Conversation
…e before continuing with errors
…olicyCustomUnitRateUpdate
@amyevans Hmm looks like there weren't any conflicts but merged main anyways, thanks for the heads up! I'll ping ya when the tests are done. |
|
Oh weird, maybe I was looking at an older copy of the branch locally 🤔 Thanks for hopping on that! |
@amyevans Tests passing, feel free to merge if everything checks out! |
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 tested again locally 👍
@amyevans looks like this was merged without passing tests. Please add a note explaining why this was done and remove the |
Tests were passing Melv |
I expected to find a failed CP run for this, but I can't see it here 😕 |
…nitRateUpdate Refactor custom unit rate update (cherry picked from commit 29c0e21)
…-10557 🍒 Cherry pick PR #10557 to staging 🍒
🚀 Cherry-picked to staging by @amyevans in version: 1.1.97-4 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Cherry-picked to staging by @amyevans in version: 1.1.97-3 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Cherry-picked to staging by @amyevans in version: 1.1.97-7 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 1.3.28-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
API.write('UpdateWorkspaceCustomUnitRate', { | ||
policyID, | ||
customUnitID, | ||
customUnitRate: JSON.stringify(newCustomUnitRate), |
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.
This caused a regression #26676. Previously the custom unit rate was simplified to only include relevant data that should be sent. Now we are sending the data from Onyx which may include client-only fields such as pendingAction
and errors
.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/215183
Tests
PolicyAPI::setWorkspaceCustomUnitRate
to simulate throwing an error:PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
displayName
propertythis
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)PR Reviewer Checklist
The Contributor+ will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
have been tested & I retested again)/** comment above it */
displayName
propertythis
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)QA Steps
Identical to testing steps (see above)
Screenshots
Web
Mobile Web
Desktop
iOS
Android