Fix: Optimistically copy submission/approval related report actions#77960
Fix: Optimistically copy submission/approval related report actions#7796013 commits merged intoExpensify:mainfrom
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@parasharrajat 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] |
…nction to getDuplicateActionsForPartialReport
|
@mohammadjafarinejad I think you should use this #77960 (comment). It will automatically enable types based on the key used. |
|
@mohammadjafarinejad Use these test steps
|
…update related functions
|
@parasharrajat Thanks for the test steps. @cristipaval I think we need a new parameter in Currently, when workflow actions are copied to a new partial report, they appear duplicated because the backend generates new IDs instead of using the frontend's optimistic IDs. App/src/libs/API/parameters/PayMoneyRequestParams.ts Lines 12 to 19 in 0caab12 |
…ortActionIDs and update related functions
|
I'll work on this early next week |
|
Gentle reminder for this @cristipaval. |
@mohammadjafarinejad @parasharrajat, could you please help me with the reproduction steps for this? 🙏 |
|
|
@mohammadjafarinejad We shouldn't copy the actions for Pay Flow. Can you restrict it to approvals only? Did you check whether backend creates copy of actions for pay flow as well? |
yes, @parasharrajat and I chatted internally and I confirm this. I also tested and the backend doesn't create report action copies as part of the Pay flow |
|
Any update @mohammadjafarinejad |
|
Bump @mohammadjafarinejad |
|
I see. thanks. |
|
Oh I can take over, but since the contributor was the author. I think I'll open a new PR based on these changes here? |
@parasharrajat @cristipaval Quick question: Which action is related to the Pay flow? |
|
when you say action? What do you mean @hungvu193? Here are the test steps for pay flow #77960 (comment). |
Oh I mean report action. |
|
You will have to debug that. I am not sure about it currently. So you need to add if condition to make sure that changes are only only approveflow. I don't remember but we recently merged a PR that adds that filteration logic so you just need to use that. |
|
I see. Thanks! |
|
I created a draft PR here: https://github.com/Expensify/App/pull/79524/changes |
03484e9

Explanation of Change
Optimistically copy submission/approval related report actions
Fixed Issues
$ #74575
PROPOSAL: #74575 (comment)
Tests
Offline tests
Same as test.
QA Steps
Same as test.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.mp4
Android: mWeb Chrome
android_web.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios_web.mp4
MacOS: Chrome / Safari
web.mp4