#5698 closed defect (bug) (fixed)
Set timestamps for unpublished posts
Reported by: | ryan | Owned by: | ryan |
---|---|---|---|
Milestone: | 2.7 | Priority: | normal |
Severity: | normal | Version: | 2.3.2 |
Component: | Administration | Keywords: | date time |
Focuses: | Cc: |
Description
Currently, we don't set timestamps for unpublished posts. This
results in drafts not ordering nicely by date and causes some
confusion among users. Empty timestamps are done mainly to
accommodate history bloggers who like to set their timestamps in the
past. We don't want to stomp their choice once they've made it.
There is another way, however, that will inconvenience them only
slightly while allowing us to provide real timestamps for drafts.
The edit post page has an "Edit Timestamp" checkbox. If checked, the
timestamp specified in the input boxes is given to the draft. This
timestamp sticks with it through publication. If "Edit Timestamp" is
never checked during save, the draft will have an empty timestamp
until published. We could turn the "Edit Timestamp" checkbox on its
head and call it "Reset to current time". This would be checked by
default for unpublished posts and unchecked for published and future
posts. If someone sets the time on their draft and wants it to stick,
they must uncheck "Reset to current time" every time they save. If
someone edits the timestamp, we uncheck reset to current time for them
and set a "use this edited time" flag.
Attachments (2)
Change History (22)
#2
follow-up:
↓ 3
@
17 years ago
Why don't we instead leave the post_date alone (unset for drafts) but set the post_modified to reflect when a draft has been saved. Then we can sort drafts by post_modified.
#3
in reply to:
↑ 2
@
17 years ago
Replying to filosofo:
Why don't we instead leave the post_date alone (unset for drafts) but set the post_modified to reflect when a draft has been saved. Then we can sort drafts by post_modified.
Now that I look at the code, I see that this is the current behavior. So why do you say that the current behavior "results in drafts not ordering nicely by date and causes some confusion among users"? Whatever was saved most recently shows up first--isn't that what you'd expect?
#4
@
17 years ago
post_modified isn't set until a draft is saved a second time. We should fix that.
Manage->Posts sorts by modified only when showing drafts, not when showing all. When looking at all posts, it would be nice to see the drafts sorted in with published posts instead of lumped the end. Right now, you can't see the draft post you just saved if Manage->Posts is paged unless you know to filter on drafts.
#8
@
17 years ago
- Milestone changed from 2.5 to 2.6
Might still be worth setting timestamps, but not for 2.5.
#9
@
17 years ago
- Milestone changed from 2.6 to 2.5
Can we at least in 2.5 get the drafts to display in reverse chronological order like they should? Like posts. Right now the oldest draft is at the top, and it's rather irritating. Refer here: http://trac.wordpress.org/ticket/5758
#10
@
17 years ago
Looks like mine do sort that way. Before [6643], however, drafts without modified time set would mess up the sort. If you have drafts without modified time, try re-saving and see if they sort properly.
#13
@
17 years ago
- Cc redsweater josephscott added
FYI this issue affects blog clients using the XMLRPC interface, as well. Because the dateless drafts show up at the very end chronologically, any client who asks for "getRecentPosts" will miss even a freshly added draft from the WP interface.
Would be a great improvement if new drafts get sorted correctly into the XMLRPC mix for "recent"...
Cc'ing josephscott so he can hopefully stay tuned and make sure that whatever fix gets made here also propagates to XMLRPC.
#14
@
16 years ago
Here's another method that sets post_date to the current time when a draft is saved but keeps post_date_gmt empty until the timestamp is explicitly edited. The empty post_date_gmt is used as the marker to indicate that post_date should be updated to the current time when saved.
"Set to current time"
The new experience sounds a little unfamilar to most people, but it is a problem worth solving and I don't have a better solution.