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][$500] Inconsistency of redirection after creating IOU and task #30883

Closed
1 of 6 tasks
m-natarajan opened this issue Nov 4, 2023 · 24 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

@m-natarajan
Copy link

m-natarajan commented Nov 4, 2023

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


Version Number: 1.3.95.5
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: @quinthar
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1699054252287299

Action Performed:

  1. Log in to ND
  2. Create a Request money
  3. Redirected to the DM
  4. Create a task
  5. Observe

Expected Result:

After creating IOU or task should be redirected to DM

Actual Result:

After creating task redirected to task itself

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

Recording.197.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~016c50b7a867fe5efd
  • Upwork Job ID: 1720787853214482432
  • Last Price Increase: 2023-11-11
  • Automatic offers:
    • s-alves10 | Contributor | 27643579
Issue OwnerCurrent Issue Owner: @kevinksullivan
@m-natarajan m-natarajan 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 Nov 4, 2023
@melvin-bot melvin-bot bot changed the title Inconsistency of redirection after creating IOU and task [$500] Inconsistency of redirection after creating IOU and task Nov 4, 2023
Copy link

melvin-bot bot commented Nov 4, 2023

Job added to Upwork: https://www.upwork.com/jobs/~016c50b7a867fe5efd

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

melvin-bot bot commented Nov 4, 2023

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

Copy link

melvin-bot bot commented Nov 4, 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

Copy link

melvin-bot bot commented Nov 4, 2023

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

@s-alves10
Copy link
Contributor

s-alves10 commented Nov 4, 2023

Proposal

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

Task creation redirects to the task report. Should redirect to the DM chat

What is the root cause of that problem?

We're redirecting to the task report after creating a task as you can see

Navigation.dismissModal(optimisticTaskReport.reportID);

This is the root cause

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

When creating a task, we have shareDestination and assignee.
I think it's reasonable to redirect to the shareDestination, not to DM chat

Updating

Navigation.dismissModal(optimisticTaskReport.reportID);

to

    Navigation.dismissModal(parentReportID);

would redirect user to share destination

Result
30883.mp4

What alternative solutions did you explore? (Optional)

In the case we still want to redirect to the DM, we can update the above code to

    Navigation.dismissModal(assigneeChatReportID || parentReportID);

@PiyushChandra17
Copy link

Proposal

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

Inconsistency of redirection after creating IOU and task

What is the root cause of that problem?

We are using optimisticTaskReport.reportID here,

Navigation.dismissModal(optimisticTaskReport.reportID);

This is resulting to redirection to Task report instead of chat, perhaps this is the root cause.

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

We should use assigneeChatReportID instead of optimisticTaskReport.reportID.

We should update this,

Navigation.dismissModal(optimisticTaskReport.reportID);

with this,

Navigation.dismissModal(assigneeChatReportID);

This will Navigate to the chat after IOU and creating a task.

What alternative solutions did you explore? (Optional)

NA

Result:

@PiyushChandra17
Copy link

@s-alves10 I think assigneeChatReportID should be the way to go as it redirects to DM. You can get the reference from here,

* A task needs two things to be created - a title and a parent report
* When you create a task report, there are a few things that happen:
* A task report is created, along with a CreatedReportAction for that new task report
* A reportAction indicating that a task was created is added to the parent report (share destination)
* If you assign the task to someone, a reportAction is created in the chat between you and the assignee to inform them of the task

@eh2077
Copy link
Contributor

eh2077 commented Nov 5, 2023

Proposal

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

Inconsistency of redirection after creating IOU and task

What is the root cause of that problem?

The root cause of this issue is that after creating task, we open the task report, see

Navigation.dismissModal(optimisticTaskReport.reportID);

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

To redirect to chat room after creating task, we can change

Navigation.dismissModal(optimisticTaskReport.reportID);

to

    const parentReport = ReportUtils.getReport(parentReportID);
    if (ReportUtils.isChatRoom(parentReport)) { // We can also consider group chat as chat room if necessary
        // We want to redirect to the parent report if this task is going to be shared to a chat room.
        Navigation.dismissModal(parentReportID);
    } else {
        Navigation.dismissModal(optimisticTaskReport.reportID);
    }

See demo

0-web.mp4

What alternative solutions did you explore? (Optional)

N/A

@dukenv0307
Copy link
Contributor

Proposal

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

Inconsistency of redirection after creating IOU and task

What is the root cause of that problem?

When we create a task, we redirect to task report

Navigation.dismissModal(optimisticTaskReport.reportID);

When we create an IOU, we redirect to chat report or expense report

App/src/libs/actions/IOU.js

Lines 879 to 880 in 925ff67

Navigation.dismissModal(isMoneyRequestReport ? report.reportID : chatReport.reportID);
Report.notifyNewAction(chatReport.reportID, payeeAccountID);

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

Because both shareDestination and assignee reports have the task preview, it doesn't make sense to go to the chat report after creating a task.

Instead, when we create a money request we should build optimistic data for the transaction thread which is the detail report of the request, and redirect to this report after creating a request to be consistent with the task behavior.

App/src/libs/actions/IOU.js

Lines 879 to 880 in 925ff67

Navigation.dismissModal(isMoneyRequestReport ? report.reportID : chatReport.reportID);
Report.notifyNewAction(chatReport.reportID, payeeAccountID);

What alternative solutions did you explore? (Optional)

@quinthar
Copy link
Contributor

quinthar commented Nov 6, 2023 via email

@melvin-bot melvin-bot bot added the Overdue label Nov 6, 2023
Copy link

melvin-bot bot commented Nov 7, 2023

@kevinksullivan, @allroundexperts Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@eh2077
Copy link
Contributor

eh2077 commented Nov 7, 2023

Proposal

Updated to redirect to the parent chat room after task creation.

Copy link

melvin-bot bot commented Nov 9, 2023

@kevinksullivan, @allroundexperts Eep! 4 days overdue now. Issues have feelings too...

Copy link

melvin-bot bot commented Nov 11, 2023

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

@allroundexperts
Copy link
Contributor

@s-alves10 were the first to propose the use of parentReportId. As such, it makes sense to go with @s-alves10's proposal.

🎀 👀 🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Nov 12, 2023
Copy link

melvin-bot bot commented Nov 12, 2023

Triggered auto assignment to @danieldoglas, 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 Nov 13, 2023
Copy link

melvin-bot bot commented Nov 13, 2023

📣 @allroundexperts Please request via NewDot manual requests for the Reviewer role ($500)

Copy link

melvin-bot bot commented Nov 13, 2023

📣 @s-alves10 🎉 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 📖

@s-alves10

This comment was marked as resolved.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Nov 14, 2023
@s-alves10
Copy link
Contributor

@allroundexperts

PR is ready for review #31307

@s-alves10
Copy link
Contributor

@danieldoglas

Could you please check on the payment status? The PR was merged into production 2 weeks ago

@danieldoglas
Copy link
Contributor

Hmm, I think we had an issue with the payment summary during the last 2 weeks, which is why this was not notified.

@kevinksullivan can you please take care of the payment here? We're all good.

@danieldoglas danieldoglas changed the title [$500] Inconsistency of redirection after creating IOU and task [Waiting for Payment][$500] Inconsistency of redirection after creating IOU and task Dec 4, 2023
@danieldoglas danieldoglas changed the title [Waiting for Payment][$500] Inconsistency of redirection after creating IOU and task [HOLD for Payment][$500] Inconsistency of redirection after creating IOU and task Dec 4, 2023
@danieldoglas danieldoglas added Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels Dec 4, 2023
@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 11, 2023
@kevinksullivan
Copy link
Contributor

Payment summary

Paid out @s-alves10 . @allroundexperts am I good to close this, assuming you'll request in newdot? Let me know if not and I can reopen!

@JmillsExpensify
Copy link

$500 payment to @allroundexperts based on comment above.

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

10 participants