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 2023-07-26] [$1000] Web - Order of task notification messages incorrect when back online #21314

Closed
1 of 6 tasks
kbecciv opened this issue Jun 22, 2023 · 50 comments
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

@kbecciv
Copy link

kbecciv commented Jun 22, 2023

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


Action Performed:

  1. Open any report
  2. Create a task
  3. Setting => Preferences => Force offline
  4. Click Mark as done
  5. Click three dot => mark as incomplete
  6. Click three dot => Cancel
  7. Setting => Preferences => Toggle Force Offline => Close
  8. Observe the message order:completed task => reopened task => canceled task
  9. Reload page: Observe the message order: cancel task => task completed => task reopened

Expected Result:

After reload page the message order is correct: completed task => reopened task => canceled task

Actual Result:

After reload page message order is not correct

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.28-4

Reproducible in staging?: n/a

Reproducible in production?: n/a

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

Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-06-16.at.11.17.58.mov

Expensify/Expensify Issue URL:

Issue reported by: @namhihi237

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686889606135589

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017368db113f47cd42
  • Upwork Job ID: 1672010591582208000
  • Last Price Increase: 2023-06-22
@kbecciv kbecciv added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Jun 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

Triggered auto assignment to @lschurr (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@lschurr
Copy link
Contributor

lschurr commented Jun 22, 2023

I was able to reproduce:

image image

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label Jun 22, 2023
@melvin-bot melvin-bot bot changed the title Web - Order of task notification messages incorrect when back online [$1000] Web - Order of task notification messages incorrect when back online Jun 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

Job added to Upwork: https://www.upwork.com/jobs/~017368db113f47cd42

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

Current assignee @lschurr is eligible for the External assigner, not assigning anyone new.

@lschurr lschurr removed Needs Reproduction Reproducible steps needed Help Wanted Apply this label when an issue is open to proposals by contributors labels Jun 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

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

@hoangzinh
Copy link
Contributor

hoangzinh commented Jun 23, 2023

Proposal

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

Web - Order of task notification messages incorrect when back online

What is the root cause of that problem?

I think it's both BE + FE issue. In BE, It doesn't pick up the optimisticReportActionID but create a new reportAction with different actionName (optimistic build with actionName TASKCANCELED and BE returns a new reportAction with TASKCANCELLED (double L))

For example:
Screenshot 2023-06-23 at 13 54 18
Screenshot 2023-06-23 at 13 53 08

If we were in offline then online, because BE creates new reportAction, the optimisticReportAction in FE is not updated create field => According to our sort reportActions algorithm, it might be displayed first.

Moreover, although we receive the reportAction that created in BE side above but It won't be shown because its actionName (TASKCANCELLED) is not in FE actionName whitelist here. It leads to another issue that in assignee side, they can't see the cancel task message:

Example in what assignee see:
Screenshot 2023-06-23 at 13 55 37

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

I think we need to do 2 things both FE & BE:

  • BE needs to create reportAction with the ID in the request params of CancelTask API instead of create new reportAction ID
  • We should set actionType of task cancelled to either TASKCANCELED or TASKCANCELLED in both FE & BE. I think it should be TASKCANCELLED. If we're all agree. We update in FE side here, it should be TASKCANCELLED (also change the const name)

@melvin-bot melvin-bot bot added the Overdue label Jun 26, 2023
@lschurr
Copy link
Contributor

lschurr commented Jun 26, 2023

Could you review this proposal @rushatgabhane?

@melvin-bot melvin-bot bot removed the Overdue label Jun 26, 2023
@rushatgabhane
Copy link
Member

I need help for this issue. I think it could be closed or handled internally because

  1. Tasks are being refactored.
  2. The backend changes can only be done by someone internal working on the Tasks refactor 😅

cc: @hayata-suenaga could you please help us with next steps maybe

@hayata-suenaga
Copy link
Contributor

@thienlnam can you check if this issue can be fixed with the ongoing refactoring? 🙇

@hoangzinh
Copy link
Contributor

@rushatgabhane how do you think about my suggestion for FE change? Do you think it's a typo in FE? Thanks

@thienlnam
Copy link
Contributor

This is not being worked on as part of the refactor - great catch that it's not using the provided optimistic reportActionID though!

@melvin-bot melvin-bot bot added the Overdue label Jun 30, 2023
@lschurr
Copy link
Contributor

lschurr commented Jun 30, 2023

Should this be closed @thienlnam?

@melvin-bot melvin-bot bot removed the Overdue label Jun 30, 2023
@thienlnam
Copy link
Contributor

Nope, there are a couple pieces to this that will require internal changes as well as possible external changes

@hayata-suenaga
Copy link
Contributor

Let's make this internal and if App change is required, we can create another issue for that.

@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

📣 @namhihi237 We're missing your Upwork ID to automatically send you an offer for the Reporter role.
Once you apply to the Upwork job, your Upwork ID will be stored and you will be automatically hired for future jobs!

@namhihi237
Copy link
Contributor

@thienlnam , Not related to this issue but I want to check why my upwork doesn't automatically send offers even though I have been hired several times before.

@thienlnam
Copy link
Contributor

@namhihi237 DM me the email you used to sign up and I can work on figuring out why

@namhihi237
Copy link
Contributor

Applied for the job.

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Jul 12, 2023
@hoangzinh
Copy link
Contributor

@rushatgabhane @thienlnam Thanks for accepting my proposal. The PR is ready #22755. Please help me to review it. Thanks

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jul 19, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Web - Order of task notification messages incorrect when back online [HOLD for payment 2023-07-26] [$1000] Web - Order of task notification messages incorrect when back online Jul 19, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.42-26 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 2023-07-26. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 2023

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:

  • [@rushatgabhane] The PR that introduced the bug has been identified. Link to the PR:
  • [@rushatgabhane] 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:
  • [@rushatgabhane] 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:
  • [@rushatgabhane] Determine if we should create a regression test for this bug.
  • [@rushatgabhane] 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.
  • [@lschurr] 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 Jul 25, 2023
@lschurr
Copy link
Contributor

lschurr commented Jul 25, 2023

Payout summary:

@namhihi237 and @hoangzinh will be paid in Upwork: https://www.upwork.com/jobs/~017368db113f47cd42
@rushatgabhane please request payment via ND if you haven't already

@lschurr
Copy link
Contributor

lschurr commented Jul 25, 2023

Also @rushatgabhane could you work on the checklist? #21314 (comment)

@lschurr
Copy link
Contributor

lschurr commented Jul 26, 2023

Paid @namhihi237 and @hoangzinh

We can close once you are able to work through the checklist @rushatgabhane

@lschurr
Copy link
Contributor

lschurr commented Jul 27, 2023

Bump @rushatgabhane

@melvin-bot melvin-bot bot added the Overdue label Jul 31, 2023
@lschurr
Copy link
Contributor

lschurr commented Jul 31, 2023

Bumped @rushatgabhane in Slack

@melvin-bot melvin-bot bot removed the Overdue label Jul 31, 2023
@rushatgabhane
Copy link
Member

rushatgabhane commented Aug 2, 2023

  1. The PR that introduced the bug has been identified. Link to the PR: CancelTask frontend #18747

  2. 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: https://github.com/Expensify/App/pull/18747/files#r1281485361

  3. 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: https://expensify.slack.com/archives/C01GTK53T8Q/p1690960660121509

  4. Determine if we should create a regression test for this bug. No

  5. 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 - N.A.

@rushatgabhane rushatgabhane mentioned this issue Aug 2, 2023
56 tasks
@rushatgabhane
Copy link
Member

rushatgabhane commented Aug 2, 2023

created a manual request https://staging.new.expensify.com/r/6448305783764792

@lschurr
Copy link
Contributor

lschurr commented Aug 2, 2023

Great thanks! Going to close this one out.

@lschurr lschurr closed this as completed Aug 2, 2023
@JmillsExpensify
Copy link

Reviewed details for @rushatgabhane. These details are accurate based on summary from Business Reviewer and are now approved for payment in NewDot.

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
None yet
Development

No branches or pull requests

8 participants