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-08-07] [$250] Desktop - Task - Error occurs when update long content for task description for second time #42660
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
@bfitzexpensify 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
Please re-state the problem that we are trying to solve in this issue.
Task - Error occurs when update long content for task description for second time
What is the root cause of that problem?
We don't remove the optimistic message if an error occurs, this interfers with get older report action calls since the current report action does not exist in server.
What changes do you think we should make in order to solve the problem?
We should update failureData here to set the optimistic message's reportActionID to null
changed the title [-]Desktop - Task - Error occurs when update long content for task description for second time[/-][+][$250] Desktop - Task - Error occurs when update long content for task description for second time[/+]on May 27, 2024
Please re-state the problem that we are trying to solve in this issue.
Edited Task - Error occurs when description content exceed the 500 characters after parsed as html.
What is the root cause of that problem?
This error occurs when description content exceed the 500 characters after parsed as html in getParsedComment(), when we parse the description to HTML format using getParsedComment(). This happens because we validate the limit of 500 characters when it is single text strings, but we send it to the server after parsed, we notice the error when we are near the limit of 500 and the getParsedComment() returns converted the lines breaks to <br />, because this increase the text 5 characters for every line break.
Technical explanation
In other words we validate the text has a max length of 500 characters, ie, the next text has 493 characters:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent placerat consectetur enim sit amet sodales. Etiam elementum, lorem id sollicitudin dignissim, quam nibh sodales arcu, imperdiet consequat risus mi sit amet lorem. Donec iaculis at tortor eget vulputate. Duis dignissim non diam id mattis. Suspendisse sit amet consequat elit, feugiat mattis libero. In hendrerit dui ac ante hendrerit condimentum nec
ddddDonec tellus odio, tristique non hendrerit quis, scelerisque placerat odio.
But this is converted to (505 characters):
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent placerat consectetur enim sit amet sodales. Etiam elementum, lorem id sollicitudin dignissim, quam nibh sodales arcu, imperdiet consequat risus mi sit amet lorem. Donec iaculis at tortor eget vulputate. Duis dignissim non diam id mattis. Suspendisse sit amet consequat elit, feugiat mattis libero. In hendrerit dui ac ante hendrerit condimentum nec
ddddDonec tellus odio, tristique non hendrerit quis, scelerisque placerat odio.
What changes do you think we should make in order to solve the problem?
We can validate the parsed description max length instead of the plain text here:
The PR that introduced the bug has been identified. Link to the PR:
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:
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:
Not a regression IMO
Determine if we should create a regression test for this bug.
Yes.
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.
Start group chat with another user
Create a task for this user without a description
Update description with long content + emoji
Observe the error message of the app show
Update this content to description one more time
@adelekennedy I haven't received payment for this. And I am getting paid in newDot. Thank you.
@adelekennedy I closed the contract before because I am getting paid via newDot now 😅 as called out.
And to answer question, only after my previous comment, it was remitted.
If possible kindly request a refund, so that I can get paid via newDot.
@abdulrahuman5196 , can you please cancel your NewDot payment request! I've paid you via Upwork. You were assigned to this issue before your eligibility date. Thx
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon May 27, 2024
Triggered auto assignment to @bfitzexpensify (
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 May 27, 2024
@bfitzexpensify 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
lanitochka17 commentedon May 27, 2024
We think that this bug might be related to #vip-vsp
neonbhai commentedon May 27, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Task - Error occurs when update long content for task description for second time
What is the root cause of that problem?
We don't remove the optimistic message if an error occurs, this interfers with get older report action calls since the current report action does not exist in server.
What changes do you think we should make in order to solve the problem?
We should update
failureDatahere to set the optimistic message's reportActionID tonullApp/src/libs/actions/Task.ts
Line 489 in c22945a
Result
Before
Screen.Recording.2024-05-28.at.2.02.36.AM.mov
After
Screen.Recording.2024-05-28.at.1.44.43.AM.mov
[-]Desktop - Task - Error occurs when update long content for task description for second time[/-][+][$250] Desktop - Task - Error occurs when update long content for task description for second time[/+]melvin-bot commentedon May 27, 2024
Job added to Upwork: https://www.upwork.com/jobs/~011028270f108dc08b
melvin-bot commentedon May 27, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (
External)samilabud commentedon May 27, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Edited Task - Error occurs when description content exceed the 500 characters after parsed as html.
What is the root cause of that problem?
This error occurs when description content exceed the 500 characters after parsed as html in getParsedComment(), when we parse the description to HTML format using
getParsedComment(). This happens because we validate the limit of 500 characters when it is single text strings, but we send it to the server after parsed, we notice the error when we are near the limit of 500 and thegetParsedComment()returns converted the lines breaks to<br />, because this increase the text 5 characters for every line break.Technical explanation
In other words we validate the text has a max length of 500 characters, ie, the next text has 493 characters:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent placerat consectetur enim sit amet sodales. Etiam elementum, lorem id sollicitudin dignissim, quam nibh sodales arcu, imperdiet consequat risus mi sit amet lorem. Donec iaculis at tortor eget vulputate. Duis dignissim non diam id mattis. Suspendisse sit amet consequat elit, feugiat mattis libero. In hendrerit dui ac ante hendrerit condimentum nec
ddddDonec tellus odio, tristique non hendrerit quis, scelerisque placerat odio.
But this is converted to (505 characters):
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent placerat consectetur enim sit amet sodales. Etiam elementum, lorem id sollicitudin dignissim, quam nibh sodales arcu, imperdiet consequat risus mi sit amet lorem. Donec iaculis at tortor eget vulputate. Duis dignissim non diam id mattis. Suspendisse sit amet consequat elit, feugiat mattis libero. In hendrerit dui ac ante hendrerit condimentum nec
ddddDonec tellus odio, tristique non hendrerit quis, scelerisque placerat odio.
What changes do you think we should make in order to solve the problem?
We can validate the parsed description max length instead of the plain text here:
App/src/pages/tasks/TaskDescriptionPage.tsx
Lines 41 to 43 in 63a20f4
Like:
Test:
Max.lenght.parsed.description.mp4
What alternative solutions did you explore?
We can remove the ReportUtils.getParsedComment(description) and let the description as a plain text.
57 remaining items
abdulrahuman5196 commentedon Aug 8, 2024
Not a regression IMO
Yes.
@adelekennedy I haven't received payment for this. And I am getting paid in newDot. Thank you.
adelekennedy commentedon Aug 8, 2024
@abdulrahuman5196 that's my bad - I see that you ended the contract vs us closing and paying out
Contributor: @abdulrahuman5196 paid $250 via Upwork ( Matt A did on 8/30 as a bonus payment)
adelekennedy commentedon Aug 8, 2024
https://github.com/Expensify/Expensify/issues/418967
abdulrahuman5196 commentedon Aug 29, 2024
Payment is still pending on this issue.
adelekennedy commentedon Aug 30, 2024
abdulrahuman5196 commentedon Aug 30, 2024
@adelekennedy I closed the contract before because I am getting paid via newDot now 😅 as called out.
And to answer question, only after my previous comment, it was remitted.
If possible kindly request a refund, so that I can get paid via newDot.
adelekennedy commentedon Aug 30, 2024
🤦♀️
Payouts due:
mallenexpensify commentedon Aug 30, 2024
@abdulrahuman5196 , can you please cancel your NewDot payment request! I've paid you via Upwork. You were assigned to this issue before your eligibility date. Thx
abdulrahuman5196 commentedon Aug 31, 2024
Deleted the newDot expense. Thank you for payment.
abdulrahuman5196 commentedon Sep 2, 2024
hi not overdue, We can close this issue @adelekennedy