Skip to content

[HOLD for payment 2024-08-14] [$250] Accounting - Last synced time doesn't reflect the correct time #45780

Closed

Description

@lanitochka17

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: 9.0.9-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Navigate to staging.new.expensify.com
  2. Create a workspace
  3. Establish a connection with Xero
  4. Wait for a few minutes and refresh the page to update the latest synced time
  5. Click on three dot and click on sync now

Expected Result:

The last synced time updates

Actual Result:

The last synced time shows stale data

Workaround:

Unknown

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

Bug6547081_1721385674444.bandicam_2024-07-19_13-39-42-768.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0117d6782d3d2e2e77
  • Upwork Job ID: 1815273731940343516
  • Last Price Increase: 2024-07-22
  • Automatic offers:
    • eh2077 | Reviewer | 103311561
Issue OwnerCurrent Issue Owner: @VictoriaExpensify

Activity

  1. added
    Daily
    Bug
    on Jul 19, 2024
  2. melvin-bot commented on Jul 19, 2024

    @melvin-bot

    Triggered auto assignment to @VictoriaExpensify (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. lanitochka17 commented on Jul 19, 2024

    @lanitochka17
    Author

    @VictoriaExpensify 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

  4. lanitochka17 commented on Jul 19, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #wave-collect - Release 2

  5. nyomanjyotisa commented on Jul 20, 2024

    @nyomanjyotisa
    Member

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Last synced time doesn't reflect the correct time

    What is the root cause of that problem?

    On sync connection, We don't add optimistic data to update the lastSync when calling SyncPolicyToXero or other connections

    And the new lastSync onyx data received on the GetMissingOnyxMessages API response after SyncPolicyToXero done, so it will be some delay updating the last synced time. This delay can be more noticeable if the internet speed is slow

    What changes do you think we should make in order to solve the problem?

    Update the lastSync successfulDate value on syncConnection optimisticData here

            {
                onyxMethod: Onyx.METHOD.MERGE,
                key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
                value: {
                    connections: {
                        [connectionName]: {
                            lastSync: {
                                successfulDate: new Date().toISOString()
                            }
                        }
                    }
                },
            },
    

    RESULT

    -2-New-Expensify.1.mp4

    What alternative solutions did you explore? (Optional)

  6. VictoriaExpensify commented on Jul 22, 2024

    @VictoriaExpensify
    Contributor

    I wasn't able to view your video past 2 seconds @lanitochka17 , but your Action Performed was clear and I've been able to reproduce the issue

    2024-07-22_16-30-06 (1)

    Agree this is Wave_Collect

  7. added
    External
    on Jul 22, 2024
  8. changed the title [-]Accounting - Last synced time doesn't reflect the correct time[/-] [+][$250] Accounting - Last synced time doesn't reflect the correct time[/+] on Jul 22, 2024
  9. melvin-bot commented on Jul 22, 2024

    @melvin-bot
  10. added
    Help Wanted
    on Jul 22, 2024
  11. melvin-bot commented on Jul 22, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @eh2077 (External)

  12. 25 remaining items

  13. removed
    Reviewing
    on Aug 7, 2024
  14. melvin-bot commented on Aug 7, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.17-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2024-08-14. 🎊

    For reference, here are some details about the assignees on this issue:

  15. melvin-bot commented on Aug 7, 2024

    @melvin-bot

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@eh2077] The PR that introduced the bug has been identified. Link to the PR:
    • [@eh2077] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@eh2077] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@eh2077] Determine if we should create a regression test for this bug.
    • [@eh2077] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@VictoriaExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  16. added
    Daily
    and removed
    Weekly
    on Aug 14, 2024
  17. VictoriaExpensify commented on Aug 15, 2024

    @VictoriaExpensify
    Contributor

    Payment Summary:
    Contributor+: @eh2077 paid $250 via Upwork

    @daledah - please accept the Upwork offer so I can process your payment.

  18. daledah commented on Aug 15, 2024

    @daledah
    Contributor

    @VictoriaExpensify Accepted thank u

  19. VictoriaExpensify commented on Aug 18, 2024

    @VictoriaExpensify
    Contributor

    Payment summary:
    Contributor: @daledah paid $250 via Upwork

  20. VictoriaExpensify commented on Aug 18, 2024

    @VictoriaExpensify
    Contributor

    @eh2077 can you please finish the checklist so I can close the issue out? Thank you!

  21. eh2077 commented on Aug 19, 2024

    @eh2077
    Contributor

    Checklist

    Regression test

    1. Create a workspace
    2. Establish a connection with Xero
    3. Wait for a few minutes and refresh the page to update the latest synced time
    4. Click on three dot and click on sync now
    5. Verify that: The last synced time updates

    Do you agree 👍 or 👎

    cc @VictoriaExpensify

  22. VictoriaExpensify commented on Aug 19, 2024

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions