[$250] Track – Setting expense to unreported in OldDot turn the expense in workspace chat to 0.00
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.24-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4887079&group_by=cases:section_id&group_order=asc&group_id=309130 Email or phone of affected tester (no customers): [email protected] **Issue reported by:**Applause - Internal Team
Action Performed:
Precondition:
- In OldDot - Create an unreported transaction on OldDot
- Verify that it shows up on the self-DM in NewDot
- In OldDot - add the transaction to a report
- Verify it is removed from the self-DM in DM and send to Workspace chat
- In OldDot - make the transaction unreported again
Expected Result:
Transaction should be removed from workspace chat and send to self-DM chat again
Actual Result:
Same transaction is present on self-DM chat and workspace chat Sometimes the transaction in workspace chat appears with amount set to 0.00
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [x] Android: Native
- [x] Android: mWeb Chrome
- [ ] iOS: Native
- [ ] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/d8ff2715-3aa8-46fb-a165-fba740c7808e
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~018a4221d84dcbfb8b
- Upwork Job ID: 1829267536895122660
- Last Price Increase: 2024-09-05
Triggered auto assignment to @johncschuster (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
@johncschuster FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
I believe this is part of the same issue and should be fixed along with it. https://github.com/Expensify/App/issues/46287.
My proposal outlines one possible client-side solution.
@johncschuster Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Raised in Slack. Keeping at a lower priority while we focus on higher urgency items.
Job added to Upwork: https://www.upwork.com/jobs/~018a4221d84dcbfb8b
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (External)
@johncschuster, @aimane-chnaif Whoops! This issue is 2 days overdue. Let's get this updated quick!
Awaiting proposals
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@johncschuster @aimane-chnaif this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Hi, I am Michael (Mykhailo) from Callstack, an expert agency and I can work on this issue.
@johncschuster, @aimane-chnaif Huh... This is 4 days overdue. Who can take care of this?
I am testing the bug.
I've completed the testing. I can confirm that it is a backend bug. There are 2 places to fix:
- Pusher: it does not send updates when the user makes the transaction unreported again. Neither the workspace chat nor the self-DM chat receives updates with added/removed expenses.
- The backend does not remove unreported transactions from the workspace chat. The backend still includes the transactions and successfully fetches its reports. Also, it duplicates report actions if the user makes the transaction reported again.
We need an internal engineer here 🙂
https://github.com/user-attachments/assets/68898e80-3a63-4b6e-b825-5bc7f88f65e9
cc @johncschuster
Amazing. Thanks for doing that, @rezkiy37! @dylanexpensify beat me to it, and has applied the Internal label. We'll get someone on this ASAP!
@johncschuster, @rezkiy37, @aimane-chnaif Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@johncschuster, @rezkiy37, @aimane-chnaif 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
@dylanexpensify can you help me prioritize this internally?
@johncschuster @rezkiy37 @aimane-chnaif this issue is now 4 weeks old, please consider:
- Finding a contributor to fix the bug
- Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
- If you have any questions, don't hesitate to start a discussion in #expensify-open-source
Thanks!
Chatted in Slack about this one. We agree this is still worth fixing, but it's currently a lower priority while we focus on more urgent things.
Issue not reproducible during KI retests. (First week)
@johncschuster, @rezkiy37, @aimane-chnaif Whoops! This issue is 2 days overdue. Let's get this updated quick!
Great! Let's wait one more week. If not reproducible, we can close the issue.
We need a retest on this, but it looks like we should wait until the next deploy
I just retested this and it's very reproducible.
In OldDot - Create an unreported transaction on OldDot Verify that it shows up on the self-DM in NewDot
👍
In OldDot - add the transaction to a report
Personal DM lastMessageText is wrong. Also, should the Workspace Chat say tracked $666.00 ?
When I refresh the page this is what I see...
Note: The expense on the Workspace chat also still says "Unreported" - which is another thing to fix.
Which seems correct 👍
In OldDot - make the transaction unreported again Transaction should be removed from workspace chat and send to self-DM chat again
Yes, well, this doesn't happen. In fact, nothing happens.
But when you refresh the page we get this:
I think what we should do is break this up into a few separate tasks and address each one at a time.
Oh there's also this other bug...
Loading state shown incorrectly
- Create a new account in NewDot
- Create a workspace
- Sign in on OldDot
- Create an unreported expense
- Verify that the expense shows in the self DM in NewDot 💥 we see a loading indicator...
Why it happens...
The transaction itself appears to not get sent to the client...
Fixing it here
- [ ] https://github.com/Expensify/Auth/pull/12752
Adding unreported transaction to report
- Add unreported transaction to report in OldDot
- Verify that it is removed from the selfDM lastMessageText
- Verify that it is moved to the Workspace Chat
- Verify the Workspace Chat text says "tracking $total” and not “tracked”
- Verify the Workspace shows the correct report preview
- Verify that the transaction no longer says “Unreported”.
- [ ] TODO
Removing previously reported transaction by marking it as unreported
- Remove reported transaction by unreporting it in OldDot
- Verify that it is removed from the Workspace Chat and lastMessageText updated correctly
- Verify that it is moved to the selfDM and lastMessageText updated correctly
- Verify the Self DM LHN says “tracked $total” and not “tracking $total”
- Verify the Workspace shows the empty state again
- Verify that the transaction shows in the Self DM and says “Unreported”
- [ ] TODO
Checking into some more stuff on the backend for this one...
It looks we do set the money request report preview with an update like this:
{
"key": "reportActions_1229374452552951",
"onyxMethod": "merge",
"value": {
"5017207174434834948": {
"message": [
{
"deleted": "2024-10-16 02:00:57.518",
"type": "TEXT"
}
],
"originalMessage": {
"deleted": "2024-10-16 02:00:57.518"
}
}
}
Though, in my local testing the issue persists. The LHN text also remains out of date even though the update appears to get queued from the backend.
Spent many hours with this. This flow is a bit complex and very broken so it may take some more time to figure it all out.
One problem appears to be while updates are queued in Auth they are never returned to the web API so that they can be sent in realtime.
Even if we start queuing the correct updates the user won't see them until they take some action. Asked in Slack if this is expected as I have not worked much on a compatibility issue like this before.