Make WordPress Core

Opened 13 years ago

Closed 9 years ago

#18661 closed enhancement (fixed)

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

Reported by: danielbachhuber's profile danielbachhuber Owned by: jeremyfelt's profile 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 13 years ago.
Add ID columns to ms-users and ms-sites tables
18661.diffโ€‹ (1.7 KB) - added by wonderboymusic 9 years ago.
18661-mobile.pngโ€‹ (115.9 KB) - added by ocean90 9 years ago.
18661.2.diffโ€‹ (1.7 KB) - added by jeremyfelt 9 years ago.
18661.2.diff-after-mobile.pngโ€‹ (32.3 KB) - added by jeremyfelt 9 years ago.
18661.2.diff-after.pngโ€‹ (61.4 KB) - added by jeremyfelt 9 years ago.

Download all attachments as: .zip

Change History (26)

@danielbachhuber
13 years ago

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

#1 @danielbachhuber
13 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
13 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
13 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
13 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
13 years ago

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

#6 in reply to: โ†‘ย 3 @westi
13 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
13 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
13 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
11 years ago

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

#10 @wonderboymusic
9 years ago

  • Milestone changed from Awaiting Review to 4.4

18661.diffโ€‹ love at first sight

#11 @SergeyBiryukov
9 years 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.

#12 @ocean90
9 years 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
9 years 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
9 years 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.

#15 @jeremyfelt
9 years 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
9 years ago

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

#17 in reply to: โ†‘ย 13 @ocean90
9 years 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
9 years 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
9 years 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
9 years 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.