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

[$500] Web - Requested Money (RHN) Details Unavailable for Editing in Offline Mode #26748

Closed
2 of 6 tasks
izarutskaya opened this issue Sep 5, 2023 · 32 comments
Closed
2 of 6 tasks
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

@izarutskaya
Copy link

izarutskaya commented Sep 5, 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!


Action Performed:

  1. Log in to User A's account.
  2. Create a workspace and invite User B.
  3. Open another browser and log in with User B's account.
  4. Open the policy expense chat.
  5. Navigate to the "Request money" section.
  6. Enter an amount and request it.
  7. Go back to User A’s account.
  8. Open the policy expense chat where userB sent a message.
  9. Click on the requested money (do not click again to open its detail)
  10. Now, go to Settings > Preferences.
  11. Turn on “Force offline” and go back.
  12. Click again on the requested money to open its details.
  13. Click on any fields.

Expected Result:

RHN details should open when clicking on requested money detail fields in offline mode

Actual Result:

Requested Money (RHN) Details Unavailable for Editing in Offline Mode

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: v1.3.63-0

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

Notes/Photos/Videos: Any additional supporting documentation

screen-recording-2023-08-31-at-65415-am_wjYiu1My.mp4
Recording.1446.mp4

Expensify/Expensify Issue URL:

Issue reported by: @ayazhussain79

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693447865209099

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c72c5b9a2b5bf971
  • Upwork Job ID: 1700098728344993792
  • Last Price Increase: 2023-09-08
  • Automatic offers:
    • tienifr | Contributor | 26630334
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 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

@conorpendergrast conorpendergrast added the Needs Reproduction Reproducible steps needed label Sep 6, 2023
@conorpendergrast
Copy link
Contributor

Very weird - I have not been able to reproduce this one. @ayazhussain79 please could you confirm the reproduction steps, and try to reproduce again?

2023-09-06_10-54-02.mp4

@conorpendergrast
Copy link
Contributor

Closing as we don't have reproduction steps yet. Reopen if that changes!

@ayazhussain79
Copy link
Contributor

ayazhussain79 commented Sep 7, 2023

@conorpendergrast sorry for delay
here are the steps :

  1. Log in to User A's account.
  2. Create a workspace and invite User B.
  3. Open another browser and log in with User B's account.
  4. Open the policy expense chat.
  5. Navigate to the "Request money" section.
  6. Enter an amount and request it.
  7. Go back to User A’s account.
  8. Open the policy expense chat where userB sent a message.
  9. Click on the requested money.(do not click again to open its detail)
  10. Now, go to Settings > Preferences.
  11. Turn on “Force offline” and go back.
  12. Click again on the requested money to open its details.
  13. Click on any fields.

Please check step 9 (do not click again to open its detail) and 12 (open IOU detail at step 12)

screen-recording-2023-09-07-at-83127-pm_kvcsnW8Q.mp4

@conorpendergrast conorpendergrast removed the Needs Reproduction Reproducible steps needed label Sep 8, 2023
@conorpendergrast
Copy link
Contributor

Nice, I was able to reproduce this on both OSX Safari and OSX desktop app. Checking for correct behaviour now

@conorpendergrast
Copy link
Contributor

Posted to Slack and tagged you there @ayazhussain79!

@ayazhussain79
Copy link
Contributor

@conorpendergrast ok Thank you

@conorpendergrast
Copy link
Contributor

conorpendergrast commented Sep 8, 2023

Via Slack (external, internal), we agree that this is a bug. This flow should follow the pattern B.

@conorpendergrast conorpendergrast added the External Added to denote the issue can be worked on by a contributor label Sep 8, 2023
@melvin-bot melvin-bot bot changed the title Web - Requested Money (RHN) Details Unavailable for Editing in Offline Mode [$500] Web - Requested Money (RHN) Details Unavailable for Editing in Offline Mode Sep 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 8, 2023

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

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

melvin-bot bot commented Sep 8, 2023

Current assignee @conorpendergrast is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Sep 8, 2023

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

@tienifr
Copy link
Contributor

tienifr commented Sep 8, 2023

Proposal

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

What is the root cause of that problem?

  1. In here, when we build the transaction thread when clicking the money request, we're getting the reportID of the money request incorrectly in order to get the policy. reportID doesn't exist in reportAction in this case, so the policyID will be FAKE, and when checking the canEdit money request here, the isAdmin will be false, leading to the canEdit to be false

If canEdit is false, the EditRequest modal will dismiss immediately as can be seen here.

  1. Besides, that condition for canEdit is inconsistent with the canEdit when we determine if we want to navigate the user here.

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

  1. We should use the moneyRequestReportID when building the transaction thread instead, by updating this line to lodashGet(getReport(moneyRequestReportID), 'policyID', CONST.POLICY.OWNER_EMAIL_FAKE),

  2. That should be enough to fix this issue, but I think we should make this canEdit condition the same as this one, which use the standard ReportUtils.canEditMoneyRequest.

We might want to add the check for deleted report action like here to ReportUtils.canEditMoneyRequest as well, so we won't allow editing a deleted money request report.

What alternative solutions did you explore? (Optional)

NA.

@conorpendergrast
Copy link
Contributor

As a correction to the earlier message, this should be pattern B

@melvin-bot melvin-bot bot added the Overdue label Sep 11, 2023
@conorpendergrast conorpendergrast removed their assignment Sep 11, 2023
@melvin-bot melvin-bot bot removed the Overdue label Sep 11, 2023
@conorpendergrast conorpendergrast added Overdue and removed Bug Something is broken. Auto assigns a BugZero manager. labels Sep 11, 2023
@conorpendergrast conorpendergrast added the Bug Something is broken. Auto assigns a BugZero manager. label Sep 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

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

@melvin-bot

This comment was marked as duplicate.

@conorpendergrast
Copy link
Contributor

I'm on parental leave; re-assigning! This has been triaged and is waiting for proposals.

@burczu
Copy link
Contributor

burczu commented Sep 12, 2023

I've just reviewed the proposal from @tienifr and it does fix the issue so I think we can proceed with it.

@tienifr One question about your additional fix for canEdit - the differences between these two places is that the canEditMoneyRequest method does not check for !isDeleted flag as it is done in the other place. Are you sure switching to use the method in both places and omitting this check won't break anything?

🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

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

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

melvin-bot bot commented Sep 12, 2023

📣 @tienifr 🎉 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
Copy link

melvin-bot bot commented Sep 12, 2023

📣 @ayazhussain79 We're missing your Upwork ID to automatically send you an offer for the Reporter role.
Once you apply to the Upwork job, your Upwork ID will be stored and you will be automatically hired for future jobs!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 12, 2023
@tienifr
Copy link
Contributor

tienifr commented Sep 12, 2023

PR ready for review #27285

@tienifr
Copy link
Contributor

tienifr commented Sep 13, 2023

Are you sure switching to use the method in both places and omitting this check won't break anything?

@burczu For this I think it's better to leave canEditMoneyRequest as is because the first point in my proposal alone can fix the issue. I'm a little reluctant to doing that because edit request modal behavior had a long history and I'm not sure what it could break.

@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

🎯 ⚡️ Woah @burczu / @tienifr, great job pushing this forwards! ⚡️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @tienifr got assigned: 2023-09-12 12:23:03 Z
  • when the PR got merged: 2023-09-13 12:02:47 UTC

On to the next one 🚀

@tienifr
Copy link
Contributor

tienifr commented Sep 27, 2023

@burczu @tjferriss This one has been deployed to production 10 days ago but I haven't seen Melvin's BZ checklist reminder. As the regression period is over, I think we can wrap this up here. Thanks!

@tjferriss
Copy link
Contributor

@burczu can you please apply to the job on Upworks? https://www.upwork.com/jobs/~01c72c5b9a2b5bf971

@burczu
Copy link
Contributor

burczu commented Sep 29, 2023

@tjferriss I'm not eligible for payment here because I'm a contractor from Callstack.

@tjferriss
Copy link
Contributor

tjferriss commented Sep 29, 2023

I'm manually adding the instructions:

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.65-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

#27285
If no regressions arise, payment will be issued on 2023-09-15. 🎊

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 @ayazhussain79 $250
  • Contributor that fixed the issue @tienifr $750
  • Contributor+ that helped on the issue and/or PR - @burczu NA Callstack

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

Merged PR within 3 business days of assignment - 50% bonus
Merged PR more than 9 business days after assignment - 50% penalty

@tjferriss
Copy link
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:

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

@tienifr
Copy link
Contributor

tienifr commented Oct 8, 2023

@tjferriss I think we're good to wrap this up.

@burczu
Copy link
Contributor

burczu commented Oct 10, 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:

@tjferriss
Copy link
Contributor

The payments have been sent via Upworks.

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
None yet
Development

No branches or pull requests

7 participants