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-07] [$500] Go back from Flag as offensive doesn't display correct report page #30101

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

Comments

@m-natarajan
Copy link

m-natarajan commented Oct 20, 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.87-2
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: @suneox
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697654423349679

Action Performed:

  1. Go to any public room report exam
  2. Hold touch on any chat message select "Flag as offensive"
  3. Reload page exam
  4. Select back button

Expected Result:

App should display report from Flag as offensive

Actual Result:

App doesn't display report from Flag as offensive

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
az_recorder_20231019_004916.mp4
iOS: Native
iOS: mWeb Safari
RPReplay_Final1697654319.MP4
MacOS: Chrome / Safari
flag-as-offensive-chrome.mp4
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01bff2f94a7065c212
  • Upwork Job ID: 1715445279961526272
  • Last Price Increase: 2023-10-20
  • Automatic offers:
    • suneox | Contributor | 27349484
@m-natarajan m-natarajan added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 20, 2023
@melvin-bot melvin-bot bot changed the title Go back from Flag as offensive doesn't display correct report page [$500] Go back from Flag as offensive doesn't display correct report page Oct 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 20, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 20, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 20, 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

@melvin-bot
Copy link

melvin-bot bot commented Oct 20, 2023

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

@m-natarajan
Copy link
Author

Proposal from @suneox

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

Go back from Flag as offensive doesn’t display correct report page

What is the root cause of that problem?

In the HeaderWithBackButton of the FlagCommentPage we dont specify a route for the back action

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

We should handle onBackButtonPress go to current report from HeaderWithBackButton

    <HeaderWithBackButton
        title={props.translate(‘reportActionContextMenu.flagAsOffensive’)}
        onBackButtonPress={() => Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(props.report.reportID))}
    />

What alternative solutions did you explore? (Optional)

@mananjadhav
Copy link
Collaborator

@suneox's proposal seems good. quick straight forward fix.

🎀 👀 🎀 C+ reviewed.

@melvin-bot
Copy link

melvin-bot bot commented Oct 22, 2023

Triggered auto assignment to @iwiznia, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@iwiznia
Copy link
Contributor

iwiznia commented Oct 23, 2023

@mananjadhav I am confused, I see no proposal from @suneox... did you mean to say @m-natarajan and pick this proposal?

@mananjadhav
Copy link
Collaborator

@iwiznia Sorry for the confusion, I should've linked the comment.

@m-natarajan is from Applause and @suneox is the reporter who posted the solution on slack.

@mananjadhav
Copy link
Collaborator

@suneox Can you please post a comment with your proposal? So that it can be assigned.

@suneox
Copy link
Contributor

suneox commented Oct 24, 2023

Proposal

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

Go back from Flag as offensive doesn’t display correct report page

What is the root cause of that problem?

In the HeaderWithBackButton of the FlagCommentPage we dont specify a route for the back action

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

We should handle onBackButtonPress go to current report from HeaderWithBackButton

   <HeaderWithBackButton
      title={props.translate(‘reportActionContextMenu.flagAsOffensive’)}
      onBackButtonPress={() => {
          const topMostReportID = Navigation.getTopmostReportId();
          if (topMostReportID) {
              Navigation.goBack(ROUTES.HOME);
              return;
          }
          Navigation.goBack();
          Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(props.report.reportID));
      }}
   />

this pattern has been applied at ReportDetailPage to avoid back multiple times keep navigation history

What alternative solutions did you explore? (Optional)

If we need to keep the navigation history just update it to

    <HeaderWithBackButton
        title={props.translate(‘reportActionContextMenu.flagAsOffensive’)}
        onBackButtonPress={() => Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(props.report.reportID))}
    />

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 24, 2023

📣 @mananjadhav Please request via NewDot manual requests for the Reviewer role ($500)

@melvin-bot
Copy link

melvin-bot bot commented Oct 24, 2023

📣 @suneox 🎉 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 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 24, 2023
@suneox
Copy link
Contributor

suneox commented Oct 24, 2023

Hi @mananjadhav the PR is ready to review

@mananjadhav
Copy link
Collaborator

mananjadhav commented Oct 26, 2023

Discussing the last comment change here. @suneox has added the following change.

Browser.isMobile() ? () => Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(props.report.reportID)) : undefined

I don't think it's a good idea to push a platform specific check on back button press. I checked further in the code and I don't think we're doing this. @iwiznia what do you think about this?

I did another quick test (which I should've done earlier) for the profile view, it looks like we have the same behavior. So I want to go ask @Christinadobrzyn and @iwiznia, do we want to fix this across the app for other routes as well? I personally think we shouldn't as it is about fresh load of the page.

@iwiznia
Copy link
Contributor

iwiznia commented Oct 26, 2023

Yeah, sounds off. @suneox can you explain the problem that prompted you to add that code?

This comment was marked as off-topic.

@Christinadobrzyn Christinadobrzyn added Weekly KSv2 and removed Daily KSv2 labels Nov 18, 2023
@Christinadobrzyn Christinadobrzyn self-assigned this Nov 18, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 30, 2023
@melvin-bot melvin-bot bot changed the title [$500] Go back from Flag as offensive doesn't display correct report page [HOLD for payment 2023-12-07] [$500] Go back from Flag as offensive doesn't display correct report page Nov 30, 2023
Copy link

melvin-bot bot commented Nov 30, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 30, 2023
Copy link

melvin-bot bot commented Nov 30, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.5-7 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-07. 🎊

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 Nov 30, 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:

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

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Dec 6, 2023

prepping for payment

Payouts due:

Issue Reporter: $50 @suneox (Paid in Upwork)
Contributor: $500 @suneox (Paid in Upwork)
Contributor+: $500 @mananjadhav (in NewExpensify)

Eligible for 50% #urgency bonus? N - PR created Oct 24th and merged Nov 28th

Upwork job is here.

@mananjadhav should there be a regression test?

@mananjadhav
Copy link
Collaborator

Yeah I think it's best we add a regression test. We've updated the back button logic and also added some calls to Navigation. QA steps from the PR body looks fine to me.

There is no offending PR, because I think we didn't consider this case.

@mananjadhav
Copy link
Collaborator

I've raised my request on NewDot.

@suneox
Copy link
Contributor

suneox commented Dec 7, 2023

Hi @mananjadhav
Based on the code change only affect 2 pages FlagCommentPage and ReportDetailsPage by props shouldNavigateToTopMostReport so I would like to know the scope of this regression test, Thank you

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

just checking @suneox @mananjadhav is there a regression from this?

@suneox
Copy link
Contributor

suneox commented Dec 8, 2023

Base on PR I think no regression

@mananjadhav
Copy link
Collaborator

No regression here @Christinadobrzyn

@Christinadobrzyn
Copy link
Contributor

Awesome! let me know if this is ready to be closed!

@mananjadhav
Copy link
Collaborator

@Christinadobrzyn once it is paid out and the regression test is added we can close it.

@Christinadobrzyn
Copy link
Contributor

Oh gosh, I'm sorry I thought I paid this yesterday! Sorry to keep you waiting, paying now!

@Christinadobrzyn
Copy link
Contributor

Paid @suneox through Upwork based on this payment summary

Gonna close this out!

@suneox
Copy link
Contributor

suneox commented Dec 8, 2023

Thank @Christinadobrzyn and @mananjadhav I have received payment

@JmillsExpensify
Copy link

$500 payment approved for @mananjadhav 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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants