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-06-29] [$1000] Strange UX when creating tasks in a DM #19631

Closed
1 of 6 tasks
kavimuru opened this issue May 25, 2023 · 31 comments
Closed
1 of 6 tasks
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

@kavimuru
Copy link

kavimuru commented May 25, 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. A creates a task in the group DM (A,B andC) and assigned it to B
  2. Log in as C and there is no indicator it is assigned to B, either in the main chat or in the task thread. But C has access to the task thread, but there's no obvious way for the other participants to know C is included.
  3. B initially saw just the checkbox without the Task title next to it. When he clicked into that thread and then back to DM with A, then only able to see the title
  4. As user C click the "Mark as Done" button in the task thread.

Expected Result:

Able mark as done

Actual Result:

Tt flashes complete and switches back to the button

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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.18-2
Reproducible in staging?: y
Reproducible in production?: y
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
Screenshot 2023-05-23 at 9 45 15 AM
Screenshot 2023-05-23 at 9 42 48 AM

Screen.Recording.2023-05-23.at.9.42.07.AM.mov
Recording.763.mp4

Expensify/Expensify Issue URL:
Issue reported by: @rafecolton
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684861533207629

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c0faa4b5ac73262e
  • Upwork Job ID: 1663179954798112768
  • Last Price Increase: 2023-06-05
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 25, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 25, 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

@melvin-bot melvin-bot bot added the Overdue label May 29, 2023
@sonialiap
Copy link
Contributor

Adding external label

@melvin-bot melvin-bot bot removed the Overdue label May 29, 2023
@sonialiap sonialiap added External Added to denote the issue can be worked on by a contributor Overdue labels May 29, 2023
@melvin-bot melvin-bot bot changed the title Strange UX when creating tasks in a DM [$1000] Strange UX when creating tasks in a DM May 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 29, 2023

@melvin-bot
Copy link

melvin-bot bot commented May 29, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 29, 2023

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

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

melvin-bot bot commented May 29, 2023

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

@sonialiap sonialiap removed the Overdue label May 29, 2023
@hoangzinh
Copy link
Contributor

hoangzinh commented May 29, 2023

Proposal

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

Strange UX when creating tasks in a DM

What is the root cause of that problem?

There are 3 problems according to steps above:

  1. Log in as C and there is no indicator it is assigned to B, either in the main chat or in the task thread

It's fixed in main chat by this PR #19990
The only problem is in the Task thread, it's showing empty for assignee
Screenshot 2023-06-07 at 22 10 31

I found that, because the props.report.managerEmail is empty in C and B side. So it shows nothing in the Task thread

Screenshot of prop.report from C side

Screenshot 2023-06-07 at 22 12 33

  1. As user C click the "Mark as Done" button in the task thread. It flashes complete and switches back to the button

When display "Mark as Done" button, we haven't checked who can see that button yet. So whoever can access the taskReport, they can see that button.

<View style={[styles.flexRow]}>
{isCompleted ? (
<>
<Text>{props.translate('task.completed')}</Text>
<View style={styles.moneyRequestHeaderCheckmark}>
<Icon
src={Expensicons.Checkmark}
fill={themeColors.iconSuccessFill}
/>
</View>
</>
) : (
<Button
success
isDisabled={TaskUtils.isTaskCanceled(props.report)}
medium
text={props.translate('newTaskPage.markAsDone')}
onPress={() => TaskUtils.completeTask(props.report.reportID, parentReportID, title)}
/>
)}
</View>

3. B initially saw just the checkbox without the Task title next to it. When he clicked into that thread and then back to DM with A, then only able to see the title

It's fixed somewhere

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

  1. Log in as C and there is no indicator it is assigned to B, either in the main chat or in the task thread

To solve this problem in Task thread, we can either:

  • Option 1: Replicate what we did for TaskPreview when getting the assigneeEmail. That means, we can get it in either report.managerEmail or taskReportAction.childManagerEmail. To retrieve the taskReportAction, we can use the props.report.parentReportID and props.report.parentReportActionIDto find in the reportActions collection cached in ReportActionUtils

  • Option 2: Wait/update BE to return report.managerEmail for both B & C in this case.

  1. As user C click the "Mark as Done" button in the task thread. It flashes complete and switches back to the button

We should only show this button if the current user is either taskAssignee or actorEmail/ownerEmail of a task. We can get the taskAssigneeEmail by above option, and task ownerEmail in the props.report

