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 2023-06-19] [$1000] welcome message value not trimmed after click save. #20013

Closed
6 tasks done
kavimuru opened this issue Jun 1, 2023 · 45 comments
Closed
6 tasks done
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Jun 1, 2023

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


Action Performed:

  1. Create new room.
  2. Open room details.
  3. Open setting then welcome message
  4. Type welcome message start with new line or whitespaces.

Expected Result:

Welcome message should trimmed after click save.

Actual Result:

Welcome message not trimmed after click save.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.22-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-05-30.at.11.51.24.PM.mov
Recording.843.mp4

Expensify/Expensify Issue URL:
Issue reported by: @ahmedGaber93
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1685483613790139

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ab72ee2de7dd767d
  • Upwork Job ID: 1664655083435290624
  • Last Price Increase: 2023-06-02
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

Triggered auto assignment to @lschurr (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@kavimuru
Copy link
Author

kavimuru commented Jun 1, 2023

Proposal

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

Welcome message value not trimmed after click save.

What is the root cause of that problem?

There is no trim for welcomeMessage here before saving

const submitForm = useCallback(() => {
Report.updateWelcomeMessage(props.report.reportID, props.report.welcomeMessage, welcomeMessage);
}, [props.report.reportID, props.report.welcomeMessage, welcomeMessage]);

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

We need to Trim welcomeMessage value before saving

 const submitForm = useCallback(() => {
     Report.updateWelcomeMessage(props.report.reportID, props.report.welcomeMessage, welcomeMessage.trim());
 }, [props.report.reportID, props.report.welcomeMessage, welcomeMessage]);

What alternative solutions did you explore? (Optional)

@sethraj14
Copy link

@kavimuru @lschurr Already proposed this fix here. Should I post the proposal here too?

@ahmedGaber93
Copy link
Contributor

ahmedGaber93 commented Jun 1, 2023

Proposal

my proposal

@SoftEverest
Copy link

How to solve that issue?

We should remove the space from the welcome message string before saving it.
To do that, we can use Trim() function.

@melvin-bot
Copy link

melvin-bot bot commented Jun 2, 2023

📣 @SoftEverest! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@SoftEverest
Copy link

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~011e6669bf3894ee15

@melvin-bot
Copy link

melvin-bot bot commented Jun 2, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label Jun 2, 2023
@melvin-bot melvin-bot bot changed the title welcome message value not trimmed after click save. [$1000] welcome message value not trimmed after click save. Jun 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 2, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01ab72ee2de7dd767d

@melvin-bot
Copy link

melvin-bot bot commented Jun 2, 2023

Current assignee @lschurr is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 2, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 2, 2023

Triggered auto assignment to @alex-mechler (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@lschurr
Copy link
Contributor

lschurr commented Jun 2, 2023

@eVoloshchak could you review the proposals here? Is this a duplicate report?

@SoftEverest
Copy link

@lschurr could you possibly assign this issue to me? I want to contribute to Expensify app firstly with this issue.

@sethraj14
Copy link

sethraj14 commented Jun 2, 2023

@lschurr @eVoloshchak I have proposed the solution for this before the first proposal here, Please consider this and review it. I have been trying to contribute to Expensify for many days, would be great if I got the chance to this one.

@lschurr
Copy link
Contributor

lschurr commented Jun 2, 2023

@eVoloshchak @alex-mechler are you able to weigh in here?

@ahmedGaber93
Copy link
Contributor

ahmedGaber93 commented Jun 2, 2023

@lschurr @alex-mechler @eVoloshchak
I think this issue is not duplicated for two reasons.

  1. the proposal here not follow the guideline by report the issue in slack first, not report it in other GitHub issue.

  2. if we accept (NO. 1) and I think it is not acceptable, if we compare the date of reporting the issue with proposal by comment in other issue here, and the date of reporting the issue with proposal in slack here we will find slack issue with proposal is come first.

Thanks!

@sethraj14
Copy link

sethraj14 commented Jun 2, 2023

@ahmedGaber93 I don't think this should be a valid reason to not accept my proposal. I have clearly mentioned the issue and the proposal here.

I am trying to contribute first time here, @alex-mechler @eVoloshchak @lschurr can you please look into my proposal and the mentioned comment.

Also, there is no point in reporting a new issue that is just an extension of the already reported issue. This issue already incorporates inconsistency with the welcome message hence I mentioned the exact point there 3 days ago with the issue resolution proposal.

Thanks!

@reinaldosg
Copy link
Contributor

reinaldosg commented Jun 2, 2023

Proposal

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

Whitespace on welcome message is not trimmed

What is the root cause of that problem?

Welcome message isn't trimmed upon submitting to backend

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

Trimming newValue before update

function updateWelcomeMessage(reportID, previousValue, newValue) {
    newValue = newValue.trim()
    // No change needed, navigate back
    if (previousValue === newValue) {
        Navigation.goBack();
        return;
    }
    const parsedWelcomeMessage = ReportUtils.getParsedComment(newValue);

What alternative solutions did you explore? (Optional)

Since untrimmed welcome message could be already existed by now, so I also propose to trim any existing welcome message upon showing it on the page.

<TextInput
    inputID="welcomeMessage"
    label={props.translate('welcomeMessagePage.welcomeMessage')}
    multiline
    numberOfLines={10}
    maxLength={CONST.MAX_COMMENT_LENGTH}
    ref={welcomeMessageInputRef}
    value={welcomeMessage.trim()}
    onChangeText={handleWelcomeMessageChange}
    autoCapitalize="none"
/>

@melvin-bot
Copy link

melvin-bot bot commented Jun 2, 2023

Looks like something related to react-navigation may have been mentioned in this issue discussion.

As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.

Feel free to drop a note in #expensify-open-source with any questions.

@melvin-bot
Copy link

melvin-bot bot commented Jun 2, 2023

📣 @reinaldosg! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@eVoloshchak
Copy link
Contributor

@kavimuru's proposal here looks good to me!
All of the proposals are essentially the same, (since we just need to call .trim()), so I think we should proceed with the first proposal

🎀👀🎀 C+ reviewed!
cc: @alex-mechler

@alex-mechler
Copy link
Contributor

Thanks! @kavimuru was posting @ahmedGaber93's proposal from slack when they initially reported the bug, so assigning @ahmedGaber93 here!

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 6, 2023

📣 @ahmedGaber93 You have been assigned to this job by @alex-mechler!
Please apply to this job in Upwork 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 the Reviewing Has a PR in review label Jun 6, 2023
@ahmedGaber93
Copy link
Contributor

@alex-mechler @eVoloshchak PR is ready for review.

@melvin-bot
Copy link

melvin-bot bot commented Jun 8, 2023

🎯 ⚡️ Woah @eVoloshchak / @ahmedGaber93, great job pushing this forwards! ⚡️

The pull request got merged within 2 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @ahmedGaber93 got assigned: 2023-06-06 19:30:18 Z
  • when the PR got merged: 2023-06-08 16:20:53 UTC

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jun 12, 2023
@melvin-bot melvin-bot bot changed the title [$1000] welcome message value not trimmed after click save. [HOLD for payment 2023-06-19] [$1000] welcome message value not trimmed after click save. Jun 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.26-4 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 2023-06-19. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

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:

  • [@eVoloshchak] The PR that introduced the bug has been identified. Link to the PR:
  • [@eVoloshchak] 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:
  • [@eVoloshchak] 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:
  • [@eVoloshchak] Determine if we should create a regression test for this bug.
  • [@eVoloshchak] 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.
  • [@lschurr] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@lschurr
Copy link
Contributor

lschurr commented Jun 15, 2023

@eVoloshchak @ahmedGaber93 - please apply for the job in Upwork: https://www.upwork.com/jobs/~01ab72ee2de7dd767d

@lschurr
Copy link
Contributor

lschurr commented Jun 15, 2023

@eVoloshchak do we need a regression test for this one?

@eVoloshchak
Copy link
Contributor

eVoloshchak commented Jun 16, 2023

do we need a regression test for this one?

I don't think we need a regression test here. The bug isn't impactful and kind of an edge case

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 19, 2023
@lschurr
Copy link
Contributor

lschurr commented Jun 20, 2023

Offers sent in Upwork.

@ahmedGaber93
Copy link
Contributor

@lschurr I accept the offer, but we missed issue reporter bounty in the offer.

@lschurr
Copy link
Contributor

lschurr commented Jun 20, 2023

@ahmedGaber93 - it should be $1000 and then we add a $500 bonus when we pay.

@lschurr
Copy link
Contributor

lschurr commented Jun 20, 2023

I paid $1500 to both. Closing!

@lschurr lschurr closed this as completed Jun 20, 2023
@ahmedGaber93
Copy link
Contributor

@lschurr Sorry, it is my fault, but I am talking about issue reporter Bounty 250$
My offer should be $ 1750, not 1500$

@lschurr
Copy link
Contributor

lschurr commented Jun 20, 2023

Ah, gotcha! I didn't notice that you were also the reporter on this one @ahmedGaber93. I'll add that $250.

@ahmedGaber93
Copy link
Contributor

@lschurr I received it, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

9 participants