-
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
Replace policy.submitsTo with PolicyUtils.getSubmitToAccountID #40532
Replace policy.submitsTo with PolicyUtils.getSubmitToAccountID #40532
Conversation
cc: @getusha |
@bernhardoj looking good, thanks! 👍 |
Please always test on all platforms 🙇 |
Updated the code, will complete the rest of the recording tomorrow. |
Recording/screenshot complete. |
👋 @getusha this is a deliverable for our May release, can you review the PR today please? Thanks! |
I will, thanks! |
I'm taking over the review here based on #40356 (comment). |
Assigned you, @ikevin127! |
Reviewer Checklist
Screenshots/VideosAndroid: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
|
Test check: Warning @bernhardoj I found issues with test
The issues are the following for Test C:
To see the behaviour more clearly here's the video from web: C-web-issue.movImportant Same as for test C, test D has similar behaviour in the fact that if we wait a bit after we press Note: for test D the message also changes after the approver opens the report if we wait a bit from "These expenses are scheduled to automatically submit on Sunday! No further action required!" to "[email protected] is waiting for you to review these expenses." -> then once If this is expected behaviour let me know and I'll check the last checkbox and approve! |
That doesn't sound right. It shouldn't be reverting back to the previous next step. Is there a mismatch of what the OldDot next steps banner shows when this happens if you look at the corresponding expense report? CC: @mountiny as perhaps being related to "optimistic next steps" |
Just tested and there's no mismatch on OD side, only thing is that on OD we have to refresh the page to see the changes but the next step status is correct on OD compared to issues reported from testing on this branch. I performed a C.movNow only test D.movNote If this issues are not reproducible on anybody else's side, neither author or CME, then I can approve as there might be something going on specifically on my side which causes the weird behaviour. Let me know! |
So, for test D, if I understand correctly, there are 2 issues:
The outdated next step in storage The updated next step received from OpenReport
The optimistic next step for approved action doesn't have a case when to show the "No further action required" case Lines 273 to 322 in 64695c8
This issue happens on the staging too. Screen.Recording.2024-04-23.at.10.46.36.mov |
For the test C, I can reproduce what you reproduced earlier @ikevin127. Here is the root cause of each issue:
How can this happen? If you open the report and quickly submit it before the OpenReport request completes, the outdated response from OpenReport will overwrite our optimistic next step.
Both happens on main too. |
@bernhardoj Thanks for checking! Indeed for Test C it's on and off for me regarding the issue, sometimes it works as expected, sometimes next steps text jumps back. As for Test D, if that happens on staging too and CME is fine with moving on in this state then that's fine with me. @flodnv @trjExpensify Let me know and I'll complete the checklist and approve! |
This is probably expected, I believe that we did not have the dedicated reimburser logic yet when the next steps were built optimistically Eitherway, what is coming from the BE should be correct after taking some action so we should make sure the optimistic steps match it. They did match it when it was build first time but we are adding more policy data/ conditions to the app throughout simplified collect so it could be that some conditions should have been updated along the way too Dont forget there are unit tests for the next steps so please cover everything that is changing there |
What are the next steps here? |
We are not changing the next step in this PR, but just to make sure the next step still works as expected, but @ikevin127 found some issues with it that also exist on |
If both issues happen exactly the same way on
Right? |
I agree with that cc: @ikevin127 |
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 everybody for chiming-in on this!
Based on the latest discussions it looks like we're fine moving on with this PR even though there were some issues with two of the test scenarios during testing, issues related to the next steps logic / incoming BE data.
These will be handled as separete issues and therefore won't be reported as regressions of this PR post-merge, that's all I wanted to confirm!
Thanks @ikevin127 -- can you please report these in #expensify-bugs ? |
✋ 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/flodnv in version: 1.4.66-0 🚀
|
🚀 Deployed to staging by https://github.com/flodnv in version: 1.4.66-0 🚀
|
@flodnv Reported in Slack 🧵, feel free to add more info in 🧵 if you think I missed anything. |
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.66-5 🚀
|
@bernhardoj @ikevin127 Seems like this PR caused #41081, is it a regression of this PR or we should handle it separately? Cc @flodnv |
It's an existing issue, so should be handled separately |
@bernhardoj in this PR we added another usage of |
Thank you!! 🙇 |
Details
We want to create a new util function
PolicyUtils.getSubmitToAccountID
and replacepolicy.submitsTo
usage with the new function.Fixed Issues
$ #40356
PROPOSAL: #40356 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
A. Prevent self-approval
Note: Remember to disable prevent self-approval back
B. Approval optional
C. Self-approval
D. Other approver
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.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 and/or tagged@Expensify/design
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
A. Prevent self-approval
B. Approval optional
Screen.Recording.2024-04-20.at.13.06.00.mov
C. Self-approval
Screen.Recording.2024-04-20.at.13.10.44.mov
D. Other approver
Screen.Recording.2024-04-20.at.13.15.10.mov
Android: mWeb Chrome
A. Prevent self-approval
B. Approval optional
Screen.Recording.2024-04-20.at.13.06.56.mov
C. Self-approval
Screen.Recording.2024-04-20.at.13.09.23.mov
D. Other approver
Screen.Recording.2024-04-20.at.13.20.18.mov
iOS: Native
A. Prevent self-approval
B. Approval optional
Screen.Recording.2024-04-20.at.13.04.15.mov
C. Self-approval
Screen.Recording.2024-04-20.at.13.12.21.mov
D. Other approver
Screen.Recording.2024-04-20.at.13.21.32.mov
iOS: mWeb Safari
A. Prevent self-approval
B. Approval optional
Screen.Recording.2024-04-20.at.13.05.06.mov
C. Self-approval
Screen.Recording.2024-04-20.at.13.11.31.mov
D. Other approver
Screen.Recording.2024-04-20.at.13.22.19.mov
MacOS: Chrome / Safari
A. Prevent self-approval
B. Approval optional
Screen.Recording.2024-04-19.at.15.03.41.mov
C. Self-approval
Screen.Recording.2024-04-19.at.15.04.57.mov
D. Other approver
Screen.Recording.2024-04-19.at.15.13.13.mov
Screen.Recording.2024-04-19.at.15.27.50.mov
MacOS: Desktop
A. Prevent self-approval
B. Approval optional
Screen.Recording.2024-04-20.at.13.03.09.mov
C. Self-approval
Screen.Recording.2024-04-20.at.13.08.43.mov
D. Other approver
Screen.Recording.2024-04-20.at.13.23.08.mov