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

Fix Changed date appears for a second in LHN #30223

Merged
merged 3 commits into from
Oct 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3152,6 +3152,7 @@ function shouldReportBeInOptionList(report, currentReportId, isInGSDMode, betas,
!report ||
!report.reportID ||
!report.type ||
report.reportName === undefined ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you found case of reportName being set to null or empty string but need to be in options list?

Suggested change
report.reportName === undefined ||
!report.reportName

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@situchan done

Copy link
Contributor Author

@tsa321 tsa321 Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@situchan the test is failing if we use !report.reportName
The test failed to pass this report:

// This report is an archived room – it does not have a name and instead falls back on oldPolicyName
10: {
lastReadTime: '2021-01-14 11:25:39.200',
lastVisibleActionCreated: '2022-11-22 03:26:02.001',
reportID: 10,
isPinned: false,
participantAccountIDs: [2, 7],
reportName: '',
oldPolicyName: "SHIELD's workspace",
chatType: CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT,
isOwnPolicyExpenseChat: true,
type: CONST.REPORT.TYPE.CHAT,
// This indicates that the report is archived
stateNum: 2,
statusNum: 2,
},

because the reportName is empty string.


I am following the certain check condition inside handleReportChanged which is reportName === undefined, in here:

if (report.reportID && report.reportName === undefined) {
reconnect(report.reportID);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok let's revert to undefined then

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@situchan done

report.isHidden ||
(report.participantAccountIDs &&
report.participantAccountIDs.length === 0 &&
Expand Down
Loading