Skip to content

[HOLD for payment 2023-06-19] [$1000] Assign Task - An incorrect error message is displayed when clicking confirm task #18669

Closed

Description

@kbecciv

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. Go to URL https://staging.new.expensify.com/
  2. Login with any Expensifail account
  3. Go to FAB -> Assign task
  4. Enter a title and description and navigate to the next page
  5. Click Confirm task without entering Assignee

Expected Result:

The error asks for a share destination but not a title

Actual Result:

An incorrect message is displayed.
The title was entered, and the error asks for it

Workaround:

Unknown

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.12.0

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

Bug6048425_Recording__4489.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015e12624031ff7035
  • Upwork Job ID: 1656738721911836672
  • Last Price Increase: 2023-05-18

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 9, 2023
  2. melvin-bot commented on May 9, 2023

    @melvin-bot

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

  3. melvin-bot commented on May 9, 2023

    @melvin-bot

    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
  4. allroundexperts commented on May 9, 2023

    @allroundexperts
    Contributor

    Proposal

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

    Incorrect error message is shown when trying to submit a task

    What is the root cause of that problem?

    The root cause is this condition. Here, we're showing the same error if either of title or shareDestination is false.

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

    We need to replace this with:

     if (props.task.title) {
                setSubmitError(true);
                setErrorMessage('');
                return;
            }
    
            if (props.task.shareDestination) {
                setSubmitError(true);
                setErrorMessage('');
                return;
            }
    

    I've left the error message for each case to be empty because they don't exist yet and we'll need Spanish translations for it as well.

    I think we don't need to store the error message in the state. Since we're already doing a setSubmitError state update, even simple variable containing the error would show up correctly.

    What alternative solutions did you explore? (Optional)

    None

  5. dhairyasenjaliya commented on May 10, 2023

    @dhairyasenjaliya
    Contributor

    Proposal

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

    • Assign Task - An incorrect error message is displayed when clicking confirm task

    What is the root cause of that problem?

    • The root cause is we are throwing an general error when title and description field is empty and also we are using state to display message so when we find any new error on input we just need to update state errors message as well which currently we are not doing

    • Since description filed is optional still we are validating to show error which is not required

    • Also we are not checking if there is assignee on task or not show for that reason we are able to see the error message

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

    • As description filed is optional so we need to remove validation on NewTaskPage.js
        function onSubmit() {
    -       if (!props.task.title || !props.task.shareDestination) {
    +       if (!props.task.title)
    +.          setErrorMessage('newTaskPage.pleaseEnterTaskName')
                 setSubmitError(true);
                return;
            } 
    • There is one more validation remaining to see if there is assignee added for that task or not currently we are not checking so we just need to add one more validation on onSubmit() of NewTaskPage.js
    +        if(!props.task.assignee){ // or we can add this condition as well [ lodashGet(props.personalDetails, props.task.assignee) ]
    +           setSubmitError(true);
    +          return setErrorMessage(props.translate('newTaskPage.pleaseEnterTaskAssignee'));
    +        } 
    
    

    Result

    What alternative solutions did you explore? (Optional)

    • None
  6. kevinksullivan commented on May 11, 2023

    @kevinksullivan
    Contributor

    discussed in slack and going to move forward with solving this here. CC @thienlnam

  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on May 11, 2023
  8. changed the title [-]Assign Task - An incorrect error message is displayed when clicking confirm task[/-] [+][$1000] Assign Task - An incorrect error message is displayed when clicking confirm task[/+] on May 11, 2023
  9. melvin-bot commented on May 11, 2023

    @melvin-bot
  10. melvin-bot commented on May 11, 2023

    @melvin-bot

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

  11. melvin-bot commented on May 11, 2023

    @melvin-bot

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

  12. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on May 11, 2023
  13. 60 remaining items

  14. changed the title [-][$1000] Assign Task - An incorrect error message is displayed when clicking confirm task[/-] [+][HOLD for payment 2023-06-19] [$1000] Assign Task - An incorrect error message is displayed when clicking confirm task[/+] on Jun 12, 2023
  15. melvin-bot commented on Jun 12, 2023

    @melvin-bot

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

  16. melvin-bot commented on Jun 12, 2023

    @melvin-bot

    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
  17. melvin-bot commented on Jun 12, 2023

    @melvin-bot

    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:

    • [@allroundexperts / @aimane-chnaif] The PR that introduced the bug has been identified. Link to the PR:
    • [@allroundexperts / @aimane-chnaif] 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:
    • [@allroundexperts / @aimane-chnaif] 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:
    • [@allroundexperts / @aimane-chnaif] Determine if we should create a regression test for this bug.
    • [@allroundexperts / @aimane-chnaif] 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.
    • [@kevinksullivan] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  18. kevinksullivan commented on Jun 13, 2023

    @kevinksullivan
    Contributor

    Hey @aimane-chnaif and @allroundexperts , please finish out the steps above so I can pay this on time. Thanks!

  19. kevinksullivan commented on Jun 20, 2023

    @kevinksullivan
    Contributor

    Hi @aimane-chnaif @allroundexperts bumping the above. Please finish this out and then I'll make the payments. Thanks!

  20. aimane-chnaif commented on Jun 20, 2023

    @aimane-chnaif
    Contributor
    • The PR that introduced the bug has been identified. Link to the PR: Create Task FrontEnd Changes #17992
    • 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: https://github.com/Expensify/App/pull/17992/files#r1234737484
    • 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
    • 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.

    No PRs caused regression but the error messages were not thoroughly handled while implementing new create task feature.

    Regression Test Proposal:

    Case 1:

    1. Login any account
    2. Go to FAB > Assign task > Enter title > click Next
    3. Just click "Confirm task" button without selecting anything
    4. Verify that "Please select with whom you want to share." message shows

    Case 2:

    1. Login any account
    2. Navigate to new.expensify.com/new/task directly
    3. Verify that nothing is selected, even title is empty
    4. Just click "Confirm task" button without selecting anything
    5. Verify that "Please enter a title and select a share destination." message shows
  21. aimane-chnaif commented on Jun 20, 2023

    @aimane-chnaif
    Contributor

    Timeline analysis:

    • Contributor assigned: May 25
    • Hold on Waiting for copy until May 30 (issue resumed)
    • Another hold on Waiting for copy confirmation: Jun 1
    • Issue resumed again on Jun 5
    • C+ approved PR on Jun 6
    • PR merged without changes on Jun 7

    Total active days to clock: 3 days (May 30 - Jun 1, Jun 5 - Jun 6)

  22. kevinksullivan commented on Jun 20, 2023

    @kevinksullivan
    Contributor

    Thanks @aimane-chnaif . Payments are made but I am waiting for upwork to let me end the contract 🙃 .

    image
  23. kevinksullivan commented on Jun 20, 2023

    @kevinksullivan
    Contributor

    Will close this out and set a reminder to check the job for ending contract. Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions