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 2024-10-17] [HOLD for payment 2024-10-10] [Simple AA in NewDot] [HIGH] Improve how we handle auto-submission in NewDot #35091

Open
kavimuru opened this issue Jan 24, 2024 · 130 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering Internal Requires API changes or must be handled by Expensify staff Weekly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Jan 24, 2024

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: v1.4.33-4
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: @tylerkaraszewski
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1706118036323349

Action Performed:

Prerequisites:
use a collect policy
has scheduled submit enabled
has access to the isPolicyExpenseChatEnabled beta.

  1. Request money from the collect workspace
  2. Wait until the report is auto-submitted (i.e end of the day if set to Daily)
  3. Observe the Submit button is still present on the report preview for the submitter, despite it being submitted.
  4. Observe the submitted $x.xx via Scheduled Submit reportAction is not added to the expense report
  5. Sign-in as the approver
  6. Observe the workspace chat is not unread for the approver, the LHN does not contain a GBR green dot and the preview component doesn't contain an approve button.

Expected Result:

  • On auto-submission, the the submit button should be removed.
  • The NewDot reportAction for autoSubmission should be added to the chat from the submitter, the OldDot one from Concierge should not appear in NewDot.
  • On auto-submission of the report, the workspace chat should be unread for the approver, the LHN chat row should have a GBR green dot and an approve button should be in the preview component.

Actual Result:

  • The submit button is visible and clickable
  • The NewDot reportAction is not added to the report, just the OldDot one.
  • The approver isn't notified (chat is not unread, no GBR applied, no approve button on the preview)

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?
All

Screenshots/Videos

Add any screenshot/video evidence

Submit button still visible:
https://github.com/Expensify/App/assets/43996225/f09c69e2-434c-4205-9949-1457cfee28fa

OldDot reportAction appearing not the NewDot one
image

Chat not unread, no GBR on the chat row in the LHN
To be added

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01aa9178aa3b2044ea
  • Upwork Job ID: 1760318902746746880
  • Last Price Increase: 2024-02-21
Issue OwnerCurrent Issue Owner: @trjExpensify
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 24, 2024
Copy link

melvin-bot bot commented Jan 24, 2024

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

@kavimuru kavimuru added the Needs Reproduction Reproducible steps needed label Jan 24, 2024
@trjExpensify
Copy link
Contributor

@melvin-bot melvin-bot bot added the Overdue label Jan 29, 2024
@trjExpensify
Copy link
Contributor

trjExpensify commented Jan 29, 2024

Tyler couldn't reproduce this issue. He did run into a different bug with not being able to delete an expense off a processing report, but that's totally different and being figured out over here.

@melvin-bot melvin-bot bot removed the Overdue label Jan 29, 2024
@luacmartins
Copy link
Contributor

I think the issue involves auto-submission. I've noticed that when the report has already been auto-submitted and then I try to submit again. @tylerkaraszewski, do you see any system messages when clicking into the report preview?

@trjExpensify
Copy link
Contributor

Discussion for ref.

@trjExpensify trjExpensify changed the title submit button remains clickable after first submit. [Wave6] Improve how we handle auto-submission in NewDot Jan 30, 2024
@trjExpensify trjExpensify removed the Needs Reproduction Reproducible steps needed label Jan 30, 2024
@trjExpensify
Copy link
Contributor

Spruced this up in-line with the thread discussion. @mountiny are you taking this one?

@mountiny mountiny self-assigned this Jan 30, 2024
@mountiny
Copy link
Contributor

Yes, taking this! Seems like we do send the updates when this comes from harvesting too, will have to dig more

@trjExpensify
Copy link
Contributor

The plot thickens.. Thanks!

@greg-schroeder greg-schroeder changed the title [Wave6] Improve how we handle auto-submission in NewDot [HIGH] Improve how we handle auto-submission in NewDot Jan 31, 2024
@mountiny
Copy link
Contributor

focusing on wave8 critical issue

@mountiny
Copy link
Contributor

mountiny commented Feb 1, 2024

still focusing on ideal nav

@melvin-bot melvin-bot bot added the Overdue label Feb 5, 2024
@mountiny
Copy link
Contributor

mountiny commented Feb 5, 2024

Still focusing on the ideal nav over this one, hopefully I can make progress on this one this week

@melvin-bot melvin-bot bot removed the Overdue label Feb 5, 2024
Copy link

melvin-bot bot commented Feb 7, 2024

@trjExpensify @mountiny this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Feb 7, 2024
@mountiny
Copy link
Contributor

mountiny commented Feb 7, 2024

Still focusing on managing issues in wave8 and fire today

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Feb 7, 2024
@melvin-bot melvin-bot bot added the Weekly KSv2 label Oct 10, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-10-10] [Simple AA in NewDot] [HIGH] Improve how we handle auto-submission in NewDot [HOLD for payment 2024-10-17] [HOLD for payment 2024-10-10] [Simple AA in NewDot] [HIGH] Improve how we handle auto-submission in NewDot Oct 10, 2024
Copy link

melvin-bot bot commented Oct 10, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 10, 2024
Copy link

melvin-bot bot commented Oct 10, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.47-4 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 2024-10-17. 🎊

For reference, here are some details about the assignees on this issue:

  • @mollfpr requires payment through NewDot Manual Requests

Copy link

melvin-bot bot commented Oct 10, 2024

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.
  • [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

Copy link

melvin-bot bot commented Oct 17, 2024

Payment Summary

Upwork Job

  • Reviewer: @mollfpr owed $250 via NewDot

BugZero Checklist (@trjExpensify)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1760318902746746880/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@trjExpensify
Copy link
Contributor

What's the dealio with this project and payments?

@Beamanator
Copy link
Contributor

Pshhhh you don't wanna search through all 168 hidden messages to find linked PRs & who's owed what? 😅

I'll help look tomorrow 😳 🙈

@trjExpensify
Copy link
Contributor

Lol, I more so meant is there 1) some kind of price agreed with the C+ on this for the wider project or is it standard and 2) are regression tests being added centrally for this project.

@trjExpensify
Copy link
Contributor

I'll help look tomorrow 😳 🙈

I'll certainly take it though!

@Beamanator
Copy link
Contributor

Shit well I didn't have time to help today, sry :/ but yeah good question - so far no wider price agreement elsewhere so I thinkkkk it should be paid standard per PR reviewed

