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-05-22] Workspace - invitation message defaults even when deleted #18390

Closed
1 of 6 tasks
kavimuru opened this issue May 4, 2023 · 26 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@kavimuru
Copy link

kavimuru commented May 4, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open chrome web
  2. Create a new workspace
  3. Go to invite members
  4. Select a user and in the message field, remove everything and invite an user
  5. Go to the user's email and notice that even when the message was already deleted while inviting the user, the default message is still shown on the email

Expected Result:

The default message should not be shown in the email when the message was already deleted while inviting the user

Actual Result:'

The default message is sent in the email even when the message was already deleted and was empty

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.9.16
Reproducible in staging?: y
Reproducible in production?:
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

error-2023-05-03_19.00.24.mp4
Recording.475.mp4

Expensify/Expensify Issue URL:
Issue reported by: @priya-zha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1683120050629809

View all open jobs on GitHub

@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 4, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented May 4, 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

@PrashantMangukiya
Copy link
Contributor

Proposal

Posting proposal early as per new guidelines

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

The default message is sent in the email even when the message was already deleted and was empty

What is the root cause of that problem?

When Invite button tapped it will call sendInvitation() function as shown below:

sendInvitation() {
Policy.addMembersToWorkspace(this.props.invitedMembersDraft, this.state.welcomeNote || this.getWelcomeNote(), this.props.route.params.policyID);
Policy.setWorkspaceInviteMembersDraft(this.props.route.params.policyID, []);
Navigation.navigate(ROUTES.getWorkspaceMembersRoute(this.props.route.params.policyID));
}

At line 112 we are calling Policy.addMembersToWorkspace() within that, second parameter is this.state.welcomeNote || this.getWelcomeNote() So here when this.state.welcomeNote is empty it will get default welcome note via this.getWelcomeNote() function as shown below:

getWelcomeNote() {
return this.props.translate('workspace.inviteMessage.welcomeNote', {
workspaceName: this.props.policy.name,
});
}

So although user make welcomeNote empty it will grab default welcome note from this.getWelcomeNote() function. This is the root cause of the problem.

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

To solve this we have to remove this.getWelcomeNote() from second parameter condition at line 112. i.e. We have to just pass this.state.welcomeNote as second parameter. So updated code look as shown below:

sendInvitation() { 
   Policy.addMembersToWorkspace(this.props.invitedMembersDraft, this.state.welcomeNote, this.props.route.params.policyID); 
   ...
} 

So this will solve the issue and does not send welcome note when it is empty.

What alternative solutions did you explore? (Optional)

None

@Christinadobrzyn Christinadobrzyn changed the title The default message is sent in the email even when the message was already deleted and was empty Workspace - invitation message defaults even when deleted May 4, 2023
@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented May 4, 2023

Testing this, it's required to send an invitation message:

  • if you delete the default message, it will still send the default message.
  • If you edit the message and send a custom message it will send that custom message.

image

Do we want to allow users to send an invitation without any message? Asking for more thoughts about that in the Slack thread.
https://expensify.slack.com/archives/C049HHMV9SM/p1683231084569769?thread_ts=1683120050.629809&cid=C049HHMV9SM

@Christinadobrzyn
Copy link
Contributor

hey @sobitneupane would you be able to see if this is a regression from #14568

@sobitneupane
Copy link
Contributor

sobitneupane commented May 6, 2023

No, it is not. In fact, this was the issue which removes the default message from the email if user deletes it and invitation message is empty.

This issue is a regression from #15672.

@Christinadobrzyn
Copy link
Contributor

Asking in PR about regression - #15672

@melvin-bot melvin-bot bot removed the Overdue label May 8, 2023
@abdulrahuman5196
Copy link
Contributor

Yes. Seems to be a regression. Will raise a PR to fix it.

But a curious question why wasn't this caught during regression test? Since there was a regression test in the original code test - #14568 (comment)

@abdulrahuman5196
Copy link
Contributor

PR for fix - #18601

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels May 15, 2023
@melvin-bot melvin-bot bot changed the title Workspace - invitation message defaults even when deleted [HOLD for payment 2023-05-22] Workspace - invitation message defaults even when deleted May 15, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 15, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 15, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.13-5 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-05-22. 🎊

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 May 15, 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:

  • [] 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:
  • [] Determine if we should create a regression test for this bug.
  • [] 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.
  • [@Christinadobrzyn] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 21, 2023
@Christinadobrzyn
Copy link
Contributor

Checking on payment of this with the team, from my understanding, this wouldn't be paid since it was found (report May 3rd) so close to the deployment of the original PR (deployed May 2nd)... but I'm not 100%

@priya-zha
Copy link

Hi @Christinadobrzyn. I think we deserve to get paid for this since if it wasn't reported then it would have remained unsolved till date. Kindly let me know your thoughts on this. Thanks.

@Christinadobrzyn
Copy link
Contributor

Talking this over with the team! It looks like the offending PR was deployed to staging on May 2nd and we identified the regression on May 3rd.
Since the regression period is 7 days after the solution has been deployed to production (on May 8th) the regression was identified within the regression period so we should not pay for the fix.

But we will pay for reporting the issue @priya-zha. Let me create a job in Upwork and then I can invite you to it for payment.

@Christinadobrzyn
Copy link
Contributor

@priya-zha can you apply for the job here and I'll pay you? Sorry for the delay in payment.

https://www.upwork.com/jobs/~018704dec53416846e

@priya-zha
Copy link

@Christinadobrzyn Accepted the offer.Thanks.

@thehigherbounce
Copy link

Hello @Christinadobrzyn
did you solve this issue?

@melvin-bot
Copy link

melvin-bot bot commented May 25, 2023

📣 @yavis1218! 📣
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>

@TopDeveloper1015
Copy link

Hi, I can solve this issue

@melvin-bot
Copy link

melvin-bot bot commented May 25, 2023

📣 @EvgeniyMeshik1! 📣
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>

@TopDeveloper1015
Copy link

image

@TopDeveloper1015
Copy link

Sorry, I dont have Upwork account.
Because outside communication, My account closed before 2month

@Christinadobrzyn
Copy link
Contributor

Hi @yavis1218 and @EvgeniyMeshik1 this issue is already completed - it's just waiting for me to pay it out.

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!

Post your questions on the channel, so people will address your queries.
For now, Upwork is mandatory for getting paid. Thanks!

@Christinadobrzyn
Copy link
Contributor

@priya-zha - I paid you in Upwork! Thanks for finding this bug. Going to close this as complete!

@TopDeveloper1015
Copy link

Great

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
Projects
None yet
Development

No branches or pull requests

9 participants