Skip to content

Commit

Permalink
Merge pull request #42244 from bernhardoj/fix/42225-task-description-…
Browse files Browse the repository at this point in the history
…double-parsed-when-saving-title

[CP Staging] Fix task description is double parsed when updating the task title
  • Loading branch information
Beamanator authored May 16, 2024
2 parents 1faad15 + 6bc2e31 commit b2728b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4808,7 +4808,7 @@ function buildOptimisticTaskReport(
return {
reportID: generateReportID(),
reportName: title,
description,
description: getParsedComment(description ?? ''),
ownerAccountID,
participants,
managerID: assigneeAccountID,
Expand Down
3 changes: 2 additions & 1 deletion src/libs/actions/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,8 @@ function editTask(report: OnyxTypes.Report, {title, description}: OnyxTypes.Task
const reportName = (title ?? report?.reportName)?.trim();

// Description can be unset, so we default to an empty string if so
const reportDescription = ReportUtils.getParsedComment((description ?? report.description ?? '').trim());
const newDescription = description ? ReportUtils.getParsedComment(description) : report.description;
const reportDescription = (newDescription ?? '').trim();

const optimisticData: OnyxUpdate[] = [
{
Expand Down

0 comments on commit b2728b8

Please sign in to comment.