-
Notifications
You must be signed in to change notification settings - Fork 3k
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-04-15] [$250] Task - No error of exceeding limit when changing title of existing task & system message posted #38451
Comments
We think that this bug might be related to #vip-vsp |
ProposalPlease re-state the problem that we are trying to solve in this issue.Task - No error of exceeding limit when changing title of existing task & system message posted What is the root cause of that problem?We don't have logic in validate function to check task title length and show error on task edit page. App/src/pages/tasks/TaskTitlePage.tsx Lines 31 to 39 in c915e7f
What changes do you think we should make in order to solve the problem?Update the validate function to also check for length just like we do in App/src/pages/tasks/NewTaskTitlePage.tsx Lines 38 to 49 in c915e7f
Pseudo-code: const validate = useCallback(({title}: FormOnyxValues<typeof ONYXKEYS.FORMS.EDIT_TASK_FORM>): FormInputErrors<typeof ONYXKEYS.FORMS.EDIT_TASK_FORM> => {
const errors: FormInputErrors<typeof ONYXKEYS.FORMS.EDIT_TASK_FORM> = {};
if (!title) {
ErrorUtils.addErrorMessage(errors, INPUT_IDS.TITLE, 'newTaskPage.pleaseEnterTaskName');
} else if (title.length > CONST.TITLE_CHARACTER_LIMIT) {
ErrorUtils.addErrorMessage(errors, INPUT_IDS.TITLE, ['common.error.characterLimitExceedCounter', {length: title.length, limit: CONST.TITLE_CHARACTER_LIMIT}]);
}
return errors;
}, []); Result |
ProposalPlease re-state the problem that we are trying to solve in this issue.No error of exceeding limit when changing title of existing task & system message posted What is the root cause of that problem?We have a check in the edit title page only when the title is empty but not when the character length is more than 100 characters: App/src/pages/tasks/TaskTitlePage.tsx Lines 31 to 39 in c915e7f
What changes do you think we should make in order to solve the problem?Update the Validate function to check for character length as follows: Note We don't need to use const validate = useCallback(({ title }: FormOnyxValues<typeof ONYXKEYS.FORMS.EDIT_TASK_FORM>): FormInputErrors<typeof ONYXKEYS.FORMS.EDIT_TASK_FORM> => {
const errors: FormInputErrors<typeof ONYXKEYS.FORMS.EDIT_TASK_FORM> = {};
if (!title) {
errors.title = 'newTaskPage.pleaseEnterTaskName';
} else if (title?.length > CONST.TITLE_CHARACTER_LIMIT) {
errors.title = ['common.error.characterLimitExceedCounter', { length: title.length, limit: CONST.TITLE_CHARACTER_LIMIT }];
}
return errors;
}, []); Resultsimplescreenrecorder-2024-03-18_02.55.44.mp4 |
@lanitochka17 No one was assigned to this task, can you reapply the labels please :) thanks |
Triggered auto assignment to @kevinksullivan ( |
@kevinksullivan 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 |
I would put this in VIP-VSB, since it's tied to task management. I would put this as a LOW issue in terms of priority though, because this is only an issue AFTER the task is created, and the error works well when creating the task with > 100 characters |
Job added to Upwork: https://www.upwork.com/jobs/~0141fff112dde5aafe |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)
|
@Krishna2323's proposal looks good to me! 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @blimpich, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@thesahindia Do you have any feedback about my proposal (which will reduce redundant code in future)? cc @blimpich |
@thesahindia, I think the selected proposal is a dupe of mine, can you pls check again. cc: @blimpich |
@blimpich @thesahindia, @GandalfGwaihir added the note below which I don't think makes sense and I think they are just confusing in the name of We don't need to use ErrorUtils over here, this is a unnecessary function call and redundant, using local value title will be more efficient and fast. |
📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@thesahindia, PR ready for review. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 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 2024-04-15. 🎊 For reference, here are some details about the assignees on this issue:
|
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:
|
Payment summary:
|
@thesahindia please complete the checklist above and we can close this out, thanks! |
@blimpich, @kevinksullivan, @thesahindia, @Krishna2323 Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@blimpich, @kevinksullivan, @thesahindia, @Krishna2323 Huh... This is 4 days overdue. Who can take care of this? |
The logic for validation was missing. I don't think we need a regression test case here. |
@blimpich, @kevinksullivan, @thesahindia, @Krishna2323 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
$250 approved for @thesahindia |
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: 1.4.53-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: N/A
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
The error is displayed in the title editor that the field is exceeding limit of 100 characters, and user can not save the long title
Actual Result:
The error is not displayed in in the title editor, the title gets updated briefly, user is returned to the task report, and the system message of updated title is posted. There is only one error message in the task report that the title is too long
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6416034_1710604494395.Recording__291.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @thesahindiaThe text was updated successfully, but these errors were encountered: