Skip to content

"mergecollection" updates can get lost #46135

Closed

Description

@aldo-expensify

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number:
Reproducible in staging?:
Reproducible in production?:
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:
Slack conversation:

This was found while testing here: https://github.com/Expensify/Auth/pull/11671#issuecomment-2248437345

Action Performed:

  1. Open NewDot in an incognito window (fresh session with empty onyx)
  2. Open the chrome dev console and run the snippet:
    mergecollectionsbug-snippet.txt
  3. Go to the tab to see Onyx data and find the report report_7258727734156717

Expected Result:

The report report_7258727734156717 should be complete and contain:

{
    "chatType": "policyExpenseChat",
    "lastActorAccountID": 11039535,
    "lastMessageText": "",
    "lastReadTime": "2024-07-22 19:27:42.872",
    "lastVisibleActionCreated": "2024-07-22 19:27:42.872",
    "managerID": 0,
    "notificationPreference": "always",
    "ownerAccountID": 11039535,
    "parentReportActionID": null,
    "parentReportID": null,
    "participants": {
        "11039535": {
            "hidden": false
        },
        "11039539": {
            "hidden": false
        },
        "11039540": {
            "hidden": false
        },
        "11039541": {
            "hidden": false
        },
        "11039542": {
            "hidden": false
        },
        "11039543": {
            "hidden": false
        },
        "11039544": {
            "hidden": false
        }
    },
    "policyID": "164FF81CBF695B8D",
    "policyName": "ImTheAdmin ADMIN's Workspace",
    "reportID": "7258727734156717",
    "reportName": "Chat Report",
    "stateNum": 0,
    "statusNum": 0,
    "type": "chat",
    "visibility": null
}

Actual Result:

The report report_7258727734156717 only contains {"lastReadTime": "2024-07-22 19:27:42.872"}

image

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

View all open jobs on GitHub

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 24, 2024
  2. melvin-bot commented on Jul 24, 2024

    @melvin-bot

    Triggered auto assignment to @puneetlath (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.

  3. aldo-expensify commented on Jul 24, 2024

    @aldo-expensify
    ContributorAuthor

    This bug seems to be getting fixed by: Expensify/react-native-onyx#490, so I'll ask when we are planning to have that in the App

  4. aldo-expensify commented on Jul 24, 2024

    @aldo-expensify
    ContributorAuthor

    I tried to write a unit test to include in our test suit for this, but the unit test works just fine 😠:

     it.only('applies PUSHER Onyx updates correctly', () => {
            // When we apply the updates, then their values are updated correctly
            return Onyx.update(xxx) // these are the updates from the snippet in the GH issue body
                .then(() => getOnyxValue('report_7258727734156717'))
                .then((report) => {
                    expect(report).toStrictEqual({
                            "chatType": "policyExpenseChat",
                            "lastActorAccountID": 11039535,
                            "lastMessageText": "",
                            "lastVisibleActionCreated": "2024-07-22 19:27:42.872",
                            "managerID": 0,
                            "notificationPreference": "always",
                            "ownerAccountID": 11039535,
                            "policyAvatar": "",
                            "policyID": "164FF81CBF695B8D",
                            "policyName": "ImTheAdmin ADMIN''s Workspace",
                            "reportID": "7258727734156717",
                            "reportName": "Chat Report",
                            "stateNum": 0,
                            "statusNum": 0,
                            "type": "chat",
                            "lastReadTime": "2024-07-22 19:27:42.872",
                    });
                });
        });
    });
  5. aldo-expensify commented on Jul 24, 2024

    @aldo-expensify
    ContributorAuthor

    This issue may be a duplicate of: #37560 (or at least looks very related)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.WeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions