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

[Hold for payment: 2024-09-24] [$250] Task - Unable to remove task description #46111

Closed
6 tasks done
lanitochka17 opened this issue Jul 24, 2024 · 44 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 24, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.11-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4760280
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to DM
  3. Create a task with description
  4. Go to task report
  5. Click Description
  6. Remove the description and save it

Expected Result:

User will be able to remove the task description

Actual Result:

User is unable to remove the task description

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6551397_1721815786409.20240724_180756.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01059741d391e013aa
  • Upwork Job ID: 1823259419206003933
  • Last Price Increase: 2024-08-27
  • Automatic offers:
    • allgandalf | Reviewer | 103704842
    • FitseTLT | Contributor | 103704845
Issue OwnerCurrent Issue Owner: @allgandalf
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 24, 2024
Copy link

melvin-bot bot commented Jul 24, 2024

Triggered auto assignment to @dylanexpensify (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
Copy link
Author

@dylanexpensify 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
Copy link
Author

We think that this bug might be related to #vip-vsp

@FitseTLT
Copy link
Contributor

FitseTLT commented Jul 24, 2024

Proposal

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

Task - Unable to remove task description

What is the root cause of that problem?

Empty string will be falsy here

const newDescription = description ? ReportUtils.getParsedComment(description) : report.description;
const reportDescription = (newDescription ?? '').trim();

so it will set it to the previous description

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

change it to

    const newDescription = typeof description === 'string' ? ReportUtils.getParsedComment(description) : report.description;

What alternative solutions did you explore? (Optional)

@etCoderDysto
Copy link
Contributor

Proposal

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

Unable to remove task description

What is the root cause of that problem?

When description is empty string we are assigning the old description value (report.description) to newDescription. This will prevent new description from being assigned undefined when user edits task title that has an existing description, and remove existing description in the process. This is because description is undefined when user edits task title. But when the user removes existing description, the old description value (report.description) is assigned to newDescription since empty string is regarded as false when we use ? instead of ??.

const newDescription = description ? ReportUtils.getParsedComment(description) : report.description;

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

We should assign description to newDescription when description is an empty string and assign report.description when description is undefined

    const newDescription = description ? ReportUtils.getParsedComment(description) : description ?? report.description;

What alternative solutions did you explore? (Optional)

@dylanexpensify
Copy link
Contributor

dylanexpensify commented Jul 24, 2024 via email

@melvin-bot melvin-bot bot added the Overdue label Jul 26, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

@dylanexpensify Eep! 4 days overdue now. Issues have feelings too...

Copy link

melvin-bot bot commented Jul 31, 2024

@dylanexpensify Still overdue 6 days?! Let's take care of this!

Copy link

melvin-bot bot commented Aug 2, 2024

@dylanexpensify 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

@dylanexpensify
Copy link
Contributor

reviewing today!

@melvin-bot melvin-bot bot removed the Overdue label Aug 5, 2024
@dylanexpensify
Copy link
Contributor

Confirming behavior

Copy link

melvin-bot bot commented Aug 7, 2024

@dylanexpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Aug 9, 2024
Copy link

melvin-bot bot commented Aug 12, 2024

@dylanexpensify Eep! 4 days overdue now. Issues have feelings too...

@dylanexpensify dylanexpensify added the External Added to denote the issue can be worked on by a contributor label Aug 13, 2024
@melvin-bot melvin-bot bot changed the title Task - Unable to remove task description [$250] Task - Unable to remove task description Aug 13, 2024
Copy link

melvin-bot bot commented Aug 13, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01059741d391e013aa

@dylanexpensify
Copy link
Contributor

Forgot to hit external!

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 13, 2024
Copy link

melvin-bot bot commented Aug 13, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Aug 13, 2024
@eucool
Copy link
Contributor

eucool commented Aug 14, 2024

Proposal

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

Unable to save empty description.

What is the root cause of that problem?



When we save empty string, we essentially havedescription as false and hence we fallback to the previous description:




const newDescription = description ? ReportUtils.getParsedComment(description) : report.description;






That is why the description is not updated if we save a empty string

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

We do not need the check in place, we can directly set the newDescription to ReportUtils.getParsedComment(description):

 const newDescription = ReportUtils.getParsedComment(description);

This is because we already validate if the prop passed is string when we call the util functions:

if (values.description !== Parser.htmlToMarkdown(report?.description ?? '') && !isEmptyObject(report)) {
// Set the description of the report in the store and then call EditTask API
// to update the description of the report on the server
Task.editTask(report, {description: values.description});

What alternative solutions did you explore? (Optional)

@allgandalf
Copy link
Contributor

Thanks for proposals everyone 🙏 , all you guys have the correct RCA!

Coming to solution:

@etCoderDysto I feel your solution is a little over-engineering and not a correct way to approach.

@FitseTLT , though your solution would solve this but the description would always be of string type and that check is not needed as we only call editTask for editing description when we have one (some value / empty string).

With that said, lets go with @eucool 's proposal here, their solution seems more appropriate for this bug

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Aug 20, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Aug 20, 2024
Copy link

melvin-bot bot commented Aug 20, 2024

@deetergp, @dylanexpensify, @allgandalf Eep! 4 days overdue now. Issues have feelings too...

@deetergp
Copy link
Contributor

Any updates @allgandalf?

@allgandalf
Copy link
Contributor

sorry for the delay, We can go with @FitseTLT 's proposal here, I didn't consider the case where we edit title, honest mistake on my part, sorry @deetergp @FitseTLT @etCoderDysto 🙇

If we edit the description then the type of description will be a string and if we edit title then description will be undefined:

Screenshot 2024-08-21 at 6 04 30 PM

So @FitseTLT 's solution will be better suited for this bug

🎀👀🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Aug 21, 2024
Copy link

melvin-bot bot commented Aug 21, 2024

Current assignee @deetergp is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@etCoderDysto
Copy link
Contributor

etCoderDysto commented Aug 21, 2024

@allgandalf @FitseTLT's last edit and my proposal came at the same time (4:39). And my propsal has details of how description field becomes undefined when editing title. This is to ask if having a clear, and detailed RCA would make my proposal a better choice.

cc: @deetergp
Thanks!

Copy link

melvin-bot bot commented Aug 21, 2024

@deetergp @dylanexpensify @allgandalf this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@allgandalf
Copy link
Contributor

bump on assignment @deetergp , summary here, thanks !

@etCoderDysto
Copy link
Contributor

@allgandalf can you please comment on my question here.

Thanks!

Copy link

melvin-bot bot commented Aug 27, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 27, 2024
Copy link

melvin-bot bot commented Aug 27, 2024

📣 @allgandalf 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Aug 27, 2024

📣 @FitseTLT 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Aug 28, 2024
@dylanexpensify
Copy link
Contributor

@allgandalf @FitseTLT mind giving an update

@allgandalf
Copy link
Contributor

allgandalf commented Sep 10, 2024

Automation failed here, the PR was deployed to production yesterday with the checklist: #48664

@dylanexpensify
Copy link
Contributor

TY!

@dylanexpensify dylanexpensify changed the title [$250] Task - Unable to remove task description [Hold for payment: 2024-09-24] [$250] Task - Unable to remove task description Sep 18, 2024
@dylanexpensify
Copy link
Contributor

Nice will pay today!

@allgandalf
Copy link
Contributor

can you pay this one please @dylanexpensify

@FitseTLT
Copy link
Contributor

FitseTLT commented Oct 3, 2024

@dylanexpensify payment Ooooverdue here

@dylanexpensify
Copy link
Contributor

Payment summary:

Contributor: @FitseTLT $250 via Upwork
Contributor+: @allgandalf $250 via Upwork

Please apply/request!

@dylanexpensify
Copy link
Contributor

Paid!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants