-
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
Remove Mandatory Description field on edit task #19749
Changes from 4 commits
ff5f9c1
a19a8de
dddcbf9
298c57f
9842146
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -325,7 +325,7 @@ function editTaskAndNavigate(report, ownerEmail, title, description, assignee) { | |||
key: `${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`, | ||||
value: { | ||||
reportName, | ||||
description: (description || report.description).trim(), | ||||
description: description.trim(), | ||||
managerEmail: assignee || report.managerEmail, | ||||
}, | ||||
}, | ||||
|
@@ -380,7 +380,7 @@ function editTaskAndNavigate(report, ownerEmail, title, description, assignee) { | |||
{ | ||||
taskReportID: report.reportID, | ||||
title: reportName, | ||||
description: (description || report.description).trim(), | ||||
description: description.trim(), | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change makes description is updated to empty when you edit the title of the task There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With this change in this PR, I think we should call App/src/pages/tasks/TaskTitlePage.js Line 62 in 82ce35f
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dukenv0307 One simple fix for the issue is to pass description from TaskUtils.editTaskAndNavigate(
props.task.report,
props.session.email,
values.title,
props.task.description,
props.task.managerEmail
); There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nope. this will likely cause another regression since we are using the same edit for changing the assignee function editTaskAndNavigate(report, ownerEmail, title, description, assignee, isDescriptionPage = false) {
value: {
reportName,
description: (isDescriptionPage ? description : report.description).trim(),
managerEmail: assignee || report.managerEmail,
}, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@dhairyasenjaliya Hmmm how will that cause regression ? If we update other instances , it should be fine , we have access to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@fedirjh yes, I recommended it here #19749 (comment)
@dhairyasenjaliya I don't think we need to add a new parameter for this function. I think we only need to add the correct description when we edit anything of task that doesn't description field. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah agree but let's say we have an empty description on edit then it will rely on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's wait till the GH ticket is created |
||||
assignee: assignee || report.assignee, | ||||
editedTaskReportActionID: editTaskReportAction.reportActionID, | ||||
assigneeChatReportActionID: optimisticAssigneeAddComment ? optimisticAssigneeAddComment.reportAction.reportActionID : 0, | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dhairyasenjaliya @fedirjh This change makes a regression, that is after editing the title of task, description is empty briefly, see more detail here https://expensify.slack.com/archives/C049HHMV9SM/p1686020401378739