-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
fix(gdoc): unstable publication time triggers duplicate Mailchimp newsletter #2698
Conversation
Current dependencies on/for this PR: This comment was auto-generated by Graphite. |
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.
Nice! I noticed this too when investigating the scheduled post thing. Thanks for fixing it.
I wonder if it would be better to just change the column to DATE though. updatedAt
is still useful to have a timestamp, but it's not like the time an author pressed the publish button is used anywhere / relevant for in citations.
import { MigrationInterface, QueryRunner } from "typeorm"
export class ConvertPostGdocsDatetimetoDate1696422487206
implements MigrationInterface
{
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE posts_gdocs MODIFY publishedAt DATE`
)
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
// All the times will be 00:00:00
`ALTER TABLE posts_gdocs MODIFY publishedAt DATETIME`
)
}
}
@ikesau good point, you're right, we don't really have a use for the published time on the frontend. Having this information around has been useful for debugging, though, so I'd be tempted to keep it around if all else is equal. |
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.
Okay 🙂
Tangentially related: I'm adding a discussion point to our next P&D meeting regarding |
Interacting with the gdocs date picker changes the underlying time, in addition to the visible date. This change makes it all the way to the atom feed, which is then interpreted by Mailchimp RSS-to-Email feature as a new article to be sent.
This happens in two instances.
Notice how that third time is now 02:59:53 vs 00:59:53 originally.
This PR fixes 1 and removes the "Today" button so that the time remains unchanged from the first publishing event.
see slack