You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-07-10] [$250] Chat - System message about adding tag in Parent: Child format shows Parent\: Child #43465
Version Number: 1.4.81-4 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team
@sakluger 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
FYI @lanitochka17 - GitHub was removing the \ from your comment because it's a Markdown formatting character in GH - it's an escape character used to ignore other markdown formatting (more details here).
I updated your comment to add that character back. 😄
changed the title [-]Chat - System message about adding tag in Parent: Child format shows Parent\: Child[/-][+][$250] Chat - System message about adding tag in Parent: Child format shows Parent\: Child[/+]on Jun 11, 2024
Please re-state the problem that we are trying to solve in this issue.
System message about adding tag in Parent: Child format shows Parent: Child
What is the root cause of that problem?
When displaying messages inside ReportActionItemFragment and TextCommentFragment, we do not clean the tag message escaping of colons (used to create multi-level tags, e.g., "Parent: Child") in the tag name received from the backend.
What changes do you think we should make in order to solve the problem?
We need to clean up the message from the colons before displaying it. This can be done at multiple levels before being displayed. One way is by editing the fragment inside ReportActionItemFragment.
We can use if (actionName === 'POLICYCHANGELOG_ADD_TAG') to check if it's a tag message. If so, we can use the utility PolicyUtils.getCleanedTagName to return a clean tag message.
if(actionName==='POLICYCHANGELOG_ADD_TAG'){tagFragment=PolicyUtils.getCleanedTagName(fragment.html);// we can use fragment.text too}
If we have a new value, we can display it and pass it to the component TextCommentFragment.
Please re-state the problem that we are trying to solve in this issue.
System message about adding tag in Parent: Child format shows Parent: Child
What is the root cause of that problem?
With the system message about adding tag, BE returns a message like:
{
"actionName": "POLICYCHANGELOG_ADD_TAG",
"message": [
{
"html": "added the tag \"name\\: age\" to the list \"Tag\"",
"text": "added the tag \"name\\: age\" to the list \"Tag\""
}
]
}
And we display this message by using ReportActionItemMessage:
changed the title [-][$250] Chat - System message about adding tag in Parent: Child format shows Parent\: Child[/-][+][HOLD for payment 2024-07-10] [$250] Chat - System message about adding tag in Parent: Child format shows Parent\: Child[/+]on Jul 3, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
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:
[@eh2077] The PR that introduced the bug has been identified. Link to the PR:
[@eh2077] 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:
[@eh2077] 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:
[@eh2077] Determine if we should create a regression test for this bug.
[@eh2077] 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.
[@sakluger] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
[@eh2077] The PR that introduced the bug has been identified. Link to the PR: There's not such PR that causes this bug because the system message is from backend.
[@eh2077] 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: N/A
[@eh2077] 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: N/A
[@eh2077] Determine if we should create a regression test for this bug. No
Activity
melvin-bot commentedon Jun 11, 2024
Triggered auto assignment to @sakluger (
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.lanitochka17 commentedon Jun 11, 2024
@sakluger 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
sakluger commentedon Jun 11, 2024
FYI @lanitochka17 - GitHub was removing the
\from your comment because it's a Markdown formatting character in GH - it's an escape character used to ignore other markdown formatting (more details here).I updated your comment to add that character back. 😄
[-]Chat - System message about adding tag in Parent: Child format shows Parent\: Child[/-][+][$250] Chat - System message about adding tag in Parent: Child format shows Parent\: Child[/+]melvin-bot commentedon Jun 11, 2024
Job added to Upwork: https://www.upwork.com/jobs/~014a67ec2b09731f24
melvin-bot commentedon Jun 11, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eh2077 (
External)devguest07 commentedon Jun 11, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
System message about adding tag in Parent: Child format shows Parent: Child
What is the root cause of that problem?
When displaying messages inside
ReportActionItemFragmentandTextCommentFragment, we do not clean the tag message escaping of colons (used to create multi-level tags, e.g., "Parent: Child") in the tag name received from the backend.What changes do you think we should make in order to solve the problem?
We need to clean up the message from the colons before displaying it. This can be done at multiple levels before being displayed. One way is by editing the fragment inside
ReportActionItemFragment.App/src/pages/home/report/ReportActionItemFragment.tsx
Lines 77 to 78 in 4acd9d2
We can use
if (actionName === 'POLICYCHANGELOG_ADD_TAG')to check if it's a tag message. If so, we can use the utilityPolicyUtils.getCleanedTagNameto return a clean tag message.If we have a new value, we can display it and pass it to the component
TextCommentFragment.truph01 commentedon Jun 12, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
ReportActionItemMessage:App/src/pages/home/report/ReportActionItem.tsx
Line 647 in 8d11d0b
that will display a message base on raw
reportAction.messagedata.What changes do you think we should make in order to solve the problem?
App/src/pages/home/report/ReportActionItem.tsx
Line 638 in 8d11d0b
App/src/libs/SidebarUtils.ts
Line 378 in 8d11d0b
to fix the LHN issue.
What alternative solutions did you explore? (Optional)
29 remaining items
[-][$250] Chat - System message about adding tag in Parent: Child format shows Parent\: Child[/-][+][HOLD for payment 2024-07-10] [$250] Chat - System message about adding tag in Parent: Child format shows Parent\: Child[/+]melvin-bot commentedon Jul 3, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-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 2024-07-10. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jul 3, 2024
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:
sakluger commentedon Jul 8, 2024
I sent an offer to @truph01 via Upwork: https://www.upwork.com/nx/wm/offer/103034403.
@eh2077 can you please complete the BZ checklist?
truph01 commentedon Jul 9, 2024
@sakluger I accepted that offer, TY
sakluger commentedon Jul 10, 2024
Thanks, all paid!
@eh2077 we're just holding for the BZ checklist before we can close this issue.
sakluger commentedon Jul 11, 2024
Bump @eh2077
eh2077 commentedon Jul 13, 2024
Checklist
cc @sakluger