Skip to content

Conversation

@jpetto
Copy link
Collaborator

@jpetto jpetto commented Dec 12, 2025

Goal

fix saving prospects with datePublished value

  • ensures datePublished value is converted to YYYY-MM-DD value prior to form submission (required by graph input)

tested locally against dev data.

Reference

Documentation here:

  • Link to docs

Tickets:

- ensures datePublished value is converted to YYYY-MM-DD value prior to
form submission (required by graph input)
@jpetto jpetto requested a review from a team as a code owner December 12, 2025 17:10
</Grid>
<Box display="none">
<TextField
type="hidden"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed this as it was preventing the tests from finding the fields. display="none" on the wrapping element keeps them out of view.

? DateTime.fromJSDate(new Date(approvedItem.datePublished)).toFormat(
'yyyy-MM-dd',
)
: null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... Does this mean approvedItem.datePublished has invalid dates sometimes? The database type is date. Or does it perhaps get formatted as 2025-12-11 00:00:00 somewhere by JS?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe the parser gave us a date value - YYYY-MM-DD - but zyte gives us YYYY-MM-DD HH:MM:SS, and the graph rejects due to the time value being there

@jpetto jpetto merged commit a52eb1a into main Dec 12, 2025
6 checks passed
@jpetto jpetto deleted the HNT-1379-fix-saving-prospects-with-datePublished-value branch December 12, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants