Repository navigation
[HOLD for payment 2024-02-20] [$500] LHN - Task name on secondary user LHN does not update until open the report #35002
Description
Activity
- addedExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributorDailyKSv2KSv2BugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.
on Jan 23, 2024 - changed the title
[-]LHN - Task name on secondary user LHN does not update until open the report[/-][+][$500] LHN - Task name on secondary user LHN does not update until open the report[/+]on Jan 23, 2024 Job added to Upwork: https://www.upwork.com/jobs/~01318631513a1f1561
Triggered auto assignment to @bfitzexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.- addedHelp WantedApply this label when an issue is open to proposals by contributorsApply this label when an issue is open to proposals by contributors
on Jan 23, 2024 Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (
External)Proposal
Please re-state the problem that we are trying to solve in this issue.
LHN - Task name on secondary user LHN does not update until open the report
What is the root cause of that problem?
The response of the initial
OpenAppapi call after user first logs in does not includechildReportIDwhich is needed for getting task name. Hence the initial experience is broken.
The data is, however, return in
OpenReportapi call, which would merge to Onyx and bring back the right last message in the sidebar.
The issue is actually reproduceable across all platforms.
What changes do you think we should make in order to solve the problem?
I would highly suggest a change in the
OpenAppendpoint to include all the necessary data. It would be a lot cleaner.If we want to do it on frontend, the change would be:
- Subscribe to
ONYXKEYS.COLLECTION.REPORTinOptionsListUtils.ts - Add callback to fill
childReportIDintoreportActionby finding the relevantreportbyparentReportActionID. The callback will need to execute both whenONYXKEYS.COLLECTION.REPORTandONYXKEYS.COLLECTION.REPORT_ACTIONShave any update to avoid any race condition.
What alternative solutions did you explore? (Optional)
Another frontend alternative solution is to add a transform pipeline step here: https://github.com/Expensify/App/blob/main/src/components/LHNOptionsList/LHNOptionsList.tsx#L138, which does the same data filling step mentioned above (find relevant report by
parentReportActionIDand backfill the report'sreportIdaschildReportIDto reportAction).I would not recommend this alternative because it's not a pattern that I've seen in the code base. For consistency, we should follow the practice in https://github.com/Expensify/App/blob/main/src/libs/OptionsListUtils.js and keep all data massaging process encapsulated in these connected utils.
- Subscribe to
Proposal
Please re-state the problem that we are trying to solve in this issue.
LHN - Task name on secondary user LHN does not update until open the report
What is the root cause of that problem?
As there is a purposeful reduction in data sent from BE in
OpenApp, the report actions for a displayed report in LHN can be partially present. Dependence of LHN subtitle display for task on report action’schildReportIDas mentioned here will not assure a correct task subtitle. This is the root cause of the problem.What changes do you think we should make in order to solve the problem?
It does not make sense to form a task title when
taskTitleis empty here
So, we can solve this problem here by eitherA) Falling back on reportAction’s message text like this or
return taskTitle ? Localize.translateLocal('task.messages.created', {title: taskTitle}) : reportAction?.message?.[0]?.text;B) Falling back on Report’s
lastMessageTexthere by simply returning empty string like thisreturn taskTitle ? Localize.translateLocal('task.messages.created', {title: taskTitle}) : '';Recently, we have also done a similar change for
ReportPreviewhereWhat alternative solutions did you explore? (Optional)
@cheng-kang Thanks for the proposal. Your RCA makes sense. But I think
OpenAppnot returning full report action data is on purpose. As for the frontend suggested solutions those look an overkill, we should not fillchildReportIDmanually.@rojiphil Thanks for the proposal. Your RCA is correct. Solution B looks good to me.
🎀 👀 🎀 C+ reviewed
Link to proposal16 remaining items
- addedWeeklyKSv2KSv2Awaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to productionand removedWeeklyKSv2KSv2
on Feb 13, 2024 - changed the title
[-][$500] LHN - Task name on secondary user LHN does not update until open the report[/-][+][HOLD for payment 2024-02-20] [$500] LHN - Task name on secondary user LHN does not update until open the report[/+]on Feb 13, 2024 Reviewinglabel has been removed, please complete the "BugZero Checklist".The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.40-5 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 2024-02-20. 🎊
For reference, here are some details about the assignees on this issue:
- @rojiphil requires payment automatic offer (Contributor)
- @s77rt requires payment automatic offer (Reviewer)
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:
- [@s77rt] The PR that introduced the bug has been identified. Link to the PR:
- [@s77rt] 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:
- [@s77rt] 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:
- [@s77rt] Determine if we should create a regression test for this bug.
- [@s77rt] 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.
- [@bfitzexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
- The PR that introduced the bug has been identified: fix: Update task title without opening the report #32249
- The offending PR has been commented on: fix: Update task title without opening the report #32249 (comment)
- A discussion in #expensify-bugs has been started : Not needed - looks like a onetime unique bug
- Determine if we should create a regression test for this bug: I don't think this needs a regression test
Reacted by Ben FitzpatrickSwitching this to Daily so that it's on my list for Tuesday.
Payment due tomorrow.
Payments complete, we're all done here - thanks everyone!
Reacted by Abdelhafidh BelaliaReacted by Roji Philip
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.4.30-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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Precondition:
Login the same user to different devices
Expected Result:
Full task name should be present on workspace chat on LHN
Actual Result:
Instead of full name - "Task for" is present on LHN. When user open the chat and navigate to LHN - full task name can be seen
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6352511_1706041482878.Recording__1888.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit