Skip to content
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

Feature request: post_publication_datetime for Published trigger #187

Closed
jphorn opened this issue Aug 1, 2019 · 10 comments
Closed

Feature request: post_publication_datetime for Published trigger #187

jphorn opened this issue Aug 1, 2019 · 10 comments

Comments

@jphorn
Copy link

jphorn commented Aug 1, 2019

Would it be possible to have the post_publication_datetime merge tag for <post_type> Published trigger? We already can use it for Scheduled trigger, but somehow it's missing for Published. Both current values (creation and modification) don't always reflect the published date time.

@jakubmikita
Copy link
Member

Hey @jphorn the reason why you don't have this merge tag is that you have {date_time} global merge tag. And because the trigger is executed right away, it's equal to publication time. Hope this helps!

@jphorn
Copy link
Author

jphorn commented Aug 19, 2019

Unfortunately the {date_time} global merge tag doesn't show the correct time for notifications where a post was scheduled.

This post (see image) was scheduled at 18:12 to go live at 22:00 the same day. The notification time shows the scheduling time instead of the actual publication time.

image

@jakubmikita
Copy link
Member

Yep, this is expected behavior. You should use the time merge tag from the trigger (like: {post_publication_datetime}), not the global one.

@jphorn
Copy link
Author

jphorn commented Aug 19, 2019

I see. For the post_publication trigger I only see post_creation_datetime and post_modification_datetime. I thought these were the only ones possible.

image

@jphorn
Copy link
Author

jphorn commented Aug 22, 2019

I'm still very confused by this. I ask if a {post_publication_datetime} merge tag would be possible for Published trigger, but am being told to use the global merge tag {date_time}. However - that doesn't give me the correct datetime, so when I mention this our advice is to use {post_publication_datetime}. But that's the exact merge tag I ask for and which doesn't exist for Publication trigger (see screenshot).

@jakubmikita
Copy link
Member

Sorry for the confusion, I think we might have an edge case here. I'm going to test your specific case now.

@jakubmikita jakubmikita reopened this Aug 23, 2019
@jakubmikita
Copy link
Member

I'm twisted like a jar of pickles...

I just checked what we actually have in the database and I think I used a bad wording for the merge tags. So if you schedule a post:

  • the {post_creation_datetime} is the date of publication (when the post goes live)
  • the {post_modification_datetime} is the date when a post has been scheduled (or - surprisingly - created)

So if you use the {post_creation_datetime} you should get correct results this time

@jphorn
Copy link
Author

jphorn commented Aug 23, 2019

Ah. That's indeed a little confusing if I may politely say so ;-) post_creation_datetime for me signifies the datetime the post was firstly added to the database (post saved as a draft trigger). That's why I didn't think to use this tag.

Might be an idea to just add post_publication_dateime to the post_published trigger as well to end the confusion (regardless of what they actually do in your code; they might as well be the same in functionality)

I will try with post_creation_datetime for now and will eventually change them when post_publication_datetime is live 🙏

@jakubmikita
Copy link
Member

That's a good idea. Sometimes it's hard to look at the interface as a user, not a developer :)

@jakubmikita
Copy link
Member

This is going to be released today

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

No branches or pull requests

2 participants