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 2023-06-19] [$1000] Assign Task - An incorrect error message is displayed when clicking confirm task #18669
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)
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)
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
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
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
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 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] 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:
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:
Login any account
Go to FAB > Assign task > Enter title > click Next
Just click "Confirm task" button without selecting anything
Verify that "Please select with whom you want to share." message shows
Case 2:
Login any account
Navigate to new.expensify.com/new/task directly
Verify that nothing is selected, even title is empty
Just click "Confirm task" button without selecting anything
Verify that "Please enter a title and select a share destination." message shows
Activity
melvin-bot commentedon May 9, 2023
Triggered auto assignment to @kevinksullivan (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon May 9, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)allroundexperts commentedon May 9, 2023
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
titleorshareDestinationis false.What changes do you think we should make in order to solve the problem?
We need to replace this with:
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
setSubmitErrorstate update, even simple variable containing the error would show up correctly.What alternative solutions did you explore? (Optional)
None
dhairyasenjaliya commentedon May 10, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
The root cause is we are throwing an general error when
titleanddescriptionfield 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 stateerrorsmessage as well which currently we are not doingSince
descriptionfiled is optional still we are validating to show error which is not requiredAlso we are not checking if there is
assigneeontaskor not show for that reason we are able to see the error messageWhat changes do you think we should make in order to solve the problem?
descriptionfiled is optional so we need to remove validation onNewTaskPage.jsfunction onSubmit() { - if (!props.task.title || !props.task.shareDestination) { + if (!props.task.title) +. setErrorMessage('newTaskPage.pleaseEnterTaskName') setSubmitError(true); return; }assigneeadded for that task or not currently we are not checking so we just need to add one more validation ononSubmit()ofNewTaskPage.jsResult
What alternative solutions did you explore? (Optional)
kevinksullivan commentedon May 11, 2023
discussed in slack and going to move forward with solving this here. CC @thienlnam
[-]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[/+]melvin-bot commentedon May 11, 2023
Job added to Upwork: https://www.upwork.com/jobs/~015e12624031ff7035
melvin-bot commentedon May 11, 2023
Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon May 11, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (
External)60 remaining items
[-][$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[/+]melvin-bot commentedon Jun 12, 2023
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon 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.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
melvin-bot commentedon 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:
kevinksullivan commentedon Jun 13, 2023
Hey @aimane-chnaif and @allroundexperts , please finish out the steps above so I can pay this on time. Thanks!
kevinksullivan commentedon Jun 20, 2023
Hi @aimane-chnaif @allroundexperts bumping the above. Please finish this out and then I'll make the payments. Thanks!
aimane-chnaif commentedon Jun 20, 2023
No PRs caused regression but the error messages were not thoroughly handled while implementing new create task feature.
Regression Test Proposal:
Case 1:
Case 2:
aimane-chnaif commentedon Jun 20, 2023
Timeline analysis:
Total active days to clock: 3 days (May 30 - Jun 1, Jun 5 - Jun 6)
kevinksullivan commentedon Jun 20, 2023
Thanks @aimane-chnaif . Payments are made but I am waiting for upwork to let me end the contract 🙃 .
kevinksullivan commentedon Jun 20, 2023
Will close this out and set a reminder to check the job for ending contract. Thanks everyone!