Skip to content

[HOLD for payment 2023-07-17] [$1000] Web - Request money option shouldn't be shown in the task report #21788

Closed

Description

@kbecciv

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. Click on FAB button and Assign Task for account B
  2. After task is created >> task details page will be will be show
  3. Click on + button on the left of COMPOSER

Expected Result:

There should not be a request money option on a task

Actual Result:

When you reload the page you'll see a request money option.

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

No-Request-Money-Option.1.mov
Recording.3288.mp4

Expensify/Expensify Issue URL:
Issue reported by: @tranvantoan-qn
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687721973756379

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01235f8dee56a999c2
  • Upwork Job ID: 1674900454492430336
  • Last Price Increase: 2023-06-30

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 28, 2023
  2. dukenv0307 commented on Jun 28, 2023

    @dukenv0307
    Contributor

    Proposal

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

    There is no Request Money option after creating new Task, but it appears after reloading

    What is the root cause of that problem?

    We are missing add participantAccountIDs in buildOptimisticTaskReport and after creating task, BE return data of the task report also doesn't contain participantAccountIDs.

    function buildOptimisticTaskReport(ownerEmail, ownerAccountID, assigneeAccountID = 0, parentReportID, title, description) {

    Screenshot from 2023-06-28 15-10-16

    That makes report.participantAccountIDs is undefined and then getMoneyRequestOptions return an empty array.

    App/src/libs/ReportUtils.js

    Lines 2136 to 2138 in 09a7432

    if (hasExcludedIOUAccountIDs || (participants.length === 0 && !report.isOwnPolicyExpenseChat) || !Permissions.canUseIOU(betas)) {
    return [];
    }

    After reloading, openReport API is called, report data of task is fully correct and then request option appears.

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

    We should add participantAccountIDs with the value [assigneeAccount] in buildOptimisticTaskReport to make report.participantAccountIDs correctly even if we don't reload the page.

    What alternative solutions did you explore? (Optional)

  3. melvin-bot commented on Jun 28, 2023

    @melvin-bot

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

  4. melvin-bot commented on Jun 28, 2023

    @melvin-bot

    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
  5. Christinadobrzyn commented on Jun 28, 2023

    @Christinadobrzyn
    Contributor

    I think this is expected that Request Money doesn't show in a Task - asking https://expensify.slack.com/archives/C01SKUP7QR0/p1687967168926109

    I'm not able to reproduce this in https://staging.new.expensify.com - asking in slack to test in staging instead of dev

  6. dukenv0307 commented on Jun 28, 2023

    @dukenv0307
    Contributor

    The title of issue is a little bit confused

    @Christinadobrzyn I think this is an inconsistent bug. Request money option is hidden after create a task but after reloading task report page, request money option appears.

  7. Christinadobrzyn commented on Jun 28, 2023

    @Christinadobrzyn
    Contributor
  8. situchan commented on Jun 29, 2023

    @situchan
    Contributor

    Proposal

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

    There is Request Money option on task report

    What is the root cause of that problem?

    There's no check if report type is task in ReportUtils.getMoneyRequestOptions

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

    Add one more check here:

    App/src/libs/ReportUtils.js

    Lines 2187 to 2191 in 3b721c4

    function getMoneyRequestOptions(report, reportParticipants, betas) {
    // In any thread, we do not allow any new money requests yet
    if (isThread(report)) {
    return [];
    }

    So if isTaskReport(report) return []

  9. Christinadobrzyn commented on Jun 30, 2023

    @Christinadobrzyn
    Contributor

    I still can't reproduce this - I think it has something to do with my Desktop app loading when I refresh. Either way there are several reports of this including - #21800

    The discussion is we don't want Request Money to be enabled with a task - https://expensify.slack.com/archives/C01GTK53T8Q/p1688073096458079

  10. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 30, 2023
  11. changed the title [-]Web - There is no Request Money option after creating new Task[/-] [+][$1000] Web - There is no Request Money option after creating new Task[/+] on Jun 30, 2023
  12. 46 remaining items

  13. melvin-bot commented on Jul 14, 2023

    @melvin-bot

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

  14. melvin-bot commented on Jul 14, 2023

    @melvin-bot
  15. abdulrahuman5196 commented on Jul 17, 2023

    @abdulrahuman5196
    Contributor

    The PR that introduced the bug has been identified. Link to the PR:
    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:
    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:

    Not a regression, but a miss during task report implementation.

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

    No. Minor miss during implementation and regression test wouldn't be beneficial here.

  16. abdulrahuman5196 commented on Jul 17, 2023

    @abdulrahuman5196
    Contributor

    @Christinadobrzyn / @sonialiap BZ checklist is complete.

    Payment processing could be started on this issue.

  17. sonialiap commented on Jul 20, 2023

    @sonialiap
    Contributor

    @tranvantoan-qn Offer sent for reporting issue - paid ✔️
    @situchan for fix (+bonus) - paid ✔️
    @abdulrahuman5196 for review (+bonus) - paid ✔️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions