localgov icon indicating copy to clipboard operation
localgov copied to clipboard

Add "Last updated by" filter

Open finnlewis opened this issue 7 months ago • 16 comments

@AWearring mentioned they have a filter for 'Last updated by' which is not necessarily the author, but the person who last edited it. This could be a nice addition too!

Originally posted by @finnlewis in https://github.com/localgovdrupal/localgov/issues/855#issuecomment-2876163480

finnlewis avatar May 13 '25 11:05 finnlewis

@markconroy Might be worth added a last updated by column to the view to so that the list makes sense after filtering?

AWearring avatar May 13 '25 11:05 AWearring

Hi @AWearring thanks for the suggestion - could you post a screenshot of how this looks please?

There's a lot of columns in this view and am wondering if there's too many. Thanks

willguv avatar Jul 14 '25 16:07 willguv

@willguv this is what /admin/content looks like on the North Kesteven site, I've highlighted 2 custom columns that aren't be standard. We don't have both "Created by" and "Updated by", because who created it is as relevant to us

Image

AWearring avatar Jul 15 '25 15:07 AWearring

I'm wondering whether "last updated by" is more useful than author

If the page has just been created, the author is the person who has last updated it

If the page has been changed a few times, the person who last updated it is most useful

Thoughts @AWearring?

willguv avatar Jul 15 '25 15:07 willguv

@willguv Yes, that is what the thinking was here (in West Lindsey, North Kesteven and Rutland). The frustration we had with "author" was that this would always be the original page creator - who may have left, or may have been temporarily assigned to migrated content. "last updated by" would always be current and updated each time the content changed - the potential downside could be if you have editors that just fix minor content issues (such as spelling/grammatical mistakes). We decided quite quickly to drop the "author" column and only have "updated by" - we also decided to drop "last" to reduce the word count on the column header.

AWearring avatar Jul 15 '25 15:07 AWearring

Thanks @AWearring, so I think the work is

On /admin/content

  • Change 'Author' filter to 'Updated by'
  • Heading order needs minor changes

Title Content type Updated by [check wording] Update time [check wording] Status Operations

The same changes need to be applied to /admin/content/media to be consistent

willguv avatar Jul 15 '25 16:07 willguv

@benhillsjones would be great to hear your thoughts on this too - happy to precis if needed

willguv avatar Jul 15 '25 16:07 willguv

Agree with the comment about the creator of the page always being what displays, as mentioned often that person has left or was temp so not that useful

So agree with this change yes

benhillsjones avatar Jul 15 '25 16:07 benhillsjones

@benhillsjones what would you call these columns please?

Updated by [the name of the user] Update time [the date and time]

willguv avatar Jul 15 '25 16:07 willguv

'Updated by' and 'Last updated'?

benhillsjones avatar Jul 15 '25 16:07 benhillsjones

@finnlewis think this also applies to microsites

willguv avatar Jul 21 '25 11:07 willguv

@willguv to spell out the changes and note that it's for all sites not just new ones

willguv avatar Jul 21 '25 15:07 willguv

Please do not change the view set up on /admin/content for existing sites if others have made customisations. I think there is some code to check if the config has been changed from default to mark it to be skipped. This is important as BHCC (and quite likely others) have made significant changes to this view that we don't want nuked!

andybroomfield avatar Jul 21 '25 16:07 andybroomfield

Please do not change the view set up on /admin/content for existing sites if others have made customisations. I think there is some code to check if the config has been changed from default to mark it to be skipped. This is important as BHCC (and quite likely others) have made significant changes to this view that we don't want nuked!

Yep, I agree with @andybroomfield - don't force on existing sites where they have made customisation

AWearring avatar Jul 21 '25 16:07 AWearring

For new installs only, and also (following @andybroomfield's point above) include code to skip these changes if the view has been customised

1) Change the "Author" filter to "Last updated"

Image

2) Change the following column headings

Author > Updated by Update > Last updated

Image

3) Change the column order

Title Content type Updated by Last updated Status Operations

willguv avatar Jul 23 '25 17:07 willguv

I have a PR - https://github.com/localgovdrupal/localgov/pull/885 - brewing for this.

It lists the last person to update the node and the last updated date/time.

It also have an exposed filter for the 'Last updated by' field, but that is referencing the user_id rather than user name, so you need to put in 2 or some other id, instead of mark or some other username.

markconroy avatar Aug 25 '25 15:08 markconroy