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

Subsequent OneTime sync triggers always start with CurrentSyncJobStatus.SUCCEDED status #2472

Open
ndegwamartin opened this issue Mar 12, 2024 · 4 comments · May be fixed by #2511
Open

Subsequent OneTime sync triggers always start with CurrentSyncJobStatus.SUCCEDED status #2472

ndegwamartin opened this issue Mar 12, 2024 · 4 comments · May be fixed by #2511
Assignees
Labels
P2 Medium priority issue type:enhancement New feature or request

Comments

@ndegwamartin
Copy link
Collaborator

Describe the bug
When One time sync is triggered again, the state is first retrieved from the syncJobStatusFromWorkManager(screenshot). A null check is performed and if the state returned is null the state is retrieved from the sync job status datastore. This will hold the status of the previous one time sync.

This means that on subsequent one time syncs, we have no way of capturing the state that a new sync has started. This is important so that for instance we can show a UI that shows Sync process is starting. The main issue with the UX is that every time we trigger it subsequently, it first shows a Sync complete dialog then it proceds to do the actual sync after which it shows the sync complete dialog again.

Component
Core library

To Reproduce
Steps to reproduce the behavior:

  • Trigger a one time sync multiple times

Expected behavior
We should always return a job status like Running.Started or Enqueued for every fresh onetime sync trigger in order to update UX accordingly.

Screenshots
Screenshot 2024-03-12 at 12 15 46

Smartphone (please complete the following information):
N/A

Additional context
Add any other context about the problem here.

Would you like to work on the issue?
Sure, however @santosh-pingle recently worked on the original feature

@MJ1998
Copy link
Collaborator

MJ1998 commented Mar 12, 2024

Thanks @ndegwamartin for identifying this.
@santosh-pingle I think this should be a small change ?

@santosh-pingle
Copy link
Collaborator

Looking into it.

@santosh-pingle
Copy link
Collaborator

@ndegwamartin Can you please check whether the issue is fixed with this change #2511

@ndegwamartin
Copy link
Collaborator Author

Yeah this fixes it, left a comment on the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Medium priority issue type:enhancement New feature or request
Projects
Status: New
Development

Successfully merging a pull request may close this issue.

3 participants