Skip to content

[$500] chat thread report header is incorrectly showing the "root" report in second line rather than the "parent" report.  #27986

Description

@JmillsExpensify

Reproduction steps

  1. Comment in a parent report (e.g. root report)
  2. Create a thread on your comment in the parent/root (e.g. thread1)
Screenshot 2023-09-22 at 14 09 58 3. Confirm that in the header for thread1 shows the name of the parent/root report. Screenshot 2023-09-22 at 14 10 29 4. Now create another thread on your comment in thread1 (e.g. thread2) Screenshot 2023-09-22 at 14 14 24 5. Notice that the header of thread2 incorrectly shows the root report in the second line of the header, which is incorrect. The second line should instead show thread1, which is the parent of thread2.
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014565dfd91b80271a
  • Upwork Job ID: 1706507483408605184
  • Last Price Increase: 2023-10-17

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 22, 2023
  2. melvin-bot commented on Sep 22, 2023

    @melvin-bot

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

  3. melvin-bot commented on Sep 22, 2023

    @melvin-bot

    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
  4. JmillsExpensify commented on Sep 22, 2023

    @JmillsExpensify
    ContributorAuthor

    Originally reported internally in Slack.

  5. dukenv0307 commented on Sep 22, 2023

    @dukenv0307
    Contributor

    Proposal

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

    chat thread report header is incorrectly showing the "root" report in second line rather than the "parent" report.

    What is the root cause of that problem?

    In getRootReportAndWorkspaceName function, we have an infinity loop here to get the root parent report name of the thread report

    App/src/libs/ReportUtils.js

    Lines 1743 to 1746 in 8e2edbf

    if (isChildReport(report) && !isMoneyRequestReport(report) && !isTaskReport(report)) {
    const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]);
    return getRootReportAndWorkspaceName(parentReport);
    }

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

    We should remove this infinity loop to get the name of the previous parent report of the thread.

    App/src/libs/ReportUtils.js

    Lines 1743 to 1746 in 8e2edbf

    if (isChildReport(report) && !isMoneyRequestReport(report) && !isTaskReport(report)) {
    const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]);
    return getRootReportAndWorkspaceName(parentReport);
    }

    What alternative solutions did you explore? (Optional)

  6. melvin-bot commented on Sep 25, 2023

    @melvin-bot

    @kevinksullivan Whoops! This issue is 2 days overdue. Let's get this updated quick!

  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 26, 2023
  8. changed the title [-]`chat` thread report header is incorrectly showing the "root" report in second line rather than the "parent" report. [/-] [+][$500] `chat` thread report header is incorrectly showing the "root" report in second line rather than the "parent" report. [/+] on Sep 26, 2023
  9. melvin-bot commented on Sep 26, 2023

    @melvin-bot
  10. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 26, 2023
  11. melvin-bot commented on Sep 26, 2023

    @melvin-bot

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

  12. 22 remaining items

  13. added
    InternalRequires API changes or must be handled by Expensify staff
    and removed
    ExternalAdded to denote the issue can be worked on by a contributor
    Help WantedApply this label when an issue is open to proposals by contributors
    on Oct 20, 2023
  14. melvin-bot commented on Oct 20, 2023

    @melvin-bot

    Current assignee @parasharrajat is eligible for the Internal assigner, not assigning anyone new.

  15. parasharrajat commented on Oct 21, 2023

    @parasharrajat
    Member
  16. melvin-bot commented on Oct 24, 2023

    @melvin-bot

    @kevinksullivan, @parasharrajat Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  17. parasharrajat commented on Oct 24, 2023

    @parasharrajat
    Member
  18. kevinksullivan commented on Oct 27, 2023

    @kevinksullivan
    Contributor

    Agree with @chiragsalian here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringInternalRequires API changes or must be handled by Expensify staff

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions