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] LHN - Expense submitted offline doesn't appear in LHN. #48596

Closed
1 of 6 tasks
lanitochka17 opened this issue Sep 4, 2024 · 29 comments
Closed
1 of 6 tasks

[$250] LHN - Expense submitted offline doesn't appear in LHN. #48596

lanitochka17 opened this issue Sep 4, 2024 · 29 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@lanitochka17
Copy link

lanitochka17 commented Sep 4, 2024

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: 9.0.29-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: N/A
Email or phone of affected tester (no customers): biruknew45+624@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Go offline
  3. Click on the FAB > Enter a user you haven't previously chatted with > Select it
  4. In the chat, click the plus button in the compose box
  5. Submit an expense
  6. Navigate back to the Inbox page and observe
  7. Go online

Expected Result:

When submitting an expense offline, it should appear in the Inbox with 50% opacity. Upon going online, it should update to 100% opacity

Actual Result:

The expense does not appear in the LHN in the Inbox while offline and after going online

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

Add any screenshot/video evidence

Bug6592625_1725438189682.1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021833031002469120796
  • Upwork Job ID: 1833031002469120796
  • Last Price Increase: 2024-09-30
Issue OwnerCurrent Issue Owner: @mollfpr
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 4, 2024
Copy link

melvin-bot bot commented Sep 4, 2024

Triggered auto assignment to @greg-schroeder (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

@greg-schroeder 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

@dominictb
Copy link
Contributor

dominictb commented Sep 5, 2024

Edited by proposal-police: This proposal was edited at 2024-09-05 04:40:30 UTC.

Proposal

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

  • LHN - Expense submitted offline doesn't appear in LHN

What is the root cause of that problem?

  • When submitting a new expense, we didn't update notificationPreference to always:

    App/src/libs/actions/IOU.ts

    Lines 987 to 993 in fd16fdd

    value: {
    ...chatReport,
    lastReadTime: DateUtils.getDBTime(),
    lastMessageTranslationKey: '',
    iouReportID: iouReport.reportID,
    ...(isNewChatReport ? {pendingFields: {createChat: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD}} : {}),
    },
    so its notificationPreference data is still hidden. As a result, the chat is disappeared in LHN.

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

  • We should add a logic:
    const shouldUpdateNotificationPrefernece = !isEmptyObject(chatReport) && ReportUtils.getReportNotificationPreference(chatReport) === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;

to check whether we should update the notificationPreference. If so, set notificationPreference to always in:

App/src/libs/actions/IOU.ts

Lines 987 to 993 in fd16fdd

value: {
...chatReport,
lastReadTime: DateUtils.getDBTime(),
lastMessageTranslationKey: '',
iouReportID: iouReport.reportID,
...(isNewChatReport ? {pendingFields: {createChat: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD}} : {}),
},

  • Issue should be fixed in BE as well.

What alternative solutions did you explore? (Optional)

@greg-schroeder greg-schroeder added the External Added to denote the issue can be worked on by a contributor label Sep 9, 2024
@melvin-bot melvin-bot bot changed the title LHN - Expense submitted offline doesn't appear in LHN. [$250] LHN - Expense submitted offline doesn't appear in LHN. Sep 9, 2024
Copy link

melvin-bot bot commented Sep 9, 2024

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

@melvin-bot melvin-bot bot added Overdue Help Wanted Apply this label when an issue is open to proposals by contributors labels Sep 9, 2024
@greg-schroeder
Copy link
Contributor

Nex up is proposal review

Copy link

melvin-bot bot commented Sep 9, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Sep 9, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

@mollfpr, @greg-schroeder 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 Sep 12, 2024
@greg-schroeder
Copy link
Contributor

Bump @mollfpr

@greg-schroeder
Copy link
Contributor

You around @mollfpr?

@greg-schroeder
Copy link
Contributor

Bump @mollfpr

@mollfpr
Copy link
Contributor

mollfpr commented Sep 16, 2024

Sorry for the delay 🙏

Reviewing now!

@melvin-bot melvin-bot bot removed the Overdue label Sep 16, 2024
@mollfpr
Copy link
Contributor

mollfpr commented Sep 16, 2024

I can't reproduce the issue.

Screen_Recording_20240916_153650_Chrome.mov

@dominictb Is it because notificationPreference is hidden in the report not show in the LHN?

Issue should be fixed in BE as well.

What's BE fix we should apply?

@dominictb

This comment was marked as outdated.

@dominictb
Copy link
Contributor

@mollfpr @greg-schroeder Currently, when creating a new conversation with a new email, the backend returns the notificationPreference as hidden (via report.participants.[accountID] data), but the frontend is setting it to always. Which behavior is correct?

Copy link

melvin-bot bot commented Sep 16, 2024

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

@greg-schroeder
Copy link
Contributor

I am not sure - do you know @mollfpr? Or we can ask the team as a whole perhaps in Slack?

@mollfpr
Copy link
Contributor

mollfpr commented Sep 17, 2024

I'm afraid I don't have a clue either, but I think the correct one should be data from BE.

Currently, when creating a new conversation with a new email, the backend returns the notificationPreference as hidden (via report.participants.[accountID] data), but the frontend is setting it to always

@dominictb Does this mean that the preference got overridden on the FE? Could you still get the notification after the BE return hidden?

@dominictb
Copy link
Contributor

Does this mean that the preference got overridden on the FE

Yep, in offline mode. And here is the reason for those changes.

@mollfpr
Copy link
Contributor

mollfpr commented Sep 18, 2024

@dominictb are you still able to reproduce the issue?

@dominictb
Copy link
Contributor

I cannot reproduce because of this line, which was added in the recently PR:

CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS,

But I think that change is not correct, we need to revert it to match what BE returns, "hidden" instead of "always".

Copy link

melvin-bot bot commented Sep 18, 2024

@mollfpr @greg-schroeder 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!

@greg-schroeder
Copy link
Contributor

What do you think of this @mollfpr ?

@melvin-bot melvin-bot bot added the Overdue label Sep 23, 2024
Copy link

melvin-bot bot commented Sep 23, 2024

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

Copy link

melvin-bot bot commented Sep 23, 2024

@mollfpr, @greg-schroeder Huh... This is 4 days overdue. Who can take care of this?

Copy link

melvin-bot bot commented Sep 25, 2024

@mollfpr, @greg-schroeder 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@greg-schroeder
Copy link
Contributor

Bump @mollfpr

Copy link

melvin-bot bot commented Sep 27, 2024

@mollfpr, @greg-schroeder 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

Copy link

melvin-bot bot commented Sep 30, 2024

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

@greg-schroeder
Copy link
Contributor

I'm going to close this as #vip-vsb is now paused and it doesn't really fit into #newdot-quality. Please reopen if you disagree.

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. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
No open projects
Status: No status
Development

No branches or pull requests

4 participants