@dylanexpensify dylanexpensify moved this from Release 2: Summer 2024 (Aug) to Release 3: Fall 2024 (Nov) in [#whatsnext] #expense Oct 18, 2024
@dylanexpensify dylanexpensify moved this from Release 3: Fall 2024 (Nov) to Hold for Payment in [#whatsnext] #expense Oct 18, 2024
@trjExpensify
Copy link
Contributor

@Beamanator
Copy link
Contributor

Personally I wouldn't consider any regressions, I just split up the work into many PRs 😅

@trjExpensify
Copy link
Contributor

Okay, so confirming payments will be as follows:

So in total that's $750 to @mollfpr for the C+ reviews here.

With that cleared up, let's talk about the checklist. At the end of the day, what we ended up doing here was an improvement rather than a regression. That being to improve the auto-submit/approver/pay reportActions copy after introducing automation. So I don't think we have a RCA to chase.

We should add/update regression tests for these cases, so @mollfpr can you suggest them for:

  • auto-submitted
  • auto-approval
  • auto-payment

Thanks!

@mollfpr
Copy link
Contributor

mollfpr commented Oct 26, 2024

auto-submitted

  1. Create a policy with delayed submission (example: Daily) & simple or advanced approvals
  2. Create a report & a few expenses on that policy
  3. Let report auto-harvest
  4. Verify the "Submitted" report action now reads automatically submitted via delayed submission where the "Delayed Submission" test links out to https://help.expensify.com/articles/expensify-classic/reports/Automatically-submit-employee-reports

auto-approval

  1. Create a collect policy in NewDot
  2. In OldDot, set up auto approvals like so:
    • In the workspace Members tab, set "Approval Mode" to "Submit & Approve"
    • In the Manually approve all expenses over the field, enter a number like $200.00 (something over $100)
    • In the Randomly route reports for manual approval: field, enter 0%
  3. Set the policy's "scheduled submit" to "on" and to anything other than "Instant" (a.k.a. "Daily")
  4. As the submitter, submit an expense for $101.00 (something between $100 and $200)
  5. Verify the expense gets auto-approved and the text on LHN and report action is automatically approved $<amount> via workspace rules

auto-approval and auto-forwarding

  1. Set up Control policy on NewDot, with Advanced Approvals enabled - non instant submit
  2. Make sure the policy has at least 3 members, where at least one employee has an approval chain like this:
    • Employee A submitsTo Employee B
    • Employee B forwardsTo Employee C
  3. In OldDot as the policy admin, enable auto approvals
    • In the workspace Members page, set Manually approve all expenses over: to something like $1000
    • Set Randomly route reports for manual approval: to 0%
  4. In NewDot, have Employee A submit an expense in their workspace chat
  5. Verify the expense is auto approved from Employee B and the text on LHN and report actions is automatically approved $<amount> via workspace rules
  6. On Employee C, open the workspace chat for Employee A and verify an expense submitted from Employee A is forwarded to Employee C
  7. Approved the expense
  8. Verify the text on LHN and report action is approved <amount>

auto-payment

  1. Create a Collect policy, on Instant submit, with Submit & Approve enabled
  2. In OldDot, in the workspace Members tab, set Manually approve all expenses over: to $0.01
  3. In OldDot, in the workspace Reimbursement tab, set reimbursement to Direct and check the Manual Reimbursement section - you should see that Reports above $100.00 are not reimbursed unless manually initiated.
  4. Create a withdrawal-ready bank account for the workspace
  5. Create a deposit-ready bank account for the workspace owner (personal bank account shouldn't be linked to the workspace
  6. In OldDot, as the workspace owner, create a report & add an expense of $1, then approve the report
  7. Now open that report in NewDot and verify you see the new "automatically paid" report action copy
  8. Now in NewDot, go to the workspace, submit an expense, then approve that report
  9. Verify that report also gets auto-reimbursed & shows the new report action copy

@garrettmknight
Copy link
Contributor

$750 approved for @mollfpr based on this summary

@trjExpensify
Copy link
Contributor

@mollfpr I'm not following this test "auto-approval and auto-forwarding"? If auto-approval is enabled in that case, why is the report action approved <amount>?

@mollfpr
Copy link
Contributor

mollfpr commented Nov 1, 2024

@trjExpensify I believe Employee C can't auto-approve the expense and the report action is expected to approved <amount>. Is that answer your question?

@trjExpensify
Copy link
Contributor

Huh, why not? 🤔 If auto-approval is enabled and the report isn't flagged for review because of the amount and/or random audit percentage, it should be final approved.

@mollfpr
Copy link
Contributor

mollfpr commented Nov 5, 2024

Maybe @Beamanator can help to answer it 😅

From your above comment, I have the same thought now.

@Beamanator
Copy link
Contributor

Huh, Idk if I wrote that initially but I'd definitely expect that to say "automatically approved ${amount} via <a href="${CONST.CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL}">workspace rules</a>,"

Code ref:

lastMessageTextFromReport = ReportUtils.getReportAutomaticallyApprovedMessage(lastReportAction);

@melvin-bot melvin-bot bot added the Overdue label Nov 11, 2024
@trjExpensify
Copy link
Contributor

Okay, @mollfpr can we modify the tests then? Do we scrap that second one completely or what else are we including it for?

@melvin-bot melvin-bot bot removed the Overdue label Nov 12, 2024
@mollfpr
Copy link
Contributor

mollfpr commented Nov 14, 2024

@trjExpensify I have updated step 5 on auto approved and auto forwarding test case. The expected result on "auto approved" is the same as the first auto-approved test case, and the approved <amount> is shown after the forwarder approves the expense.

@trjExpensify
Copy link
Contributor

Sorry, I still don't get it. When auto-approval is enabled, the report is auto-approved at every step in the approval chain, not just the first one. So how is this happening and/or an accurate test?

auto-approval and auto-forwarding

  1. Set up Control policy on NewDot, with Advanced Approvals enabled - non instant submit
  2. Make sure the policy has at least 3 members, where at least one employee has an approval chain like this:
    • Employee A submitsTo Employee B
    • Employee B forwardsTo Employee C
  3. In OldDot as the policy admin, enable auto approvals
    • In the workspace Members page, set Manually approve all expenses over: to something like $1000
    • Set Randomly route reports for manual approval: to 0%
  4. In NewDot, have Employee A submit an expense in their workspace chat
  5. Verify the expense is auto approved from Employee B and the text on LHN and report actions is automatically approved $<amount> via workspace rules
  6. On Employee C, open the workspace chat for Employee A and verify an expense submitted from Employee A is forwarded to Employee C
  7. Approved the expense
  8. Verify the text on LHN and report action is approved <amount>

@Beamanator
Copy link
Contributor

Beamanator commented Nov 15, 2024

oh uhhhhh we might not have built multi-auto-approvals yet 🙃 https://github.com/Expensify/Expensify/issues/434467

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. Engineering Internal Requires API changes or must be handled by Expensify staff Weekly KSv2
Projects
Status: Hold for Payment
Development

No branches or pull requests