-
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
[CRITICAL] Backwards Compatibility - Moving expenses between reports #33177
Comments
Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Eep! 4 days overdue now. Issues have feelings too... |
Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it! |
10 days overdue. I'm getting more depressed than Marvin. |
12 days overdue now... This issue's end is nigh! |
This issue has not been updated in over 14 days. eroding to Weekly issue. |
Looking into this now. |
I think we mean ReportTransactions here? Or, am I missing something? |
Thinking of how to break this up into as small pieces as possible. Going to tackle this first:
|
Asked a question about the above here: https://expensify.slack.com/archives/C02MW39LT9N/p1704494359050069 |
Asked another question about this:
|
Okay trying to summarize what this looks like presently so I can understand what we need to fix. I currently create a Money Request in NewDot. This creates the following report
The transaction
And it has an IOU report action that corresponds to it:
That Money Request has a transaction thread
I now change the transaction to go on another report in the same policy.New reportID: If I click on the IOU report action, it still takes me to Makes sense because the IOU report action is unchanged:
So this makes sense to me:
We need to update the Looking at the old report:
... All good with the report object itself in the db ✅
... rNVPs for the old report are unchanged The transaction itself gets the reportID changed to the new one:
And we do have another IOU report action for it, this happens here:
And then looking at the new report there is no cachedData, as with the old report:
After the ... This makes me think if we don't have any more expense left on the report we need to delete the report preview action as well. |
Okay so will tackle this one first:
|
Have a WIP PR up, just to make sure I'm on the right track for tackling the tight scope of "Change the reportID of the IOU report action linked to the transaction to the new reportID" |
Looking at:
I believe we already do this here: So I think the above PR which tackles:
... is ready to pretty up. And then as a follow up we can do the following:
and
...in separate follow-up PRs - what do you think of this plan @mountiny? If 👍 I'll add tests to the above WIP PR and get it ready for review. |
I love this plan, thanks for digging into this one! |
Triggered auto assignment to @greg-schroeder ( |
PR is approved for this! @flodnv had a question but I think we answered it! ....Should I just merge? |
Closing this in favor of https://github.com/Expensify/Expensify/issues/364642 Moving expenses between reports has been deployed 🎉 |
Problem
As part of the workspace chats for paid group policies, we need to make sure actions possible to take in OldDot are correctly reflected in NewDot.
One of them is moving expenses between reports, this influences how the expense reports are shown in newdot.
The high level details are explained in the Design doc section here in terms of what we need to do.
Solution
In OldDot, users can move an expense/money request from one report to another report. With the App IOU report actions approach, this however means we need to handle some additional stuff when such a move occurs.
When an expense is moved from ReportA to ReportB and both reports are on the same policy-expense-chat-enabled policies, we need to in UpdateTransaction:
If we move the expense to a report on policy without workspace chat, we will delete the policy expense chat aspects of the expense report. We will delete the report preview, the parent reportID rNVP, and parent report action rNVP.
If we unreport an expense, let's move the IOU report action to the deleted report so it's not shown on any expense report.
Please bring any questions to the wave6 room, the design doc is not written in a lot of detail but the things we need to do are captured there in plain English
The text was updated successfully, but these errors were encountered: