Skip to content

Commit

Permalink
MMI-3183 Fixed the posted on time issue (#2403)
Browse files Browse the repository at this point in the history
- when the user publish the content for the first time from
the edit content page, the posted on time should be updated
  • Loading branch information
laidaoyu authored Feb 12, 2025
1 parent 27b6499 commit 9816cbc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/editor/src/features/content/form/hooks/useContentForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,11 @@ export const useContentForm = ({
ContentStatusName.Unpublish,
ContentStatusName.Unpublished,
].includes(values.status)
)
) {
values.status = ContentStatusName.Publish;
// the posted on time should be the first publish time that the editor publish to MMI.
values.postedOn = moment.utc().format();
}

return await handleSubmit(values, formikHelpers);
},
Expand Down

0 comments on commit 9816cbc

Please sign in to comment.