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

[$250] Show the next step for Closed or Approved reports as “No action required” if payments are disabled. #49333

Open
garrettmknight opened this issue Sep 17, 2024 · 27 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@garrettmknight
Copy link
Contributor

garrettmknight commented Sep 17, 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: N/A
Reproducible in staging?: Y
Reproducible in production?: Y
Expensify/Expensify Issue URL: N/A
Issue reported by: @srikarparsi
Slack conversation: https://expensify.slack.com/archives/C06ML6X0W9L/p1726537212622119?thread_ts=1725892977.799399&cid=C06ML6X0W9L

Action Performed:

  1. Create a workspace
  2. Enable workflows
  3. Disable payments
  4. Submit an expense on the workspace chat
  5. Click into the expense

Expected Result:

The next step for this report should be “No action required” if payments are disabled.

Actual Result:

The next step does not render.
image

Workaround:

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

Platforms:

All

Screenshots/Videos

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021835986044043862116
  • Upwork Job ID: 1835986044043862116
  • Last Price Increase: 2024-09-17
  • Automatic offers:
    • ikevin127 | Reviewer | 104000212
Issue OwnerCurrent Issue Owner: @ikevin127
@garrettmknight garrettmknight added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 17, 2024
Copy link

melvin-bot bot commented Sep 17, 2024

Triggered auto assignment to @sakluger (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@garrettmknight garrettmknight added the External Added to denote the issue can be worked on by a contributor label Sep 17, 2024
@melvin-bot melvin-bot bot changed the title Show the next step for Closed or Approved reports as “No action required” if payments are disabled. [$250] Show the next step for Closed or Approved reports as “No action required” if payments are disabled. Sep 17, 2024
Copy link

melvin-bot bot commented Sep 17, 2024

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

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

melvin-bot bot commented Sep 17, 2024

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

@koko57
Copy link
Contributor

koko57 commented Sep 17, 2024

Hey, I'm Agata from Callstack - an expert contributor group - I can take a look at this issue

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

melvin-bot bot commented Sep 17, 2024

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

Offer link
Upwork job

@trjExpensify
Copy link
Contributor

Also assigning @koko57 here to look into this. 👍

@koko57
Copy link
Contributor

koko57 commented Sep 17, 2024

either I'm doing it wrong, or I really cannot recreate the bug

Screen.Recording.2024-09-17.at.20.46.53.mp4

@garrettmknight could you check if I'm not missing something?

@trjExpensify
Copy link
Contributor

For closed reports:

  • Workflows = enabled
  • Delayed submission = disabled
  • Approvals = disabled
  • Payments = disabled

^^ I validated the above config by going to OldDot and checking for

  • Reports > Scheduled Submit > Instantly
  • Members > Approval Mode > Submit & close
  • Reimbursement > None
2024-09-17_15-18-14.mp4

Then all I did was:

  1. Submit an expense on the workspace as the admin
  2. I don't see a pay button
  3. I do see the incorrect next steps:
image

@trjExpensify
Copy link
Contributor

Then for the approved reports case:

Workflows = enabled
Delayed submission = disabled
Approvals = enabled
Payments = disabled

^^ I validated the above config by going to OldDot and checking for

Reports > Scheduled Submit > Instantly
Members > Approval Mode > Submit & approve
Reimbursement > None

Steps:

  1. Submit an expense on the workspace as the admin
  2. I see an Approve button
  3. I approve the report and see incorrect next steps about waiting to adding a bank account (notice how it flashes as well).
2024-09-17_15-21-43.mp4

@koko57
Copy link
Contributor

koko57 commented Sep 17, 2024

ok, so it's for an expense submitted by admin? So the tests steps are a bit misleading 😅

@trjExpensify
Copy link
Contributor

That's what I did to produce the above, yeah. @srikarparsi can confirm on his steps from the OP when he's on.

@koko57
Copy link
Contributor

koko57 commented Sep 17, 2024

ok, I reproduced it now too - so I'm starting digging

@koko57
Copy link
Contributor

koko57 commented Sep 18, 2024

@trjExpensify EDIT: I've noticed that right after submitting an expense we get
Screenshot 2024-09-18 at 13 45 47
later we get this one
Screenshot 2024-09-18 at 13 46 07

the latter we get from the OpenReport request
Screenshot 2024-09-18 at 18 15 02
so it's a backend issue

Should the first one stay as it is? Or should it also say “No action required”

@srikarparsi srikarparsi self-assigned this Sep 18, 2024
@srikarparsi
Copy link
Contributor

Sorry this should be on hold for this Auth PR. This will only be reproducible once the Auth PR hits production

@srikarparsi srikarparsi changed the title [$250] Show the next step for Closed or Approved reports as “No action required” if payments are disabled. [HOLD https://github.com/Expensify/Auth/pull/12483] [$250] Show the next step for Closed or Approved reports as “No action required” if payments are disabled. Sep 19, 2024
@srikarparsi srikarparsi changed the title [HOLD https://github.com/Expensify/Auth/pull/12483] [$250] Show the next step for Closed or Approved reports as “No action required” if payments are disabled. [$250] Show the next step for Closed or Approved reports as “No action required” if payments are disabled. Sep 20, 2024
@srikarparsi
Copy link
Contributor

Removed this from hold since https://github.com/Expensify/Auth/pull/12483 has been deployed to production. Also updated the issue body to have easier reproduction steps.

@koko57
Copy link
Contributor

koko57 commented Sep 20, 2024

ok, so I'm starting to investigate it

@srikarparsi
Copy link
Contributor

Sounds good, let me know if you have any questions. I think we need to call NextStepUtils.buildNextStep in IOU with the CLOSED status since that status already renders the "No further action required" message.

@koko57
Copy link
Contributor

koko57 commented Sep 20, 2024

ok, I will apply this, but won't it be replaced by the response from OpenReport? We get an empty array for that
Screenshot 2024-09-20 at 13 32 11

@koko57
Copy link
Contributor

koko57 commented Sep 20, 2024

@srikarparsi now for the nextStep we're generating this message

if (harvesting?.enabled && autoReportingFrequency !== CONST.POLICY.AUTO_REPORTING_FREQUENCIES.MANUAL) {
optimisticNextStep.message = [
{
text: 'Waiting for ',
},
{
text: `${ownerDisplayName}`,
type: 'strong',
clickToCopyText: ownerAccountID === currentUserAccountID ? currentUserEmail : '',
},
{
text: `'s`,
type: 'strong',
},
{
text: ' %expenses to automatically submit',
},
];

Screenshot 2024-09-20 at 15 12 33
after we get the response from OpenReport it's cleared bc the response looks like above.

Copy link

melvin-bot bot commented Sep 23, 2024

@sakluger, @koko57, @srikarparsi, @ikevin127 Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added the Overdue label Sep 23, 2024
@ikevin127
Copy link
Contributor

Not overdue, the issue is being actively worked on.

@melvin-bot melvin-bot bot removed the Overdue label Sep 23, 2024
@srikarparsi
Copy link
Contributor

srikarparsi commented Sep 25, 2024

ok, I will apply this, but won't it be replaced by the response from OpenReport? We get an empty array for that

Ah thanks for the looking into this. Do you think you could help with the offline (optimistic) behavior here and I can work on a backend PR that returns the right next steps for this case?

@koko57
Copy link
Contributor

koko57 commented Sep 26, 2024

@srikarparsi ok, I will take care of it 🙂

@melvin-bot melvin-bot bot added the Overdue label Sep 26, 2024
@koko57
Copy link
Contributor

koko57 commented Sep 26, 2024

Screenshot 2024-09-26 at 20 37 09 @srikarparsi Just to make sure: we shouldn't display this text for disabled payments, we should display “No action required” instead?

@srikarparsi
Copy link
Contributor

srikarparsi commented Sep 26, 2024

Yup exactly, thanks! Since there won't be a pay or approve button in this case, we should display “No action required”

@ikevin127
Copy link
Contributor

Not overdue, the issue is being actively worked on.

@melvin-bot melvin-bot bot removed the Overdue label Sep 26, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 27, 2024
@koko57
Copy link
Contributor

koko57 commented Sep 27, 2024

PR ready for review #49837

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. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
Status: Polish
Development

No branches or pull requests

6 participants