WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 7 months ago

#18661 closed enhancement (fixed)

Include IDs for users and sites on their respective views in the network admin

Reported by: danielbachhuber Owned by: jeremyfelt
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: needs-patch
Focuses: ui, administration, multisite Cc:

Description

It would be nice if the IDs for Users and Sites were displayed in columns on their respective views in the network admin (with the option to hide in screen options of course)

Attachments (6)

id.18661.1.patch (1.4 KB) - added by danielbachhuber 5 years ago.
Add ID columns to ms-users and ms-sites tables
18661.diff (1.7 KB) - added by wonderboymusic 7 months ago.
18661-mobile.png (115.9 KB) - added by ocean90 7 months ago.
18661.2.diff (1.7 KB) - added by jeremyfelt 7 months ago.
18661.2.diff-after-mobile.png (32.3 KB) - added by jeremyfelt 7 months ago.
18661.2.diff-after.png (61.4 KB) - added by jeremyfelt 7 months ago.

Download all attachments as: .zip

Change History (26)

@danielbachhuber
5 years ago

Add ID columns to ms-users and ms-sites tables

#1 @danielbachhuber
5 years ago

  • Keywords has-patch added
  • Status changed from new to accepted

id.18661.1.patch adds ID columns to ms-users and ms-sites tables. For the latter, there's already a switch value for the column (legacy code?) so we just need to register the column.

#2 @Latz
5 years ago

There are plugins (e.g. "Reveal IDs" http://wordpress.org/extend/plugins/reveal-ids-for-wp-admin-25/) which can do this task if you really need to know the IDs. No need to confuse the users with this information since it's not needed for normal operation.

#3 follow-up: @nacin
5 years ago

This is only for the network admin, where it's not users, as much as network administrators. I find needing these IDs all the time.

#4 @danielbachhuber
5 years ago

+1 nacin. The hack for me right now is to load the edit URL for the user and grab the ID from the query string. Which is an ugly habit. I'd argue that easy access to the user ID is core for the network admin (where you're most likely managing a large number of users).

#5 @Latz
5 years ago

OK, sorry, I seem to have missed the "network" part in the ticket.

#6 in reply to: ↑ 3 @westi
5 years ago

Replying to nacin:

This is only for the network admin, where it's not users, as much as network administrators. I find needing these IDs all the time.

I'm interested to know what for.

Because I don't think we have anywhere in the Network Admin where you need to know this info to looks something up.

(I don't think adding something to the UI soley to help people look things up directly in the DB is worthwhile - I would rather we address the reasons that mean you go straight to the db)

#7 follow-up: @nacin
5 years ago

For me, it's typically when I'm doing migrations and other DB level tasks. In particular, getting the ID of a blog, that way I can go inspect tables. User IDs are less helpful. My comment wasn't to support this for core, only that I would find it useful.

Can we add the renderer for the ID field for ms-users? We have some precedence there (like mature actions) which at least makes it super easy to register the column.

#8 in reply to: ↑ 7 @danielbachhuber
5 years ago

Replying to nacin:

Can we add the renderer for the ID field for ms-users? We have some precedence there (like mature actions) which at least makes it super easy to register the column.

Who is this directed towards?

#9 @nacin
2 years ago

  • Component changed from Network Admin to Networks and Sites
  • Focuses administration added

#10 @wonderboymusic
7 months ago

  • Milestone changed from Awaiting Review to 4.4

18661.diff love at first sight

#11 @SergeyBiryukov
7 months ago

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

In 34289:

Network Admin: Include IDs for users and sites on their respective views.

Props danielbachhuber, wonderboymusic.
Fixes #18661.

@ocean90
7 months ago

#12 @ocean90
7 months ago

  • Focuses ui added
  • Keywords needs-patch added; has-patch removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

This wasn't tested on mobile, see 18661-mobile.png.

#13 follow-ups: @jeremyfelt
7 months ago

Can we make the ID column optional and off by default? I'm not sure it's of high value to the majority. I know it's useful for me when I go to use WP-CLI, but I also use WP-CLI to get the ID at that point.

We should get before/after screenshots of the change too.

#14 in reply to: ↑ 13 @helen
7 months ago

Replying to jeremyfelt:

Can we make the ID column optional and off by default? I'm not sure it's of high value to the majority.

Please. I also don't think it's a good idea to have it as the first column, not just because of small screen treatment, but also because it's not the primary piece of human-identifiable data.

@jeremyfelt
7 months ago

#15 @jeremyfelt
7 months ago

18661.2.diff moves ID to the second position for both sites and users. It also hides the column by default if a user has not adjusted their settings.

I tried putting it as the last column, but that didn't really look right in mobile. It seems to fit best as the second, but I'm open for suggestions.

#16 @jeremyfelt
7 months ago

  • Owner changed from danielbachhuber to jeremyfelt
  • Status changed from reopened to accepted

#17 in reply to: ↑ 13 @ocean90
7 months ago

Replying to jeremyfelt:

Can we make the ID column optional and off by default? I'm not sure it's of high value to the majority.

That sounds like we shouldn't add the column at all.

#18 @dd32
7 months ago

I don't mind the ID field being available however as most users shouldn't ever need it, having it disabled by default would be best IMHO. I'd previously have suggested this is plugin material though.

Nacins suggestion earlier was somewhat similar:

Can we add the renderer for the ID field for ms-users? We have some precedence there (like mature actions) which at least makes it super easy to register the column.

The idea being that the handler would be in the code, but a plugin would still have to come along and register the column for display.

#19 @jeremyfelt
7 months ago

Yeah, let's take the registration of the field back out and leave the renderer. A super simple plugin can then register the fields and desired placement if needed.

#20 @jeremyfelt
7 months ago

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

In 34750:

MS: Remove registration of ID column in Sites and Users list tables.

Reverts a portion of [34289] and leaves the render for the column behind. A plugin can register these fields for display via filter.

Fixes #18661.

Note: See TracTickets for help on using tickets.