We also only enable checkbox in the chatReport if the current user is either taskAssignee or actorEmail/ownerEmail too. So "C" in this case won't neither check/uncheck task nor click "Mark as Done" button.
Other place is "Mark as incomplete", we need to add above condition to this button too.

@melvin-bot melvin-bot bot added the Overdue label May 31, 2023
@sonialiap
Copy link
Contributor

@mollfpr what do you think of this proposal?

@melvin-bot melvin-bot bot removed the Overdue label Jun 1, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Jun 1, 2023

Reviewing now!

@melvin-bot melvin-bot bot added the Overdue label Jun 5, 2023
@sonialiap
Copy link
Contributor

@mollfpr How did the review go? 😄

@melvin-bot melvin-bot bot removed the Overdue label Jun 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 5, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@mollfpr
Copy link
Contributor

mollfpr commented Jun 5, 2023

@sonialiap I still need more time on this. I'll get back to you in the morning 🙏

@mollfpr
Copy link
Contributor

mollfpr commented Jun 6, 2023

Log in as C and there is no indicator it is assigned to B, either in the main chat or in the task thread

@hoangzinh Now we have the assignee email in the main report but still need the assignee in the thread on the account C.

Screenshot 2023-06-06 at 23 56 19

Screenshot 2023-06-06 at 23 56 28

B initially saw just the checkbox without the Task title next to it. When he clicked into that thread and then back to DM with A, then only able to see the title

@hoangzinh Could you verify if this still reproduces? I see both the task title and the assignee.

When display "Mark as Done" button, we haven't checked who can see that button yet. So whoever can access the taskReport, they can see that button.

@hoangzinh How are we going to check the button? Is this also apply to disabling or hiding the checkbox as well?

@melvin-bot melvin-bot bot removed the Overdue label Jun 12, 2023
@melvin-bot melvin-bot bot removed 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

📣 @hoangzinh You have been assigned to this job by @joelbettner!
Please apply to this job in Upwork 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 📖

@hoangzinh
Copy link
Contributor

@mollfpr @joelbettner PR is ready #20689. Please help me review it. Thanks ❤️

@melvin-bot
Copy link

melvin-bot bot commented Jun 18, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @hoangzinh got assigned: 2023-06-12 15:06:40 Z
  • when the PR got merged: 2023-06-18 22:31:51 UTC
  • days elapsed: 5

On to the next one 🚀

@melvin-bot
Copy link

melvin-bot bot commented Jun 20, 2023

@hoangzinh, @joelbettner, @sonialiap, @mollfpr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@hoangzinh
Copy link
Contributor

Melvin, PR is merged. Waiting to be deployed to Staging then Production

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jun 22, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Strange UX when creating tasks in a DM [HOLD for payment 2023-06-29] [$1000] Strange UX when creating tasks in a DM Jun 22, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

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

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 Jun 22, 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:

  • [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
  • [@mollfpr] 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:
  • [@mollfpr] 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:
  • [@mollfpr] Determine if we should create a regression test for this bug.
  • [@mollfpr] 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.
  • [@sonialiap] 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 28, 2023
This was referenced Jun 29, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Jun 29, 2023

[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:

#17940
#18806

[@mollfpr] 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/17940/files#r1246167109
#18806 (comment)

[@mollfpr] 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:

The regression step should be enough.

[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] 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.

  1. Account A creates a task in the group DM (account A, account B, and account C) and assigns it to account B
  2. Log in as account C, navigate to the task report above
  3. Verify that account C can see account B displayName in the TaskHeader as an assignee.
  4. Verify that account C can not click on the "Mark as done" button and account C can not see the three-dot in the top right
  5. Log in as account B, navigate to the task report above
  6. Verify that account B can see account B displayName in the TaskHeader as an assignee
  7. Verify that account B can click on the "Mark as done" button and can see three-dot in the top right
  8. log in as account A
  9. Repeat 6->7
  10. 👍 or 👎

@sonialiap
Copy link
Contributor

@hoangzinh offer sent for fix
@mollfpr offer sent for review

PR submitted on Jun 13 5:57 PM (Tuesday)
PR merged on Jun 19 12:31 AM (Monday)
By my count that's over 3 days (merge by Friday 5:57 PM would have been 3 days), so no bonus for this issue.

@hoangzinh
Copy link
Contributor

Accepted. Thanks @sonialiap

@sonialiap
Copy link
Contributor

Both have been paid ✅

@melvin-bot
Copy link

melvin-bot bot commented Jul 7, 2023

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

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

5 participants