Open lanitochka17 opened 1 week ago
Triggered auto assignment to @kadiealexander (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.
@kadiealexander 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
The room description is currently displayed as an object, rather than plain text.
This issue occurs because the room description is being handled as a JSON object, but we are not properly parsing it or accessing the html property inside the objec
To resolve the issue, we need to parse the JSON object and extract the html property before processing the description
as:
return report?.description ? Parser.htmlToText(JSON.parse(report.description)?.html || '') : '';
and also in the welcome text section In the :
https://github.com/Expensify/App/blob/2c00cc58e713f0b8bb253d95e48b40503e7c1ddc/src/libs/SidebarUtils.ts#L571
HTML text is shown in Room Description
This problem is caused by a change in the backend data type, specifically at the AddComment
API. Other APIs are not affected. Previously, the response for report?.description was {description: "welcome text"}, but after the update, it responds with {description: "{\"html\":\"welcome text\"}"}. As a result, this issue occurs.
To fix this issue, we have two options. The first option is to update the backend so that the AddComment
API returns the description in the old format. The second option is to update the report description after calling the AddComment
API and use the description from Onyx. The code changes would be as follows:
//.src/libs/actions/Report.ts#L548
const successData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`,
value: successReportActions,
},
+ {
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
+ value: {
+ description: report?.description,
+ },
+ },
+ ];
Job added to Upwork: https://www.upwork.com/jobs/~021847054312559267621
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ZhenjaHorbach (External
)
@kadiealexander, @ZhenjaHorbach Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Dupe #49355
Hmmmm Yeah Looks like these issues are similar
@kadiealexander Let's add HOLD and retest when this PR will be merged
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
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.50-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No 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): applausetester+en@applause.expensifail.com Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
User expects the description to be unaffected
Actual Result:
HTML text is displayed after sending a message (OR leaving and joining the room via message)
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/02ff0704-533d-4b82-9eca-0485cdb5ac40
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @ZhenjaHorbach