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

[$500] Task - User B accesses a task link sent by User A before opening task, no access displayed #34414

Closed
4 of 6 tasks
kavimuru opened this issue Jan 12, 2024 · 17 comments
Closed
4 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@kavimuru
Copy link

kavimuru commented Jan 12, 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.24-7
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
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:

Action Performed:

  1. Log in with User A and open User B's chat
  2. Log in with User B from another browser and open User A's chat
  3. From User A go to the task and complete the flow
  4. Click on the created task
  5. Click on "Title" and copy the URL
  6. Go back to the chat send the URL and open the task again
  7. Click on "Description" and copy the URL
  8. Go back to the chat send the URL and open the task again.
  9. Click on "Assignee" and copy the URL
  10. Go back to the chat send the URL and open the task again.
  11. Now go to User B's account and click on the URLs one by one

Expected Result:

Task "Title" and "Description" model should be opened before opening task

Actual Result:

"Hmm... it's not here" is displayed when User B accesses the task link before opening task

Workaround:

unknown

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

Add any screenshot/video evidence

Bug6339907_1705051011372.2024-01-12_00-59-43.mp4
Bug6339907_1705051011261.2024-01-12_01-02-47.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d8cb0d70429a8316
  • Upwork Job ID: 1745740699002007552
  • Last Price Increase: 2024-01-12
  • Automatic offers:
    • paultsimura | Contributor | 28102014
@kavimuru kavimuru added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 12, 2024
@melvin-bot melvin-bot bot changed the title Task - User B accesses a task link sent by User A before opening task, no access displayed [$500] Task - User B accesses a task link sent by User A before opening task, no access displayed Jan 12, 2024
Copy link

melvin-bot bot commented Jan 12, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01d8cb0d70429a8316

Copy link

melvin-bot bot commented Jan 12, 2024

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

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

melvin-bot bot commented Jan 12, 2024

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

@paultsimura
Copy link
Contributor

paultsimura commented Jan 12, 2024

Proposal

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

Without opening the Task report first, the User cannot access the Task Details pages.

What is the root cause of that problem?

This is happening because if we don't open the Task report first, the OpenReport API call is not executed, and the Task Report is absent from Onyx.

And these task-details-related components are wrapped with withReportOrNotFound, which returns an error if the report is missing.

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

In the withReportOrNotFound wrapper, we should add a hook to try to fetch the Report from BE if it's absent in Onyx.
We do a similar thing in another wrapper, withReportAndReportActionOrNotFound:

// For small screen, we don't call openReport API when we go to a sub report page by deeplink
// So we need to call openReport here for small screen
useEffect(() => {
if (!props.isSmallScreenWidth || (isNotEmptyObject(props.report) && isNotEmptyObject(reportAction))) {
return;
}
Report.openReport(props.route.params.reportID);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.isSmallScreenWidth, props.route.params.reportID]);

The code will look approximately like this:

            useEffect(() => {
                if (!isReportIdInRoute || isNotEmptyObject(props.report)) {
                    return;
                }
                
                Report.openReport(props.route.params.reportID);
                // eslint-disable-next-line react-hooks/exhaustive-deps
            }, [isReportIdInRoute, props.route.params.reportID]);

Optionally, we can pass a new parameter to this wrapper, like allowFetchFromServer, and call BE only if this parameter is true.

What alternative solutions did you explore? (Optional)

We can fix this issue on the BE: make Pusher send the Task Report to User B when User A shares a task with them.

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jan 12, 2024

Proposal

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

"Hmm... it's not here" is displayed when User B accesses the task link before opening task

What is the root cause of that problem?

TaskReport is empty from user B's side until user B opens the task report

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

I think it's expected that BE doesn't return task report until user open the task report. So we should make TaskAssigneeSelectorModal has the same behavior with Title and Description page by use WithReportOrNotFound with shouldRequireReportID as false (because we also use this page for new task flow) in TaskAssigneeSelectorModal.

What alternative solutions did you explore? (Optional)

NA

@paultsimura
Copy link
Contributor

Proposal

Updated proposal #34414 (comment) to add more code details.

@allroundexperts
Copy link
Contributor

@paultsimura's proposal looks good to me. Especially, since it follows the already established convention in withReportAndReportActionOrNotFound hoc.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Jan 13, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 15, 2024
Copy link

melvin-bot bot commented Jan 15, 2024

📣 @paultsimura 🎉 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 Jan 16, 2024
@paultsimura
Copy link
Contributor

Thanks. The PR is ready for review: #34599

@NicMendonca NicMendonca removed their assignment Jan 31, 2024
@NicMendonca NicMendonca added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Jan 31, 2024
Copy link

melvin-bot bot commented Jan 31, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Jan 31, 2024
@melvin-bot melvin-bot bot removed the Weekly KSv2 label Jan 31, 2024
@NicMendonca
Copy link
Contributor

Going on leave so re-assigning to issue payment when ready!

@paultsimura
Copy link
Contributor

Deployed to prod: #36014 (comment)

@allroundexperts
Copy link
Contributor

Checklist

  1. I was not able to pinpoint any particular PR which caused this issue. I think we just missed to include the hook when this component was first created.
  2. N/A
  3. N/A
  4. A regression test would be useful here. The test steps given in the OP seem clear enough to me.

@paultsimura
Copy link
Contributor

Hey @sakluger – the automation didn't work here, but the issue is due payment today: #34414 (comment)

@sakluger sakluger added Daily KSv2 and removed Weekly KSv2 labels Feb 24, 2024
@sakluger
Copy link
Contributor

Summarizing payment on this issue:

Contributor: @paultsimura $500, paid via Upwork
Contributor+: @allroundexperts $500, please request on Newdot

@JmillsExpensify
Copy link

$500 approved for @allroundexperts based on summary above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

8 participants