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] 1:1 Submit expense - The receiving end of the IOU should not be asked to fill out information if the scan failed #51574

Open
1 of 8 tasks
lanitochka17 opened this issue Oct 28, 2024 · 54 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

@lanitochka17
Copy link

lanitochka17 commented Oct 28, 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: 9.0.54
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5121232&group_by=cases:section_id&group_order=asc&group_id=294998
Issue reported by: Applause - Internal Team

Action Performed:

  1. Start the Submit expense flow in a 1:1 conversation with a user you have access to
  2. Select the scan option
  3. Upload a picture that will fail the scan process
  4. Wait for the scan to fail
  5. Log in as the other account
  6. Navigate to the IOU that failed the scan
  7. Verify the receiver is not asked to fill out the missing information

Expected Result:

The receiving end of the IOU should not be asked to fill out information if the scan failed

Actual Result:

The receiving end of the IOU is asked to fill out information if the scan failed but can't

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
2.New.Expensify.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021854642765194540226
  • Upwork Job ID: 1854642765194540226
  • Last Price Increase: 2024-11-14
  • Automatic offers:
    • FitseTLT | Contributor | 105019830
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 28, 2024
Copy link

melvin-bot bot commented Oct 28, 2024

Triggered auto assignment to @alexpensify (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.

@lanitochka17
Copy link
Author

@alexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@FitseTLT
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

1:1 Submit expense - Scan failure should not ask receiver to enter information

What is the root cause of that problem?

We are displaying the same Enter an amount text for both side of the users

translationPath: 'common.error.enterAmount',

What changes do you think we should make in order to solve the problem?

We should display this copy only if the user canEditAmount and add another appropriate copy (like No amount set yet) and display it when the user can't modify the amount

                    translationPath: canEditAmount ? 'common.error.enterAmount' : 'common.error.noAmount',

We should do the same enterDate and enterMerchant

What alternative solutions did you explore? (Optional)

Optionally we can also avoid displaying the error for the receiving end

@melvin-bot melvin-bot bot added the Overdue label Oct 30, 2024
@alexpensify
Copy link
Contributor

Adding to my testing list, I'll review this one soon.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Oct 31, 2024
@alexpensify
Copy link
Contributor

No update yet

@melvin-bot melvin-bot bot removed the Overdue label Nov 5, 2024
@alexpensify alexpensify added the External Added to denote the issue can be worked on by a contributor label Nov 7, 2024
@melvin-bot melvin-bot bot changed the title 1:1 Submit expense - Scan failure does not ask receiver to enter information [$250] 1:1 Submit expense - Scan failure does not ask receiver to enter information Nov 7, 2024
Copy link

melvin-bot bot commented Nov 7, 2024

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

@melvin-bot melvin-bot bot added Overdue Help Wanted Apply this label when an issue is open to proposals by contributors labels Nov 7, 2024
Copy link

melvin-bot bot commented Nov 7, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Nov 7, 2024
@alexpensify
Copy link
Contributor

@getusha - can you please confirm if this proposal will fix this issue?

Heads up, I will be offline until Tuesday, November 12, 2024, and will not actively watch over this GitHub during that period.

If this GitHub requires an urgent update, please ask for help in the #expensify-open-source Slack Room. If it can wait, I'll continue the review process when I return online. Thanks!

@FitseTLT
Copy link
Contributor

FitseTLT commented Nov 7, 2024

@alexpensify The title of the issue should be updated according to the expected result

Expected Result:
The receiving end of the IOU should not be asked to fill out information if the scan failed

@alexpensify alexpensify changed the title [$250] 1:1 Submit expense - Scan failure does not ask receiver to enter information [$250] 1:1 Submit expense - The receiving end of the IOU should not be asked to fill out information if the scan failed Nov 7, 2024
@alexpensify
Copy link
Contributor

Done! Thanks for the feedback.

Copy link

melvin-bot bot commented Nov 11, 2024

@alexpensify @getusha this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? 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 Nov 11, 2024
Copy link

melvin-bot bot commented Nov 11, 2024

@alexpensify, @getusha Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@alexpensify
Copy link
Contributor

@getusha any update regarding the review here? Thanks!

Copy link

melvin-bot bot commented Nov 13, 2024

@alexpensify, @getusha Huh... This is 4 days overdue. Who can take care of this?

Copy link

melvin-bot bot commented Nov 14, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@FitseTLT
Copy link
Contributor

@FitseTLT we agreed on showing a system message instead of an error on the input, for this issue we just need to remove the error and RBR for the non-editable side.

@mountiny should we show $0.00 instead of leaving the field empty?

With the RBR I think in addition to the RBR shown in transaction details view, we should also remove the one displayed in LHN and ReportPreview and also MoneyRequestPreview for the non-editable side. Otherwise, we will be leading the user with the RBR into transaction details view where there won't be any violation RBR displayed which would be confusing.
@getusha BTW there are similar problems regarding other violations for other fields as well (like Missing Tag) which would extend the scope of this issue so should we handle only the amount and merchant case here?

@mountiny
Copy link
Contributor

Correct, for the user who cannot edit the expense, they should not see the RBR anywhere

which would extend the scope of this issue so should we handle only the amount and merchant case here?

Yeah I assume this applies for any violation, the fix should cover a generic case of not showing the RBR when the user cannot edit the expense

Copy link

melvin-bot bot commented Nov 28, 2024

@alexpensify, @mountiny, @FitseTLT, @getusha Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Nov 28, 2024
@mountiny
Copy link
Contributor

@getusha @FitseTLT How is this looking?

@FitseTLT
Copy link
Contributor

PR will be ready tomorrow 👍

@FitseTLT
Copy link
Contributor

@mountiny I have been working on removing RBR from the non-editable side but the problem is RBR is shown on a different level such as workspace chat, money report, report preview, and money request preview. So let's say the violation/error is related to the amount field to determine whether the current user can edit amount field of a transaction we need to have the parentReportAction and transactionThreadReport linked to the transaction

const canUserPerformWriteAction = !!ReportUtils.canUserPerformWriteAction(report) && !readonly;
const canEdit = ReportActionsUtils.isMoneyRequestAction(parentReportAction) && ReportUtils.canEditMoneyRequest(parentReportAction, transaction) && canUserPerformWriteAction;
const canEditTaxFields = canEdit && !isDistanceRequest;
const canEditAmount = canUserPerformWriteAction && ReportUtils.canEditFieldOfMoneyRequest(parentReportAction, CONST.EDIT_REQUEST_FIELD.AMOUNT);

but the problem is we are not always guaranteed these data is available in onyx. For instance, if the user just logged in and didn't open the transaction Thread reports when we try to calculate the RBR for the workspace chat the parent report action linked to the transactions will not be available until they open the expense report so we can't reliably and consistently determine canEditMoneyRequest.
I think all we can do is show different copy in transaction thread based on whether or not the user can edit the field as in transaction thread details view we can determine whether the field can be edited. WDYT

@mountiny
Copy link
Contributor

@FitseTLT I see what you mean about not all data being accessible. So what we can do is to change the text for the admin, but they will still see the RBR leading you to something they cannot edit if they just signed in, is that right?

@FitseTLT
Copy link
Contributor

@FitseTLT I see what you mean about not all data being accessible. So what we can do is to change the text for the admin, but they will still see the RBR leading you to something they cannot edit if they just signed in, is that right?

Yes

Copy link

melvin-bot bot commented Dec 2, 2024

@alexpensify, @mountiny, @FitseTLT, @getusha 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@FitseTLT
Copy link
Contributor

FitseTLT commented Dec 2, 2024

@mountiny bump on the ^

@mountiny
Copy link
Contributor

mountiny commented Dec 3, 2024

I think that is ok edge case to have for now, I believe we will stop sending the expense reports without RBR to the user from the backend

So lets just hide the text

@FitseTLT
Copy link
Contributor

FitseTLT commented Dec 3, 2024

I think that is ok edge case to have for now, I believe we will stop sending the expense reports without RBR to the user from the backend

So lets just hide the text

@mountiny To summarize:
RBRs on workspace chats, report previews, money request view will show for non-editable side (b/c we can't reliably determine whether it is editable or not due to lack of data) and when the user opens the expense details page we will only have RBR icons on the fields but not text beside it ?? I mean, IMO, what would be ideal is change the Enter amount text to something like Amount is not Entered for the non-editable side instead of only show red icon which might be confusing

@mountiny
Copy link
Contributor

mountiny commented Dec 3, 2024

No, once they open the thread, the RBR will be gone, as we will have enough data.

Users are not expected to keep signing out so this is an edge case for only fresh sign ins, if you use the app you get all the data through pusher and RBR should not show up

@FitseTLT
Copy link
Contributor

FitseTLT commented Dec 5, 2024

Working on this. Will make PR ready by EOW 👍

Copy link

melvin-bot bot commented Dec 6, 2024

@alexpensify, @mountiny, @FitseTLT, @getusha 10 days overdue. Is anyone even seeing these? Hello?

@alexpensify
Copy link
Contributor

Ok, thank you for the update.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Dec 7, 2024
@alexpensify
Copy link
Contributor

@FitseTLT do you have a PR update? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Dec 10, 2024
@FitseTLT
Copy link
Contributor

@FitseTLT do you have a PR update? Thanks!

Done with the code will record screenshots and create the PR tomorrow. Thx for your patience

@alexpensify
Copy link
Contributor

Heads up, I will be offline until Wednesday, December 18, 2024, and will not actively watch over this GitHub during that period.

If this GitHub requires an urgent update, please ask for help in the #expensify-open-source Slack Room. If the inquiry can wait, I'll review it when I return online.

@garrettmknight garrettmknight moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Dec 17, 2024
@alexpensify
Copy link
Contributor

Weekly Update: PR is moving along through the review process

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: Bugs and Follow Up Issues
Development

No branches or pull requests

7 participants