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-28] [$1000] Offline - Thread - Count reply does not update when completing or reopening a task #20570

Closed
1 of 6 tasks
kbecciv opened this issue Jun 11, 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 Engineering External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.

Comments

@kbecciv
Copy link

kbecciv commented Jun 11, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open any report
  2. Create a task
  3. Tick checkbox complete task
  4. Open the report action task see 1 reply
  5. Open parent report see 1 reply under task

Expected Result:

The number of replies must increase after changing the checkbox

Actual Result:

Only after opening the report the number of replies increase

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.26.1

Reproducible in staging?: yes

Reproducible in production?: yes

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-07.at.09.33.55.1.mov
Recording.3069.mp4

Expensify/Expensify Issue URL:

Issue reported by: @namhihi237

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01090ab015f7de42e1
  • Upwork Job ID: 1668226471256403968
  • Last Price Increase: 2023-07-03
@kbecciv kbecciv added Daily KSv2 NewFeature Something to build that is a new item. Bug Something is broken. Auto assigns a BugZero manager. labels Jun 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 11, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 11, 2023

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 Daily KSv2 labels Jun 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 11, 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

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jun 12, 2023

Proposal

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

What is the root cause of that problem?

When we complete or re-open task, it has two problems

  1. We don't update optimisticData for parent report action to update the count reply immediately

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

  • Update optimisticData for parent report action by using updateOptimisticParentReportAction function
  1. In reopenTask and completeTask function get parentReportAction from taskReportID
  2. Call updateOptimisticParentReportAction to get optimistic data of parent report action
  3. Add this data from optimisticData

Example for completeTask

optimisticData.push({
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.parentReportID}`,
    value: {
        [parentReportAction.reportActionID]: ReportUtils.updateOptimisticParentReportAction(parentReportAction, completedTaskReportAction.create, CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD),
    },
  });

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Daily KSv2 label Jun 12, 2023
@bfitzexpensify
Copy link
Contributor

Reproduced

@bfitzexpensify bfitzexpensify added the External Added to denote the issue can be worked on by a contributor label Jun 12, 2023
@melvin-bot melvin-bot bot changed the title Web - Theard - Count reply not realtime when change checkbox [$1000] Web - Theard - Count reply not realtime when change checkbox Jun 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01090ab015f7de42e1

@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

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

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

melvin-bot bot commented Jun 12, 2023

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

@thienlnam
Copy link
Contributor

I believe this is a back-end issue. We need to send pusher updates to the participants of the parent report

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jun 12, 2023

@thienlnam So should we also update the optimisticData of parent report action when we complete or re-open task?

@aimane-chnaif
Copy link
Contributor

This should also work offline?

@thienlnam
Copy link
Contributor

Yeah that's a good idea, we will likely also need to do that

@MariaHCD
Copy link
Contributor

I believe the backend fix is here: https://github.com/Expensify/Web-Expensify/pull/37714

Will retest this and see if it's still reproducible.

But agreed, I think we need to have completing and reopening tasks work offline.

@MariaHCD
Copy link
Contributor

Oh, actually that internal backend fix doesn't include sending the updated child details so the thread count is still not working as expected. Looking into it.

@melvin-bot
Copy link

melvin-bot bot commented Jul 17, 2023

Current assignee @MariaHCD is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@MariaHCD
Copy link
Contributor

@dukenv0307's proposal looks good to me too!

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 17, 2023

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

Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Jul 17, 2023

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

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
Copy link

melvin-bot bot commented Jul 17, 2023

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

Upwork job

@dukenv0307
Copy link
Contributor

@aimane-chnaif @MariaHCD The PR is ready to review.

@thienlnam thienlnam changed the title [HOLD #20762] [$1000] Offline - Thread - Count reply does not update when completing or reopening a task [$1000] Offline - Thread - Count reply does not update when completing or reopening a task Jul 17, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 Weekly KSv2 labels Jul 21, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Offline - Thread - Count reply does not update when completing or reopening a task [HOLD for payment 2023-07-28] [$1000] Offline - Thread - Count reply does not update when completing or reopening a task Jul 21, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 21, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 21, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.43-7 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-28. 🎊

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

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

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 21, 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:

  • [@aimane-chnaif] The PR that introduced the bug has been identified. Link to the PR:
  • [@aimane-chnaif] 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:
  • [@aimane-chnaif] 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:
  • [@aimane-chnaif] Determine if we should create a regression test for this bug.
  • [@aimane-chnaif] 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.
  • [@bfitzexpensify] 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 Overdue and removed Weekly KSv2 labels Jul 27, 2023
@bfitzexpensify
Copy link
Contributor

Assigned July 17th, merged July 19th - eligible for the #urgency bonus

@melvin-bot melvin-bot bot removed the Overdue label Jul 31, 2023
@bfitzexpensify
Copy link
Contributor

Payments issued for Reporting and Contributor. @aimane-chnaif please complete the BZ checklist #20570 (comment) and I'll finalise the C+ payment

@aimane-chnaif
Copy link
Contributor

Regarding BZ checklist, I have same feedback as #19445 (comment). These 2 issues are same, just happening in different places.

@bfitzexpensify
Copy link
Contributor

That is fair. OK, paid out the C+ contract, we're all done here overall. Thanks everyone!

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 Engineering External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.
Projects
None yet
Development

No branches or pull requests

7 participants