Opened 13 years ago

Last modified 7 years ago

#4238 new enhancement

Allow ability to "colourize" 'How long ago' column

Reported by: Matt Callaghan Owned by:
Priority: normal Component: UserStatsMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11


It would be useful to be able to specify thresholds for different coloured output on the "How Long Ago" column of the UserStatsMacro.

Currently, if we have a fair number of users, it's not clear instantly who's good and who's bad. Example:

User Last Login How long ago
user 2008/12/04 00:36:38 5 day(s)
user 2008/12/07 13:07:03 2 day(s)
user 2008/11/22 14:32:52 17 day(s)
user 2008/12/09 16:48:47 <24h
user 2008/11/30 18:49:48 8 day(s)
user 2008/12/08 23:14:37 <24h
user 1969/12/31 19:00:00 14222 day(s)
user 2008/12/08 21:07:58 <24h
user 2008/12/02 22:02:40 6 day(s)
user 2008/12/06 16:38:27 3 day(s)
user 1969/12/31 19:00:00 14222 day(s)
user 2008/12/06 19:30:49 2 day(s)
user 2008/12/09 12:12:28 <24h
user 2008/12/08 03:25:15 1 day(s)
user 2008/02/07 12:33:36 306 day(s)
user 2008/12/07 13:24:13 2 day(s)

However, if we could provide optional threshold values to the "How Long Ago" in days, it would help make it much clearer who's active and who's not.

Example Macro Call:

[[UserStats(threshold(green,7), threshold(yellow,14), threshold(red,999999), etc.)]]

The above example would provide some sort of colour feedback to the table. If the user logged in within the last 7 days, they would be GREEN, in between 7 and 14, YELLOW, more than 14 days RED) (Obviously my idea of the call isn't ideal, but hopefully you get the point.)

Attachments (0)

Change History (4)

comment:1 Changed 13 years ago by Ryan J Ollos

Summary: Allow ability to ''colourize'' "How long ago" outputAllow ability to "colourize" 'How long ago' column

comment:2 Changed 12 years ago by Ryan J Ollos

Owner: changed from Pedro Paixao to Ryan J Ollos

comment:3 Changed 11 years ago by Mark Cooke

I don't think colours are going to be easy as the macro currently relies on wiki formatting to generate the table. However, it should be possible to make it more readable, see #5640...

Possible alternatives:

  • sort the users by 'How long ago'
  • generate multiple tables based on thresholds?

comment:4 Changed 7 years ago by Ryan J Ollos

Owner: Ryan J Ollos deleted

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.