Skip to content
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

[HOLD for payment 2024-06-13] [$250] [QBO] "Last synced just now" text doesn't update #41045

Closed
6 tasks done
trjExpensify opened this issue Apr 25, 2024 · 30 comments
Closed
6 tasks done
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@trjExpensify
Copy link
Contributor

trjExpensify commented Apr 25, 2024

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: v1.4.66-0
Reproducible in staging?: Y
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: @trjExpensify
Slack conversation: https://expensify.slack.com/archives/C036QM0SLJK/p1714057390428649?thread_ts=1714057353.559839&cid=C036QM0SLJK

Action Performed:

  1. Connect to QBO
  2. Observe the "Last synced just now" text
  3. Go have a coffee for 10mins
  4. Come back
  5. Observe the text still reads "Last synced just now"

Expected Result:

On OldDot the way we handle it is by checking the lastSync timestamp from the policy on page load, and then compute a human-friendly time difference with it. Every time you/auto-sync syncs the connection it's updated here.

Actual Result:

Despite hours elapsing the text still reads: "Last synced just now" even after a page refresh, suggesting this is just a static value currently.

Workaround:

N/A

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

image

View all open jobs on GitHub

CC: @hayata-suenaga @aldo-expensify @teneeto @narefyev91 @zanyrenney

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~016f30631fa560635c
  • Upwork Job ID: 1783647518731452416
  • Last Price Increase: 2024-04-26
  • Automatic offers:
    • Ollyws | Reviewer | 0
    • tienifr | Contributor | 0
Issue OwnerCurrent Issue Owner: @trjExpensify
@trjExpensify trjExpensify added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 25, 2024
@trjExpensify trjExpensify self-assigned this Apr 25, 2024
Copy link

melvin-bot bot commented Apr 25, 2024

Current assignee @trjExpensify is eligible for the Bug assigner, not assigning anyone new.

@trjExpensify
Copy link
Contributor Author

trjExpensify commented Apr 25, 2024

Haven't moved this on yet, as I think we might need to hold on:

https://github.com/Expensify/Web-Expensify/pull/41822
#41044

@trjExpensify
Copy link
Contributor Author

Confirmed we don't need a hold on those PRs, moving it on.

@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label Apr 26, 2024
@melvin-bot melvin-bot bot changed the title [QBO] "Last synced just now" text doesn't update [$250] [QBO] "Last synced just now" text doesn't update Apr 26, 2024
Copy link

melvin-bot bot commented Apr 26, 2024

Job added to Upwork: https://www.upwork.com/jobs/~016f30631fa560635c

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 26, 2024
Copy link

melvin-bot bot commented Apr 26, 2024

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

@tienifr
Copy link
Contributor

tienifr commented Apr 26, 2024

Proposal

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

Despite hours elapsing the text still reads: "Last synced just now" even after a page refresh, suggesting this is just a static value currently.

What is the root cause of that problem?

We're showing Last synced just now in

description: isSyncInProgress
? translate('workspace.accounting.connections.syncStageName', connectionSyncProgress.stageInProgress)
: translate('workspace.accounting.lastSync'),

and it's just a static value

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

  1. BE should return new value to indicate the lastSync timestamp (SyncPolicyToQuickbooksOnline command). We need to update it optimistically too
  2. Use it value to calculate the difference in time from lastSync to the current time

We can update this value every 10 mins (5 mins, ...)

What alternative solutions did you explore? (Optional)

NA

@tienifr
Copy link
Contributor

tienifr commented Apr 26, 2024

The logic to calculate the difference in time is quite simple (use setInterval), so I will add the detail implementation in PR phase

@aldo-expensify
Copy link
Contributor

BE should return new value to indicate the lastSync timestamp (SyncPolicyToQuickbooksOnline command). We need to update it optimistically too

@tienifr you can get the value from policy.connections.quickbooksOnline.lastSync.successfulDate

image

@tienifr
Copy link
Contributor

tienifr commented Apr 26, 2024

@aldo-expensify Ah I see, thank you! I'll use it in PR phase. @Ollyws Wdyt about my proposal?

@teneeto
Copy link
Contributor

teneeto commented Apr 26, 2024

Hi, I'm Eto from Callstack - expert contributor group - and I would like to take care of this issue.

@trjExpensify
Copy link
Contributor Author

@tienifr, can we use DateUtils.datetimeToRelative( ) (like here) and add "Last synced" before that string for the human readable message to display?

@tienifr
Copy link
Contributor

tienifr commented Apr 26, 2024

@trjExpensify Can you assign me on this issue so I'll raise the PR?

@trjExpensify
Copy link
Contributor Author

Let's have the proposal reviewed.

CC: @mountiny for vis as I was just talking to yah about this one

@Ollyws
Copy link
Contributor

Ollyws commented Apr 26, 2024

Having a look now....

@Ollyws
Copy link
Contributor

Ollyws commented Apr 26, 2024

@tienifr's proposal LGTM.
🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Apr 26, 2024

Triggered auto assignment to @mountiny, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot added the Overdue label Apr 29, 2024
@trjExpensify
Copy link
Contributor Author

@mountiny you happy with this proposal? Let's get a PR up for it.

@melvin-bot melvin-bot bot removed the Overdue label Apr 29, 2024
@mountiny
Copy link
Contributor

@tienifr please go ahead and raise the PR

Copy link

melvin-bot bot commented Apr 29, 2024

📣 @Ollyws 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Apr 29, 2024

📣 @tienifr 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Apr 30, 2024
@melvin-bot melvin-bot bot removed the Weekly KSv2 label May 23, 2024
Copy link

melvin-bot bot commented May 23, 2024

This issue has not been updated in over 15 days. @Ollyws, @trjExpensify, @mountiny, @tienifr eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added the Monthly KSv2 label May 23, 2024
@trjExpensify trjExpensify added Weekly KSv2 and removed Monthly KSv2 labels May 23, 2024
@trjExpensify
Copy link
Contributor Author

Commented in the PR that's held, I think we can switch the base and merge it into the QBO branch

@mountiny
Copy link
Contributor

Done

@trjExpensify
Copy link
Contributor Author

Solid, thank yah!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 6, 2024
@melvin-bot melvin-bot bot changed the title [$250] [QBO] "Last synced just now" text doesn't update [HOLD for payment 2024-06-13] [$250] [QBO] "Last synced just now" text doesn't update Jun 6, 2024
Copy link

melvin-bot bot commented Jun 6, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 6, 2024
Copy link

melvin-bot bot commented Jun 6, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.79-11 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-06-13. 🎊

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

Copy link

melvin-bot bot commented Jun 6, 2024

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:

  • [@Ollyws] The PR that introduced the bug has been identified. Link to the PR:
  • [@Ollyws] 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:
  • [@Ollyws] 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:
  • [@Ollyws] Determine if we should create a regression test for this bug.
  • [@Ollyws] 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.
  • [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 12, 2024
@trjExpensify
Copy link
Contributor Author

We won't need a regression test for this, as they'll be added centrally with the QBO project.

Payment summary as follows:

@Ollyws feel free to send a request, @tienifr I've paid you in Upwork. Closing!

@Ollyws
Copy link
Contributor

Ollyws commented Jun 13, 2024

Requested in ND.

@JmillsExpensify
Copy link

$250 approved for @Ollyws

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Archived in project
Development

No branches or pull requests

7 participants