Skip to content

[Due for payment 2025-03-21] [$250] Onboarding - Onboarding task report has "Room description" field which opens not here page #56652

Closed

Description

@IuliiaHerets

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.96-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): hdsdsmisdisisi@gmail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.0 / Chrome
App Component: Other

Action Performed:

  1. Go to staging.new.expensify.com
  2. Sign up with a new Gmail account (random email without +)
  3. On onboarding purpose, choose Manage my team's expenses
  4. Select organization size
  5. Select an accounting
  6. Complete the onboarding
  7. Go to #admins room.
  8. Click on any task.
  9. Click task report header.
  10. Click Room description.

Expected Result:

There should be no "Room description" field because this is a task report.

Actual Result:

Onboarding task report has "Room description" field which opens not here page.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6739255_1739257542865.20250211_145955.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021889479505886750975
  • Upwork Job ID: 1889479505886750975
  • Last Price Increase: 2025-02-26
  • Automatic offers:
    • ikevin127 | Reviewer | 106364514
    • etCoderDysto | Contributor | 106364515
Issue OwnerCurrent Issue Owner: @jliexpensify

Activity

  1. added
    Bug
    Daily
    on Feb 11, 2025
  2. melvin-bot commented on Feb 11, 2025

    @melvin-bot

    Triggered auto assignment to @michaelkwardrop (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.

  3. etCoderDysto commented on Feb 11, 2025

    @etCoderDysto
    Contributor

    Proposal

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

    Onboarding task report has "Room description" field which opens not here page

    What is the root cause of that problem?

    We are displaying description if shouldShowReportDescription is true. shouldShowReportDescription doesn't check if the user can edit a task and it is true if the user can't edit a task.

    const shouldShowReportDescription = isChatRoom && (canEditReportDescription || report.description !== '');

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

    We shouldn't show description if the user can't edit a task

    const canModifyTask = canModifyTaskAction(report, session?.accountID ?? CONST.DEFAULT_NUMBER_ID);
    const shouldShowReportDescription = isChatRoom && (canEditReportDescription || report.description !== '') && canModifyTask;
    

    We can alternatively use !isTaskReport instead of canModifyTask

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    UI issue

    What alternative solutions did you explore? (Optional)

  4. Krishna2323 commented on Feb 11, 2025

    @Krishna2323
    Contributor

    Proposal

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

    Onboarding - Onboarding task report has "Room description" field which opens not here page

    What is the root cause of that problem?

    • canEditReportDescription util function does not include the check for task report and canModifyTask.

      App/src/libs/ReportUtils.ts

      Lines 8231 to 8241 in 48520ec

      function canEditReportDescription(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>): boolean {
      return (
      !isMoneyRequestReport(report) &&
      !isArchivedReport(getReportNameValuePairs(report?.reportID)) &&
      isChatRoom(report) &&
      !isChatThread(report) &&
      !isEmpty(policy) &&
      hasParticipantInArray(report, currentUserAccountID ? [currentUserAccountID] : []) &&
      !isAuditor(report)
      );
      }

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

    • We should update canEditReportDescription util function to also include the check for task report and canModifyTask.
    function canEditReportDescription(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>): boolean {
        return (
            !isMoneyRequestReport(report) &&
            !isArchivedReport(getReportNameValuePairs(report?.reportID)) &&
            isChatRoom(report) &&
            !isChatThread(report) &&
            !isEmpty(policy) &&
            hasParticipantInArray(report, currentUserAccountID ? [currentUserAccountID] : []) &&
            !isAuditor(report) &&
            (!isTaskReport(report) || canModifyTask(report, currentUserAccountID, report?.ownerAccountID))
        );
    }
    • And in ReportDetailsPage, we need to add shouldShowRightIcon={canEditReportDescription} & interactive={canEditReportDescription} to the description field.

    • OTIONAL: If we want, we can hide the description field using the canEditReportDescription value.

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    NA

    What alternative solutions did you explore? (Optional)

  5. mkzie2 commented on Feb 11, 2025

    @mkzie2
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-02-11 10:07:11 UTC.

    Proposal

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

    Onboarding task report has "Room description" field which opens not here page.

    What is the root cause of that problem?

    The task report in the admin room is also a chat room which causes shouldShowReportDescription to be true and the description appears in the report detail page

    const shouldShowReportDescription = isChatRoom && (canEditReportDescription || report.description !== '');

    While in TaskDescriptionPage, we display the not found page if the task cannot be edited

    <FullPageNotFoundView shouldShow={isTaskNonEditable}>

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

    We can hide the description on the detail page if the report is a child report. We can use !isThread or !isTaskReport.

    const shouldShowReportDescription = isChatRoom && !isThread && (canEditReportDescription || report.description !== '');
    

    const shouldShowReportDescription = isChatRoom && (canEditReportDescription || report.description !== '');

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    To prevent this issue can happening again the further, we can move the logic to show the report description to a util function and create some test cases for this and assert it returns false for task report or other reports that isn't chat room.

    What alternative solutions did you explore? (Optional)

  6. added
    External
    on Feb 12, 2025
  7. changed the title [-]Onboarding - Onboarding task report has "Room description" field which opens not here page[/-] [+][$250] Onboarding - Onboarding task report has "Room description" field which opens not here page[/+] on Feb 12, 2025
  8. melvin-bot commented on Feb 12, 2025

    @melvin-bot
  9. added
    Help Wanted
    on Feb 12, 2025
  10. melvin-bot commented on Feb 12, 2025

    @melvin-bot

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

  11. ikevin127 commented on Feb 12, 2025

    @ikevin127
    Contributor

    Expected result:

    There should be no "Room description" field because this is a task report.

    Given the Expected result, let's go with @etCoderDysto's proposal as they were first to identify the root cause of why the "Room description" field is showing in our issue's case, and propose a solution that fixes the issue in accordance with the Expected result, at no additional lines of code since the canModifyTask check already exists in ReportDetailsPage, the solution will simply move the check above the shouldShowReportDescription check, then add it to the existing condition.

    Note

    PR Notes
    Make sure to add a second test in PR description verifying that the "Room description" field still appears and can be edited if created by the author himself.

    🎀👀🎀 C+ reviewed

  12. 51 remaining items

  13. added
    Weekly
    Awaiting Payment
    and removed
    Weekly
    on Mar 14, 2025
  14. changed the title [-][$250] Onboarding - Onboarding task report has "Room description" field which opens not here page[/-] [+][Due for payment 2025-03-21] [$250] Onboarding - Onboarding task report has "Room description" field which opens not here page[/+] on Mar 14, 2025
  15. melvin-bot commented on Mar 14, 2025

    @melvin-bot

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

  16. removed
    Reviewing
    on Mar 14, 2025
  17. melvin-bot commented on Mar 14, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.12-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 2025-03-21. 🎊

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

  18. melvin-bot commented on Mar 14, 2025

    @melvin-bot

    @ikevin127 @jliexpensify @ikevin127 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  19. ikevin127 commented on Mar 15, 2025

    @ikevin127
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: https://github.com/Expensify/App/pull/35153/files#r1996459773.

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Test 1 - (main issue test)

    1. Go to staging.new.expensify.com.
    2. Sign up with a new Gmail account (random email without +).
    3. On onboarding purpose, choose Manage my team's expenses.
    4. Select organization size.
    5. Select an accounting.
    6. Complete the onboarding.
    7. Go to #admins room.
    8. Click on any task.
    9. Click task report header.
    10. Verify that there is no Room description field in the RHP.

    Test 2 - (secondary test to verify that Room description still shows in other cases)

    1. Create a room.
    2. Open the room.
    3. Click on the report header.
    4. Verify that you can see the Room Description field on the details page (RHP).

    Test 3 - (secondary test to verify that Room description still shows in other cases)

    1. Create a room.
    2. In the room create a task with description and no assignee.
    3. Click on the task.
    4. Click task report header.
    5. Verify that you can see the Room description field on the details page (RHP).

    Do we agree 👍 or 👎.

  20. jliexpensify commented on Mar 17, 2025

    @jliexpensify
    Contributor

    Payment Summary

    Upwork job

  21. added
    Daily
    and removed
    Weekly
    on Mar 20, 2025
  22. jliexpensify commented on Mar 21, 2025

    @jliexpensify
    Contributor

    Paid and job closed!

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions