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 2023-12-08] [$500] Distance - Prevent deleting receipt #29684

Closed
6 tasks done
lanitochka17 opened this issue Oct 16, 2023 · 51 comments
Closed
6 tasks done
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 16, 2023

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: 1.3.84-6

Reproducible in staging?: Yes

Reproducible in production?: Yes

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: Applause - Internal Team

Issue reported by: Applause - Internal Team

Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to + > Request money > Distance
  3. Create a distance request to the workspace chat
  4. Click on the distance request preview twice
  5. Click on the receipt > Three-dot menu > Delete receipt > Delete
  6. Click on Distance
  7. Add a more stop and Save it

Expected Result:

The new distance is saved

New: You should not be able to remove the distance receipt in the first place

Actual Result:

The new distance is not saved. Clicking on Save does not save it and close the edit page

Workaround:

Unknown

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
Bug6239133_1697466370603.20231016_205452.mp4
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019e0aeb0e907b54cf
  • Upwork Job ID: 1715165699664687104
  • Last Price Increase: 2023-11-22
  • Automatic offers:
    • dukenv0307 | Contributor | 27853396
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

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

@alitoshmatov
Copy link
Contributor

Looks like receipt is required to edit distance request.

Backend is sending error saying that receipt is not found
Screenshot 2023-10-16 at 20 39 13

I think expected result should be sorted out before proceeding: Should distance request be allowed to be edited if its receipt is deleted?

@dummy-1111
Copy link
Contributor

This looks like a backend issue
The backend returns 404 as below
image

@honnamkuan
Copy link
Contributor

Seems like a backend issue, I think ideally when receipt is not available during distance request update, backend should generate a new receipt based on newly selected waypoints.

@melvin-bot melvin-bot bot added the Overdue label Oct 19, 2023
@stephanieelliott
Copy link
Contributor

Ok, thanks! Adding labels to assign an internal engineer for BE changes.

@melvin-bot melvin-bot bot removed the Overdue label Oct 20, 2023
@stephanieelliott stephanieelliott added Engineering Internal Requires API changes or must be handled by Expensify staff labels Oct 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 20, 2023

Triggered auto assignment to @danieldoglas (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Oct 20, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 20, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Oct 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

@danieldoglas, @stephanieelliott, @Santhosh-Sellavel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot removed the Overdue label Oct 23, 2023
@danieldoglas
Copy link
Contributor

adding @thienlnam since he was part of the core team for this!

@thienlnam
Copy link
Contributor

thienlnam commented Oct 23, 2023

After an internal discussion, https://expensify.slack.com/archives/C05DWUDHVK7/p1698085763744569

The expected functionality is that you should not be able to remove the distance map receipt. That part will also require FE updates and BE updates

@alitoshmatov
Copy link
Contributor

alitoshmatov commented Oct 23, 2023

I can apply frontend changes if external contributor needed

I would apply additional !TransactionUtils.isDistanceRequest(props.transaction) check here, so that only non-distance receipts could be deleted:

if (TransactionUtils.hasReceipt(props.transaction) && !TransactionUtils.isReceiptBeingScanned(props.transaction) && !isSettled) {

@melvin-bot melvin-bot bot added the Overdue label Oct 26, 2023
@thienlnam thienlnam added Weekly KSv2 and removed Daily KSv2 labels Oct 26, 2023
@melvin-bot melvin-bot bot removed the Overdue label Oct 26, 2023
Copy link

melvin-bot bot commented Nov 27, 2023

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

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@thienlnam thienlnam changed the title [$500] Distance - Unable to save distance edit after deleting receipt [$500] Distance - Prevent deleting receipt Nov 27, 2023
@dukenv0307
Copy link
Contributor

@thienlnam @Santhosh-Sellavel A bit curious about the replace receipt option
Screenshot 2023-11-28 at 11 15 43

The user can still replace the receipt with the uploaded image. In this case, do you guys want to display delete option ?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Nov 28, 2023
@dukenv0307
Copy link
Contributor

@Santhosh-Sellavel The PR is ready for review.

@thienlnam
Copy link
Contributor

thienlnam commented Nov 28, 2023

The user can still replace the receipt with the uploaded image. In this case, do you guys want to display delete option ?

Yeah we don't want to allow replacing the receipt either - We'll also need to make BE changes for this but for now can you hide the option in the FE (both delete and replace)?

@dukenv0307
Copy link
Contributor

dukenv0307 commented Nov 29, 2023

@thienlnam Already hides both options in the PR.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Dec 1, 2023
@melvin-bot melvin-bot bot changed the title [$500] Distance - Prevent deleting receipt [HOLD for payment 2023-12-08] [$500] Distance - Prevent deleting receipt Dec 1, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 1, 2023
Copy link

melvin-bot bot commented Dec 1, 2023

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

Copy link

melvin-bot bot commented Dec 1, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.6-2 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 2023-12-08. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

Copy link

melvin-bot bot commented Dec 1, 2023

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:

  • [@Santhosh-Sellavel] The PR that introduced the bug has been identified. Link to the PR:
  • [@Santhosh-Sellavel] 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:
  • [@Santhosh-Sellavel] 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:
  • [@Santhosh-Sellavel] Determine if we should create a regression test for this bug.
  • [@Santhosh-Sellavel] 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.
  • [@stephanieelliott] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 8, 2023
@stephanieelliott
Copy link
Contributor

stephanieelliott commented Dec 8, 2023

Summarizing payment on this issue:

@Santhosh-Sellavel
Copy link
Collaborator

Regression Steps should be enough here because the behavior was intentional earlier when it was added. Let me know your thoughts @thienlnam

Steps

  1. Create a distance request
  2. After the request is created, go to the transaction thread report
  3. Click on the receipt image
  4. Click on the three-dot in the attachment modal
  5. Verify that only the download option appears

@melvin-bot melvin-bot bot added the Overdue label Dec 13, 2023
@stephanieelliott
Copy link
Contributor

Issue for QA test here: https://github.com/Expensify/Expensify/issues/349090

All clear here, @Santhosh-Sellavel please request your payment via newdot!

@Santhosh-Sellavel
Copy link
Collaborator

Requested on ND

@JmillsExpensify
Copy link

$500 payment approved for @Santhosh-Sellavel based on this comment.

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. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests