Skip to content

[HOLD for payment 2024-01-17] TU - Fix admin and approver editing request details on paid plan requests.  #29914

Closed

Description

@trjExpensify

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.3.86-1
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: @RachCHopkins
Slack conversation: Internal ref

Action Performed:

Prerequisite: You need to complete the steps in this SO to have workspace chats created for a paid policy. On the policy set up an "advanced" approval workflow with employee submitting to a manager that is not an admin.

  1. As a member create a request
  2. Navigate to the expenseReport > request details > edit > amount
  3. Observe that you can edit the amount
  4. As an approver navigate to the expenseReport > request details > edit > amount
  5. Observe that the field isn't disabled but you can't navigate to the /edit/amount page
  6. As an admin navigate to the expenseReport > request details > edit > amount
  7. Observe that the field isn't disabled but you can't navigate to the /edit/amount page

Expected Result:

When it comes to date and amount fields on a request:

  1. A submitter should be able to edit up until the point the report has gone through the first level of approval. I.e open reports, and processing reports until they are approved by at least one person in the approval chain.
  2. An approver should be able to edit up until the point that the report is final approved. i.e open and processing reports.
  3. An admin should be able to edit up until the point that the report is final approved. I.e open and processing reports.

For merchant and description, the logic is as follows:

  1. A submitter should be able to edit up until the point the report has gone through the first level of approval. I.e open reports, and processing reports until they are approved by at least one person in the approval chain.
  2. An approver should be able to edit up until the point that the report is final approved. i.e open and processing reports.
  3. An admin should be able to edit on all report states. I.e open, processing, approved, reimbursed reports.

Other fields on the request are being introduced with other waves (i.e categories in wave6, tax in wave9), and the logic for editing on those has been determined and/or implemented accordingly in-line with the above for merchant and description.

CC: @heyjennahay @JmillsExpensify

Actual Result:

Admins and Managers can't edit any of the request details right now. The fields appear editable but the redirect bounces to "edit/amount"

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?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
0K94mmEHNW.mp4
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0104816b5fd6ba7fa8
  • Upwork Job ID: 1714748088198160384
  • Last Price Increase: 2023-10-18

Activity

  1. added
    Daily
    Internal
    Bug
    on Oct 18, 2023
  2. melvin-bot commented on Oct 18, 2023

    @melvin-bot

    Current assignee @youssef-lr is eligible for the Engineering assigner, not assigning anyone new.

  3. melvin-bot commented on Oct 18, 2023

    @melvin-bot

    Current assignee @trjExpensify is eligible for the Bug assigner, not assigning anyone new.

  4. melvin-bot commented on Oct 18, 2023

    @melvin-bot
  5. melvin-bot commented on Oct 18, 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
  6. melvin-bot commented on Oct 18, 2023

    @melvin-bot

    Triggered auto assignment to Contributor Plus for review of internal employee PR - @mananjadhav (Internal)

  7. trjExpensify commented on Oct 18, 2023

    @trjExpensify
    ContributorAuthor

    @youssef-lr, you can link the PR here when you have it :)

  8. youssef-lr commented on Oct 19, 2023

    @youssef-lr
    Contributor

    PR ready for review

  9. trjExpensify commented on Oct 19, 2023

    @trjExpensify
    ContributorAuthor

    Ah, I think you linked the PR to the wrong issue? 😅 https://github.com/Expensify/Expensify/issues/326700

  10. 88 remaining items

  11. melvin-bot commented on Jan 17, 2024

    @melvin-bot

    Payment Summary

    Upwork Job

    • ROLE: @c3024 paid $(AMOUNT) via Upwork (LINK)

    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/1714748088198160384/hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  12. trjExpensify commented on Jan 17, 2024

    @trjExpensify
    ContributorAuthor

    👋 @c3024 checklist time!

  13. c3024 commented on Jan 19, 2024

    @c3024
    Contributor

    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:

    • [@c3024] The PR that introduced the bug has been identified. Link to the PR: [TS Migration] Migrate 'ReportUtils.js' lib to TypeScript #29012
    • [@c3024] 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: af55c9c#r137436022
    • [@c3024] 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: This is a specific design flow allowing editing of fields by approver and admin and a discussion on #expensify-bugs is not useful
    • [@c3024] Determine if we should create a regression test for this bug. Yes
    • [@c3024] 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.

    The two tests (Expense reports (request made in a workspace) and Expense reports - Collect policy) in the Tests here in #33633 are regression tests.

    Expense reports (request made in a workspace)

    1. Create a workspace as the Admin and invite User A.
    2. Log in as User A and request money from the workspace chat using the 'Scan' tab.
    3. Make sure you can edit all the details, and go ahead and edit all of them.
    4. Log in as the Admin, make sure you can edit all the details of the request, except the Receipt.
    5. Settle the request. Make sure you cannot edit the Amount/Currency, Merchant, Date, and Receipt.
    6. Log in as User A, make sure you can't edit the request anymore.

    Expense reports - Collect policy
    We will need three accounts here, an admin, the approver, and the submitter.

    1. As the submitter, create a request in the workspace chat using 'Scan' and submit it.
    2. Still as the submitter, make sure you can edit all the request details while it's processing, and go ahead and edit all of >them
    3. Log in as the approver, make sure you can edit all the details except the receipt.
    4. Approve the request, make sure you cannot edit the Amount/Currency, Merchant, Date, and Receipt.
    5. Log in as the admin, verify the same as Step 4.
    6. Pay the request as the admin, repeat verifications from Step 4.
    7. Log in as the submitter now, make sure you can't edit any details from the request.

    👍 or 👎

  14. trjExpensify commented on Jan 22, 2024

    @trjExpensify
    ContributorAuthor

    Perfect. I've created an issue for Applause to discuss adding these.

    Payment summary:

    • $500 to @c3024 for the C+ review.
  15. trjExpensify commented on Jan 22, 2024

    @trjExpensify
    ContributorAuthor

    Offer sent!

  16. trjExpensify commented on Jan 22, 2024

    @trjExpensify
    ContributorAuthor

    Removed the ⭐ on Youssef, as this is over to me.

  17. c3024 commented on Jan 22, 2024

    @c3024
    Contributor

    Accepted. Thanks.

  18. trjExpensify commented on Jan 22, 2024

    @trjExpensify
    ContributorAuthor

    Melvin is not being nice. Looking!

  19. trjExpensify commented on Jan 22, 2024

    @trjExpensify
    ContributorAuthor

    Paid!

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyEngineeringInternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions