-
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
Distance - Preview amount after edit distance not update, incorrect report calculations #35178
Comments
Triggered auto assignment to @amyevans ( |
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
We think that this bug might be related to #wave5. |
I think an additional condition that's necessary to reproduce this is: have at least one other request on the report, which is set as non-reimbursable. Does that seem right @lanitochka17? And do you have a recording of it from production? Also cc @aldo-expensify in case you have any additional context on the bug since this was discovered while QAing #34107. |
I couldn't reproduce in production, and I was able to reproduce in staging. |
I'm guessing that the backend is not pushing the updates for the report, I'll check |
Onyx updates in production coming in `response`[
{
"onyxMethod": "merge",
"key": "transactions_6665153331617603740",
"value": {
"amount": -12,
"billable": false,
"cardID": 0,
"category": "Car",
"comment": {
"comment": "",
"customUnit": {
"attributes": [],
"customUnitID": "23F5CDD250EB4",
"customUnitRateID": "6443B06178838",
"name": "Distance",
"quantity": 1.45,
"subRates": []
},
"type": "customUnit",
"waypoints": {
"waypoint0": {
"address": "3300 Heather Street, Vancouver, BC, Canada",
"lat": 49.25610529999999,
"lng": -123.1201544,
"name": "3300 Heather St"
},
"waypoint1": {
"address": "5000 Heather Street, Vancouver, BC, Canada",
"lat": 49.2404922,
"lng": -123.1199583,
"name": "5000 Heather St"
}
}
},
"created": "2024-01-25",
"currency": "CAD",
"filename": "w_a85b979868dc1a2d5444a682c3dd7f202e74adef.png",
"merchant": "0.18 mi @ C$0.67 / mi",
"modifiedAmount": -97,
"modifiedCreated": "2024-01-25",
"modifiedCurrency": "CAD",
"modifiedMerchant": "1.45 mi @ C$0.67 / mi",
"originalAmount": 0,
"originalCurrency": "",
"parentTransactionID": "",
"receipt": {
"receiptID": 689208855,
"state": "OPEN",
"source": "https://www.expensify.com/receipts/w_a85b979868dc1a2d5444a682c3dd7f202e74adef.png"
},
"reimbursable": true,
"reportID": "3837832816596176",
"status": "Posted",
"tag": "",
"transactionID": "6665153331617603740",
"hasEReceipt": false
}
},
{
"onyxMethod": "merge",
"key": "report_3815997082592743",
"value": {
"reportID": "3815997082592743",
"maxSequenceNumber": 3,
"lastVisibleActionCreated": "2024-01-26 00:38:43.438",
"lastReadTime": "2024-01-26 00:38:43.439",
"lastMentionedTime": null,
"lastMessageText": "You",
"lastActorAccountID": 16309584
}
},
{
"onyxMethod": "merge",
"key": "reportActions_3815997082592743",
"value": {
"6650447322382397561": {
"person": [
{
"type": "TEXT",
"style": "strong",
"text": "[email protected]"
}
],
"actorAccountID": 16309584,
"message": [
{
"type": "TEXT",
"style": "strong",
"text": "You"
},
{
"type": "TEXT",
"style": "normal",
"text": " modified expense '0.43 mi @ C$0.67 / mi'. "
},
{
"type": "TEXT",
"style": "normal",
"text": "New merchant is '1.45 mi @ C$0.67 / mi' (previously '0.43 mi @ C$0.67 / mi'). "
},
{
"type": "TEXT",
"style": "normal",
"text": "New amount is 'C$0.97' (previously 'C$0.29'). "
}
],
"originalMessage": {
"amount": 97,
"currency": "CAD",
"lastModified": "2024-01-26 00:38:43.438",
"merchant": "1.45 mi @ C$0.67 / mi",
"oldAmount": 29,
"oldCurrency": "CAD",
"oldMerchant": "0.43 mi @ C$0.67 / mi"
},
"avatar": "https://d2k5nsl2zxldvw.cloudfront.net/images/avatars/default-avatar_7.png",
"created": "2024-01-26 00:38:43.438",
"timestamp": 1706229523,
"reportActionTimestamp": 1706229523438,
"automatic": false,
"actionName": "MODIFIEDEXPENSE",
"shouldShow": true,
"reportActionID": "6650447322382397561",
"previousReportActionID": "70323599490171598",
"lastModified": "2024-01-26 00:38:43.438",
"actorEmail": "[email protected]",
"whisperedToAccountIDs": [],
"sequenceNumber": 3,
"isAttachment": false
}
},
"shouldNotify": true
},
{
"onyxMethod": "merge",
"key": "report_3837832816596176",
"value": {
"reportID": "3837832816596176",
"reportName": "Expense Report #3837832816596176",
"type": "expense",
"chatType": "",
"ownerAccountID": 16309584,
"managerID": 16309584,
"policyID": "34CC91B2A58E34A7",
"participantAccountIDs": [],
"visibleChatMemberAccountIDs": [],
"isPinned": false,
"lastReadTime": "2024-01-26 00:34:10.646",
"lastMentionedTime": null,
"lastReadSequenceNumber": 0,
"lastVisibleActionCreated": "2024-01-26 00:34:10.646",
"lastVisibleActionLastModified": "2024-01-26 00:34:10.646",
"lastMessageText": "CA$0.12 request for 0.18 miles",
"lastActorAccountID": 16309584,
"notificationPreference": "hidden",
"welcomeMessage": "",
"stateNum": 1,
"statusNum": 1,
"oldPolicyName": "",
"visibility": null,
"isOwnPolicyExpenseChat": false,
"lastMessageHtml": "CA$0.12 request for 0.18 miles",
"iouReportID": null,
"hasOutstandingChildRequest": false,
"policyName": null,
"hasParentAccess": true,
"parentReportID": "5329212264991405",
"parentReportActionID": "4336444692735853023",
"writeCapability": "all",
"description": "",
"isDeletedParentAction": null,
"reportFields": null,
"total": -97,
"currency": "CAD",
"submitterPayPalMeAddress": "",
"chatReportID": "5329212264991405",
"isWaitingOnBankAccount": false,
"nonReimbursableTotal": 0,
"isCancelledIOU": false
}
}
] Onyx updates coming in response in `staging`[
{
"onyxMethod": "merge",
"key": "transactions_6665153331617603740",
"value": {
"amount": -12,
"billable": false,
"cardID": 0,
"category": "Car",
"comment": {
"comment": "",
"customUnit": {
"attributes": [],
"customUnitID": "23F5CDD250EB4",
"customUnitRateID": "6443B06178838",
"name": "Distance",
"quantity": 0.88,
"subRates": []
},
"type": "customUnit",
"waypoints": {
"waypoint0": {
"address": "3300 Heather Street, Vancouver, BC, Canada",
"lat": 49.25610529999999,
"lng": -123.1201544,
"name": "3300 Heather St"
},
"waypoint1": {
"address": "2000 Heather Street, Vancouver, BC, Canada",
"lat": 49.2656839,
"lng": -123.1197975,
"name": "2000 Heather St"
}
}
},
"created": "2024-01-25",
"currency": "CAD",
"filename": "w_7a7ab41ed50a09bfca3e95c558f93d7d474d06a4.png",
"merchant": "0.18 mi @ C$0.67 / mi",
"modifiedAmount": -59,
"modifiedCreated": "2024-01-25",
"modifiedCurrency": "CAD",
"modifiedMerchant": "0.88 mi @ C$0.67 / mi",
"originalAmount": 0,
"originalCurrency": "",
"parentTransactionID": "",
"receipt": {
"receiptID": 689208855,
"state": "OPEN",
"source": "https://staging.expensify.com/receipts/w_7a7ab41ed50a09bfca3e95c558f93d7d474d06a4.png"
},
"reimbursable": true,
"reportID": "3837832816596176",
"status": "Posted",
"tag": "",
"transactionID": "6665153331617603740",
"hasEReceipt": false
}
},
{
"onyxMethod": "merge",
"key": "report_3815997082592743",
"value": {
"reportID": "3815997082592743",
"maxSequenceNumber": 4,
"lastVisibleActionCreated": "2024-01-26 00:39:35.211",
"lastReadTime": "2024-01-26 00:38:43.439",
"lastMentionedTime": null,
"lastMessageText": "You",
"lastActorAccountID": 16309584
}
},
{
"onyxMethod": "merge",
"key": "reportActions_3815997082592743",
"value": {
"324025560165939807": {
"person": [
{
"type": "TEXT",
"style": "strong",
"text": "[email protected]"
}
],
"actorAccountID": 16309584,
"message": [
{
"type": "TEXT",
"style": "strong",
"text": "You"
},
{
"type": "TEXT",
"style": "normal",
"text": " modified expense '1.45 mi @ C$0.67 / mi'. "
},
{
"type": "TEXT",
"style": "normal",
"text": "New merchant is '0.88 mi @ C$0.67 / mi' (previously '1.45 mi @ C$0.67 / mi'). "
},
{
"type": "TEXT",
"style": "normal",
"text": "New amount is 'C$0.59' (previously 'C$0.97'). "
}
],
"originalMessage": {
"amount": 59,
"currency": "CAD",
"lastModified": "2024-01-26 00:39:35.211",
"merchant": "0.88 mi @ C$0.67 / mi",
"oldAmount": 97,
"oldCurrency": "CAD",
"oldMerchant": "1.45 mi @ C$0.67 / mi"
},
"avatar": "https://d2k5nsl2zxldvw.cloudfront.net/images/avatars/default-avatar_7.png",
"created": "2024-01-26 00:39:35.211",
"timestamp": 1706229575,
"reportActionTimestamp": 1706229575211,
"automatic": false,
"actionName": "MODIFIEDEXPENSE",
"shouldShow": true,
"reportActionID": "324025560165939807",
"previousReportActionID": "6650447322382397561",
"lastModified": "2024-01-26 00:39:35.211",
"actorEmail": "[email protected]",
"whisperedToAccountIDs": [],
"sequenceNumber": 4,
"isAttachment": false
}
},
"shouldNotify": true
},
{
"onyxMethod": "merge",
"key": "report_3837832816596176",
"value": {
"reportID": "3837832816596176",
"reportName": "Expense Report #3837832816596176",
"type": "expense",
"chatType": "",
"ownerAccountID": 16309584,
"managerID": 16309584,
"policyID": "34CC91B2A58E34A7",
"participantAccountIDs": [],
"visibleChatMemberAccountIDs": [],
"isPinned": false,
"lastReadTime": "2024-01-26 00:34:10.646",
"lastMentionedTime": null,
"lastReadSequenceNumber": 0,
"lastVisibleActionCreated": "2024-01-26 00:34:10.646",
"lastVisibleActionLastModified": "2024-01-26 00:34:10.646",
"lastMessageText": "CA$0.12 request for 0.18 miles",
"lastActorAccountID": 16309584,
"notificationPreference": "hidden",
"welcomeMessage": "",
"stateNum": 1,
"statusNum": 1,
"oldPolicyName": "",
"visibility": null,
"isOwnPolicyExpenseChat": false,
"lastMessageHtml": "CA$0.12 request for 0.18 miles",
"iouReportID": null,
"hasOutstandingChildRequest": false,
"policyName": null,
"hasParentAccess": true,
"parentReportID": "5329212264991405",
"parentReportActionID": "4336444692735853023",
"writeCapability": "all",
"description": "",
"isDeletedParentAction": null,
"reportFields": null,
"total": -97,
"currency": "CAD",
"submitterPayPalMeAddress": "",
"chatReportID": "5329212264991405",
"isWaitingOnBankAccount": false,
"nonReimbursableTotal": -38,
"isCancelledIOU": false
}
}
] The problem I see is that staging is returning |
I think the bug is that the command Maybe the second part about |
I guess it depends on if we are planning to deploy App today |
Created PR to fix this: https://github.com/Expensify/Auth/pull/9745 |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
The Auth PR is merged, but this issue will still be occurring until Auth deploy happens - so leaving the blocker label on |
👍 Auth deploy probably won't be until Monday fwiw. I can retest to verify once deployed. Thanks for the quick PR @aldo-expensify! |
Auth deployed this morning. Although now in testing, I'm just hitting #35280 so I can't reach the bug 😅. But I suppose that means we should just remove the blocker label and deploy. Do you agree @aldo-expensify? |
I think you can go around that bug by refreshing the page before trying to edit the transaction (or something like that). I was able to edit the waypoints and the Screen.Recording.2024-01-29.at.10.00.40.AM.mov |
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: 1.4.32-2
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause- Internal Team
Slack conversation:
Issue found when executing PR #34107
Action Performed:
Prerequisite: Free workspace exists for user
Expected Result:
Request preview should display updated request amount, and request report should show correct calculations
Actual Result:
Request amount does not update in the original workspace chat
Total in report is not updated, and can lead to negative company spend values if new distance is greater than the original
Pay XXX with Expensify button value is not updated
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6355033_1706210343376.2024-01-25_19-06-54.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: