WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 3 years ago

#26502 closed enhancement (fixed)

Dashboard Activity dates conditionally need the year

Reported by: GaryJ Owned by: chriscct7
Milestone: 4.4 Priority: normal
Severity: normal Version: 3.8
Component: Administration Keywords: has-patch commit
Focuses: Cc:

Description

If you import the Theme Unit Test data, one of the posts is scheduled for Jan 1st 2050. The Dashboard Activity widget doesn't indicate what year this is scheduled for though, and leaves the date as ambiguous - I suspect most people would assume it would be in a few weeks time, given no other information. The same would apply if the Recent Activity doesn't have a limit on it, where the last post was more than a year ago.

Since these might be moving towards edge cases compared to activity on a lot of sites, I'd like to see a year included only if the timestamp is more than 1 year before or after the current date (rather than on each date).

Screenshots included for clarification.

Attachments (5)

dashboard-activity-missing-year.png (5.3 KB) - added by GaryJ 5 years ago.
Trunk - years not shown on dashboard activity widget.
dashboard-activity-included-year.png (5.4 KB) - added by GaryJ 5 years ago.
Suggestion - include years where timestamp is more than 1 year before or after the current time.
26502.diff (774 bytes) - added by GaryJ 5 years ago.
Show date if timestamp difference is greater than 1 year
26502-alt.diff (798 bytes) - added by GaryJ 5 years ago.
Show year if timestamp has different year to now.
26502.patch (810 bytes) - added by chriscct7 3 years ago.
Refreshed the alt patch (johnbillion's suggestion)

Download all attachments as: .zip

Change History (12)

@GaryJ
5 years ago

Trunk - years not shown on dashboard activity widget.

@GaryJ
5 years ago

Suggestion - include years where timestamp is more than 1 year before or after the current time.

#1 @SergeyBiryukov
5 years ago

  • Component changed from General to Administration

#2 @johnbillion
5 years ago

Probably the most logical thing to do is to display the year if the post date's year is not the same as the current year.

@GaryJ
5 years ago

Show date if timestamp difference is greater than 1 year

@GaryJ
5 years ago

Show year if timestamp has different year to now.

#3 @GaryJ
5 years ago

Two suggestions offered:

  • 26502.diff goes with a difference in the timestamp of more than one year, as per original ticket description.
  • 26502-alt.diff goes with johnbillion's (probably more sensible) suggestion of showing the year if it's not the same as the current one.

#4 @SergeyBiryukov
5 years ago

  • Keywords has-patch 3.9-early added
  • Milestone changed from Awaiting Review to Future Release

#5 @chriscct7
3 years ago

  • Keywords 3.9-early removed
  • Owner set to chriscct7
  • Status changed from new to assigned

@chriscct7
3 years ago

Refreshed the alt patch (johnbillion's suggestion)

#6 @chriscct7
3 years ago

  • Keywords commit added
  • Milestone changed from Future Release to 4.4
  • Status changed from assigned to accepted

Refreshed the patch. Good to go.

#7 @SergeyBiryukov
3 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 34980:

Dashboard: Display year in Activity widget if the post date year is not the same as the current one.

Props GaryJ, chriscct7.
Fixes #26502.

Note: See TracTickets for help on using tickets.