-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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-13] [$1000] On task description editing page field is showing mandatory when editing an existing task where by actually field should be optional #19022
Comments
Triggered auto assignment to @zanyrenney ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?The reason is we are validating on What changes do you think we should make in order to solve the problem?We need to remove // Change 1
// TaskDescriptionPage.js
- const validate = useCallback(
- (values) => {
- const errors = {};
- if (_.isEmpty(values.description)) {
- errors.description = props.translate('common.error.fieldRequired');
- }
- return errors;
- },
- [props],
- );
+. const validate = useCallback(() => ({}), []);
<TextInput
inputID="description"
name="description"
- label={props.translate('newTaskPage.description')}
+ label={props.translate('newTaskPage.descriptionOptional')}
defaultValue={(props.task.report && props.task.report.description) || ''}
ref={(el) => (inputRef.current = el)}
/>
// Change 2
```diff
// libs/actions/Task.js
On editTaskAndNavigate()
const optimisticData = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.reportID}`,
value: {[editTaskReportAction.reportActionID]: editTaskReportAction},
},
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`,
value: {
reportName,
- description: description || report.description,
+ description,
assignee: assignee || report.assignee,
},
},
];
// Optional change
API.write(
'EditTask',
{
taskReportID: report.reportID,
title: reportName,
- description: description || report.description,
+ description: description,
assignee: assignee || report.assignee,
editedTaskReportActionID: editTaskReportAction.reportActionID,
assigneeChatReportActionID: optimisticAssigneeAddComment ? optimisticAssigneeAddComment.reportAction.reportActionID : 0,
},
{optimisticData, successData, failureData},
); What alternative solutions did you explore? (Optional)
|
This comment was marked as outdated.
This comment was marked as outdated.
checking here in slack too about version numbers : https://expensify.slack.com/archives/C01SKUP7QR0/p1684334987930659 |
Okay, did some more testing and I understand the bug better now. It's that when you edit an existing task description, it is showing the error, not that the description field always throws an error. |
Job added to Upwork: https://www.upwork.com/jobs/~0136c1b2820ecd2721 |
Current assignee @zanyrenney is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh ( |
Triggered auto assignment to @joelbettner ( |
ProposalProblem:The current issue in the app is that on the task description editing page, the field is mandatory and users are unable to remove the values. This contradicts the expected behavior, where the field should be optional, allowing users to remove the description and save the task without any text in the field. ###Root Cause: Solution:To address this issue, we propose removing the validation that enforces the title field to be non-empty on the task description editing page. By making the field optional, users will be able to remove the description and save the task without encountering any validation errors. to implement that we should remove these lines App/src/pages/tasks/TaskDescriptionPage.js Lines 49 to 51 in 02fff92
or remove the validation function. |
@dhairyasenjaliya can you elaborate more on why this is needed ? Also please note that we don’t allow diff code in the proposal |
@fedirjh As mentioned
Screen.Recording.2023-05-19.at.10.03.11.AM.mov |
@dhairyasenjaliya's proposal looks good to me. I think we should proceed with it. cc @joelbettner 🎀 👀 🎀 C+ reviewed |
Thank you @fedirjh ! Bump to @joelbettner please can you give us a 👍🏼 if you agree so we can move forward here please? |
still waiting for @joelbettner to create PR |
Alright, we are waiting for the automation to kick in here. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.24-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-06-13. 🎊 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:
|
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:
|
Invited Dhairya |
payouts due |
@zanyrenney also urgency bonus applicable on this |
yep i will add that as the bonus amount :) |
Regression Test Proposal
|
Agree @fedirjh that sounds like a sensible regression test to add 👍🏼 |
On hold. Not overdue. |
bump @zanyrenney |
@dhairyasenjaliya - I have paid you in one payment for contribution + reporting bonus + timeline bonus. |
@fedirjh paid you and the bonus 🎉 |
All good here - I have bumped the regression test to be completed. But I am closing this out now as we are all sorted and regression test has its own issue! |
hey @zanyrenney can you please close the Upwork contract as well |
Bump on closing @zanyrenney |
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:
Expected Result:
On task description editing page field should be optional user can remove description & can save
Actual Result:
On task description editing page field is mandatory & user can't remove values
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?
Version Number: 1.3.14.9
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
Expensify/Expensify Issue URL:
Issue reported by: @dhairyasenjaliya
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684138155046919
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: