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

IOU - Details modal is dismissed after editing title #44963

Closed
5 of 6 tasks
izarutskaya opened this issue Jul 8, 2024 · 32 comments
Closed
5 of 6 tasks

IOU - Details modal is dismissed after editing title #44963

izarutskaya opened this issue Jul 8, 2024 · 32 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2

Comments

@izarutskaya
Copy link

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: v9.0.5-3
Reproducible in staging?: Y
Reproducible in production?: New feature
Email or phone of affected tester (no customers): [email protected]
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Navigate to a workspace chat
  2. Submit a manual expense
  3. Click on the IOU preview component
  4. Click on report header > Title
  5. Edit title & click Save

Expected Result:

User should be returned to Details RHP

Actual Result:

Details RHP modal is dismissed

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

Bug6535803_1720442342286.Screen_Recording_2024-07-08_at_3.14.10_in_the_afternoon.mp4

View all open jobs on GitHub

@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Jul 8, 2024
Copy link

melvin-bot bot commented Jul 8, 2024

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

Copy link

melvin-bot bot commented Jul 8, 2024

Triggered auto assignment to @iwiznia (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jul 8, 2024
Copy link
Contributor

github-actions bot commented Jul 8, 2024

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@izarutskaya
Copy link
Author

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

@izarutskaya
Copy link
Author

We think this issue might be related to the #collect project.

@etCoderDysto
Copy link
Contributor

etCoderDysto commented Jul 8, 2024

Proposal

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

Details modal is dismissed after editing title

What is the root cause of that problem?

We are dismissing the modal and navigating to the previous report here

Navigation.dismissModal(report?.reportID);

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

We should change Navigation.dismissModal(report?.reportID) with Navigation.goBack()

What alternative solutions did you explore? (Optional)

@iwiznia
Copy link
Contributor

iwiznia commented Jul 8, 2024

That makes sense @etCoderDysto but wouldn't that break the feature for the other places where we call this (that existed before we added the possibility of editing the title like this)?

@etCoderDysto
Copy link
Contributor

I have been trying to check other pages after applying. I found that different component is used other pages as room's details page. But to make things sure. I will check other places that use the same component.

@etCoderDysto
Copy link
Contributor

etCoderDysto commented Jul 8, 2024

@iwiznia The component seems to be used only in ModalStackNavigator. I think it is safe to make the change.
Screenshot 2024-07-08 at 5 07 23 in the afternoon

@iwiznia
Copy link
Contributor

iwiznia commented Jul 8, 2024

BTW this comes from this PR #44671 that's solving this issue #44149

@Julesssss
Copy link
Contributor

Solution seems good 👍

@etCoderDysto
Copy link
Contributor

Should I raise a quick PR?

@iwiznia
Copy link
Contributor

iwiznia commented Jul 8, 2024

Yeah, looks good to me too, but I am kind of surprised though, what was that component/page used for before? It must've been used for something in some flow, but I am not sure where... I'd want us to test that flow to ensure we are not breaking it.

@etCoderDysto
Copy link
Contributor

I am raising a pr asap. And investigating what component was used before.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review and removed Hourly KSv2 labels Jul 8, 2024
@melvin-bot melvin-bot bot added the Weekly KSv2 label Jul 8, 2024
@etCoderDysto
Copy link
Contributor

@iwiznia I have found a flow where we use EditReportsFieldPage. We use it in MoneyReportView to display editable report fields when the user has enabled 'Report Fields' in more features.

<MenuItemWithTopDescription
description={Str.UCFirst(reportField.name)}
title={fieldValue}
onPress={() => Navigation.navigate(ROUTES.EDIT_REPORT_FIELD_REQUEST.getRoute(report.reportID, report.policyID ?? '-1', reportField.fieldID))}

I have changed the logic to address that we don't change exiting behaviour in MoneyReportView as below. We navigate back only when user is changing report title.

 if (isReportFieldTitle) {
            ReportActions.updateReportName(report.reportID, value, report.reportName ?? '');
            Navigation.goBack();
        } else {
            ReportActions.updateReportField(report.reportID, {...reportField, value: value === '' ? null : value}, reportField);
            Navigation.dismissModal(report?.reportID);
        }
        

@etCoderDysto
Copy link
Contributor

The PR is ready for review.

@iwiznia
Copy link
Contributor

iwiznia commented Jul 9, 2024

Ah nice, I knew that code must've been there for a reason 😄

@Julesssss Julesssss removed the DeployBlockerCash This issue or pull request should block deployment label Jul 9, 2024
@Julesssss
Copy link
Contributor

CPd. thanks

@jayeshmangwani
Copy link
Contributor

@adelekennedy Please assign me to the issue for tracking the payment (reviewed PR)

@adelekennedy
Copy link

done @jayeshmangwani !

@etCoderDysto
Copy link
Contributor

@adelekennedy
Copy link

Thank you @etCoderDysto - the automatic update failed here.

@etCoderDysto
Copy link
Contributor

Yes, mevlin is not adding lables.

@adelekennedy adelekennedy added the Awaiting Payment Auto-added when associated PR is deployed to production label Jul 18, 2024
@adelekennedy
Copy link

adelekennedy commented Jul 18, 2024

@jayeshmangwani 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:

  • The PR that introduced the bug has been identified. Link to the PR:
  • 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:
  • 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:
  • A regression test has been added or updated so that the same bug will not reach production again. Link to the GH issue for creating the test here:

@adelekennedy
Copy link

adelekennedy commented Jul 18, 2024

Payouts due:

@adelekennedy
Copy link

@etCoderDysto will you link your upwork profile here?

@jayeshmangwani
Copy link
Contributor

Regression Test Proposal

  1. Go to a workspace chat.
  2. Submit a manual expense.
  3. Click on the IOU preview component.
  4. Click on the report header -> Title.
  5. Edit the title and click Save.
  6. Verify that you are navigated back to the Details page.

Do we agree 👍 or 👎

@adelekennedy
Copy link

offer sent @etCoderDysto

@etCoderDysto
Copy link
Contributor

offer sent @etCoderDysto

I have accepted the offer. Thank you!

@adelekennedy
Copy link

@jayeshmangwani
Copy link
Contributor

Requested $250

@JmillsExpensify
Copy link

$250 approved for @jayeshmangwani

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 Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants