sul-dlss / happy-heron

Self-Deposit for the Stanford Digital Repository (SDR): H2 is a Rails web application enabling users to deposit scholarly content into SDR
Apache License 2.0
10 stars 2 forks source link

Add SUNet ID lookup for adding collection participants to collection edit page #1036

Closed amyehodge closed 3 years ago

amyehodge commented 3 years ago

When a collection manager types in a SUNet ID to the entry fields for manager, depositor, or reviewer, the IDs should retrieve available information about the person so that the manager can verify they are entering the correct user. I'd like to see name, title, and SUNet returned, something like the way the Stanford Workgroup manager functions:

Screen Shot 2021-02-05 at 5.05.29 PM.png

though the button to add is maybe not necessary. I'm totally willing to further discuss the details of how this might work and how we can get something both useful for users and easily doable.

jcoyne commented 3 years ago

I'm not sure we have access to this information or how we can get access to it.

jcoyne commented 3 years ago

I believe we need access to the Person API (https://uit.stanford.edu/developers/apis/person) to implement this. https://uit.stanford.edu/developers/apis/getting-started

I've asked in #dlss-operations about who should initiate this request.

jcoyne commented 3 years ago

I opened a serviceNow ticket: RITM00181912 https://stanford.service-now.com/it_services?sys_id=60924ff88728b0d09b23bbb9cebb3563&id=ticket&table=sc_req_item

jcoyne commented 3 years ago

Now changing tack to retrieve this via https://accountws.stanford.edu (e.g. curl https://accountws.stanford.edu/accounts/jcoyne85) However, we need a cert signed first: https://github.com/sul-dlss/operations-tasks/issues/2636

jcoyne commented 3 years ago

We now have a way of retrieving this information (see https://github.com/sul-dlss/happy-heron/pull/1766) do we have a design for what this should look like on the page?

amyehodge commented 3 years ago

@astridu Can you assist with this? I don't believe we mocked up anything for us yet. One option is that these appear in a pop-up window like the example I have above works.

astridu commented 3 years ago

Proposed design image

jcoyne commented 3 years ago

We aren't doing a search for a user in this case. We are just looking up the name of the user id (sunet) we typed in. So the design above isn't going to work.

amyehodge commented 3 years ago

@jcoyne That's my mistake. This takes the request a step further and I didn't register that when @astridu passed this by me.

I think the actions will look like this:

  1. user types in a complete SUNet ID (or what they think is)
  2. user clicks a button that says "search" or something like that
  3. if it's a valid SUNet ID, information related to that user is returned -- name, title, department -- so that the user can verify it's the correct ID
  4. if it's not a valid SUNet ID, nothing is returned and the user needs to figure out what the actual ID to enter should be.

@jcoyne does that sound like what you were thinking?

jcoyne commented 3 years ago

Yes.

jcoyne commented 3 years ago

@astridu have you been able to work on the updated design for reviewers/managers/depositor field that includes the names?

astridu commented 3 years ago

@jcoyne @amyehodge Let me know if this will work.

  1. When user first arrives on this page, they see the lookup boxes. image

  2. When user enters a SUNet and clicks the magnifying glass, search results are returned in a small box below the search box. User can click the 'Add' button next to the user if that is the correct user. Otherwise, they can search again. image

  3. Once user has at least 1 manager and 1 depositor, the '+Add another...' button appears for both image

  4. If they click '+Add another...' they'll see the search box appear, and they can use it as they did before. image

jcoyne commented 3 years ago

@astridu should there be a way to remove managers and depositors?

amyehodge commented 3 years ago

@jcoyne Good point. Trash can icons by each entry, perhaps?

And what happens when there is no match? Someone might enter "stacemaples" but this should not return a result because it's an alias, not a real SUNet ID. The real ID is "maples". @jcoyne I think the plan is to only search for real SUNet ID and only return the exact match. If you don't get what you thought because you did not enter a real SUNet or the correct one, then you need to go figure out what the correct one should be. Which makes me a think that a link to Stanford Who in this section might be helpful, in case you don't have the right ID. So, text that says "Find a SUNet ID" perhaps, linking to https://stanford.rimeto.io/.

amyehodge commented 3 years ago

@astridu We're also going to want this in the reviewers section.

astridu commented 3 years ago

If no match returns, then they would see something like this: image

astridu commented 3 years ago

I updated the mockups above w/trash cans. If they delete the only manager/depositor listed, clicking the trash icon should remove that person and then display the search box so user can enter in another name.

astridu commented 3 years ago

Reviewers image

amyehodge commented 3 years ago

@jcoyne Do you have further questions here or is this one ready for the Ready column?

jcoyne commented 3 years ago

@amyehodge this is already in the "in progress column" it just got stalled for a few weeks on the designs. We're able to continue with it now.

jcoyne commented 3 years ago

@astridu we don't want that text that says "Separate each one with a comma and a space..." in the reviewers section, do we?

amyehodge commented 3 years ago

@jcoyne no, we don't want that text if each one is in its own box.