-
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
Use set method when creating policy for payment #32959
Conversation
src/libs/actions/Policy.js
Outdated
@@ -1712,37 +1712,37 @@ function createWorkspaceFromIOUPayment(iouReport) { | |||
|
|||
const failureData = [ | |||
{ | |||
onyxMethod: Onyx.METHOD.MERGE, | |||
onyxMethod: Onyx.METHOD.SET, |
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.
@dukenv0307, can you please explain why failureData
also needs SET
?
Based on my understanding of this comment, only optimisticData
needs SET
. 🤔
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.
@ntdiary This is the same way we do when we create a new workspace.
Hi, @dukenv0307, could you please resolve conflicts first. And then I can test soon. :) |
@ntdiary I updated. |
Reviewer Checklist
Screenshots/VideosAndroid: Native32959-android-native.mp4Android: mWeb Chrome32959-android-chrome.mp4iOS: Native32959-ios-native.mp4iOS: mWeb Safari32959-ios-safari.mp4MacOS: Chrome / Safari32959-web.mp4MacOS: Desktop32959-desktop.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.
Note: so far, we can only fix the delay issue during navigation through SET
method.
BTW, during testing, I encountered an issue where the iouReport
object does not have the 'ownerEmail' field, which results in a failed workspace creation, leading to a persistent 'not found' page. However, this is unrelated to this PR. I'm not sure if I'm the only one facing this problem, so it would be great if you could try testing it again, @dukenv0307. :)
App/src/libs/actions/Policy.ts
Line 1625 in 675b2c3
const employeeEmail = iouReport.ownerEmail; |
App/src/libs/actions/Policy.ts
Line 1645 in 675b2c3
if (!employeeAccountID || !employeeEmail) { |
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, thanks. Before I merge, @dukenv0307 would you please update the test/QA steps. You can't pay a request unless you owe money to the participant.
Also cc @mountiny if you want to review
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 Neil! Code looks good to me.
@ntdiary is this issue reproducible everytime? If yes can you please create bug report in expensify-bugs? |
Sure, I can test and report it tomorrow. :) |
✋ 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.33-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.4.33-5 🚀
|
Details
Use set method when creating policy for payment
Fixed Issues
$ #31836
PROPOSAL: #31836 (comment)
Tests
Payment with Exensify
Offline tests
Same as above
QA Steps
Payment with Exensify
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)Design
label so the design team can review the changes.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-12-13.at.14.48.11.mov
Android: mWeb Chrome
Screen.Recording.2023-12-13.at.14.42.49.mov
iOS: Native
Screen.Recording.2023-12-13.at.14.50.38.mov
iOS: mWeb Safari
Screen.Recording.2023-12-13.at.14.46.04.mov
MacOS: Chrome / Safari
Screen.Recording.2023-12-13.at.14.36.34.mov
MacOS: Desktop
Screen.Recording.2023-12-13.at.14.55.43.mov