Skip to content

[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

Closed

Description

@kavimuru

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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 24, 2024
  2. melvin-bot commented on Jan 24, 2024

    @melvin-bot

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

  3. trjExpensify commented on Jan 29, 2024

    @trjExpensify
    Contributor

    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.

  4. luacmartins commented on Jan 30, 2024

    @luacmartins
    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?

  5. trjExpensify commented on Jan 30, 2024

    @trjExpensify
    Contributor

    Discussion for ref.

  6. changed the title [-]submit button remains clickable after first submit.[/-] [+][Wave6] Improve how we handle auto-submission in NewDot[/+] on Jan 30, 2024
  7. trjExpensify commented on Jan 30, 2024

    @trjExpensify
    Contributor

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

  8. 210 remaining items

  9. garrettmknight commented on Oct 29, 2024

    @garrettmknight
    Contributor

    $750 approved for @mollfpr based on this summary

  10. trjExpensify commented on Nov 1, 2024

    @trjExpensify
    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>?

  11. mollfpr commented on Nov 1, 2024

    @mollfpr
    Contributor

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

  12. trjExpensify commented on Nov 1, 2024

    @trjExpensify
    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.

  13. mollfpr commented on Nov 5, 2024

    @mollfpr
    Contributor

    Maybe @Beamanator can help to answer it 😅

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

  14. Beamanator commented on Nov 6, 2024

    @Beamanator
    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);

  15. trjExpensify commented on Nov 12, 2024

    @trjExpensify
    Contributor

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

  16. mollfpr commented on Nov 14, 2024

    @mollfpr
    Contributor

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

  17. trjExpensify commented on Nov 15, 2024

    @trjExpensify
    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>
  18. Beamanator commented on Nov 15, 2024

    @Beamanator
    Contributor

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

  19. trjExpensify commented on Nov 19, 2024

    @trjExpensify
    Contributor

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

    Wowza, I did not know that. So then I don't think we add a test for the temporary behaviour. Rather, when we add support for auto-approval with multi-level approvals, add a test then to verify both levels are auto-approved.

    I've gone ahead and created a GH for 1, 2 and 4 above for now.

    Go ahead and request $750 on the basis of this payment summary, @mollfpr. Closing!

  20. moved this from Hold for Payment to Done in #expensify-bugson Nov 19, 2024
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.EngineeringInternalRequires API changes or must be handled by Expensify staffWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions