Make it possible for super admins to look for users ID
@briri @raycarrick
Currently we can look for name, email address or admins. It would be useful to add an extra column where we would add the user ID, so we can do a quick search

One way to address this would be to say "if someone puts in a number and nothing else and they are super admin (and possibly org admin?) then treat it as a user id" that might work. We have something similar already in there I think.
I am starting this.
@raycarrick-ed & @briri I am finding it a bit difficult to know how to get the User scope :search to differentiate between year 2000+ and user ids in that range. Any suggestions. I also only want super admins to be able to search by user id.
https://github.com/DMPRoadmap/roadmap/blob/1d09e1d530b63290bc9d6fd6ca108d274cce4836/app/models/user.rb#L137-L158
If this is just something a super admin wants to do, could they not just manipulate the URL in the browser?
@briri Please can you give example of URL?
https://dmponline.dcc.ac.uk/super_admin/users/643/edit
@raycarrick-ed @dsisu I think @briri solution is the best. Super admins can access user details given the user Id by appending HOST_URL/super_admin/users/PUT_USER_ID_HERE/edit e,g., HOST_URL = https://dmponline.dcc.ac.uk & https://dmponline.dcc.ac.uk/super_admin/users/643/edit This information should be added Wiki Super Admins.
I am going to assume this is sorted.
I think this is fine in the meantime but at some point we will almost certainly want to implement some sort of search grammar. But not right now e.g.
surname ~ 'ike' && created < '2005-01-01' && org.name ~ 'Nat.*Phys.*Council'
Just adding here as a memento.
@dsisu, @raycarrick-ed & @briri I have added a comment as suggested by @raycarrick-ed to https://github.com/DigitalCurationCentre/DMPonline-Service/wiki/Help-for-super-admins
Please edit to improve.
agree with @raycarrick-ed that we need something better long term. We might want to revisit the paginable concern and perhaps introduce a mechanism that provides search + faceting
Can we please clarify what is wanted here at interface level. We want to be able to enter user ID (?) in the search box in the Users window, https://dmponline.dcc.ac.uk/org/admin/users/admin_index . Is this correct?
What do we mean by 'adding the extra column'? Is it adding an 'User ID' column in the table that displays users (the table beneath the search box).
@dsisu We canot do a search by entering user_id in search box. Only way to get the user is to add id in url say 3456 using link https://dmponline.dcc.ac.uk/super_admin/users/3456/edit
@johnpinto1 I know that. What I am asking is, what feature are we trying to do with this issue, what do we mean by 'Make it possible for super admins to look for users ID'? Look for suggests a 'search'.
@dsisu It can't be done that way as the search will not allow it. See the comments above. So if you know the id you can see if it exists using the link if you are a super admin.
@johnpinto1 I see the comments and I can see you can't search by ID (I've already tried it). What I'm asking is, is that what Magdalena was trying to get to in the first place? It's not clear from the way the issue is worded.
She wanted to be able to use the search box.
The workaround is equivalent to a search as it finds the user by Id if user exists.
The workaround is equivalent to a search as it finds the user by Id if user exists.
Yes, but it's not user friendly. Even if they are super-admin users, chances are they are not using the system every day and they won't remember that they have to use a specific URL.
That is why it is in the notes if they want to find a user quickly.
As a summary for the future ... we thought we would allow people to put a user id into the search box to look up a user by id. We expected this to be trivial (if number then it's an id otherwise do the usual search). But it turned out to be more complicated because we are already doing that with numbers in the search box. So we are parking this and, in the meantime, there is a workaround documented on the DCC superadmins page.
We will revisit this in the future and probably need to rethink how the search is done.
Move to backlog as the fix is too big to be worth the time at the moment