VEuPathDB / service-dataset-access

Apache License 2.0
0 stars 2 forks source link

/dataset-end-users/{end-user-id} endpoint doesn't return priorAuth property #57

Closed chowington closed 1 year ago

chowington commented 1 year ago

The /dataset-end-users/{end-user-id} endpoint does not return the priorAuth property. It should as defined at https://veupathdb.github.io/service-dataset-access/api.html#resources:/dataset-end-users/%7Bend-user-id%7D:get, where priorAuth is the last required property that should be returned.

I tested this by sending a request to /wdk-service/users/278537273/access-request/DS_8e1f623542 with the following payload:

{
    "analysis_plan": "Test request only---ignore and do not approve 4",
    "dissemination_plan": "Test request only---ignore and do not approve 5",
    "organization": "University of Notre Dame",
    "prior_auth": "Test request only---ignore and do not approve 2",
    "purpose": "Test request only---ignore and do not approve 1",
    "request_date": "2/2/2023",
    "requester_email": "chowingt@nd.edu",
    "requester_name": "Connor Howington",
    "research_question": "Test request only---ignore and do not approve 3"
}

which resolved with a 202. Then I hit /eda/dataset-end-users/278537273-DS_8e1f623542 and received the following:

{
    "user": {
        "userId": 278537273,
        "firstName": "Connor",
        "lastName": "Howington",
        "organization": "University of Notre Dame",
        "email": "chowingt@nd.edu"
    },
    "datasetId": "DS_8e1f623542",
    "startDate": "2023-02-02T19:32:58.892Z",
    "duration": -1,
    "restrictionLevel": "public",
    "purpose": "Test request only---ignore and do not approve 1",
    "researchQuestion": "Test request only---ignore and do not approve 3",
    "analysisPlan": "Test request only---ignore and do not approve 4",
    "disseminationPlan": "Test request only---ignore and do not approve 5",
    "approvalStatus": "requested"
}

which contains all the correct properties and values except for priorAuth.

ryanrdoherty commented 1 year ago

Regarding urgency, Connor says, "Not urgent, but higher priority because it's blocking me finishing my ticket"

SheenaTomko commented 1 year ago

Per Connor, wait to qa this until some other tickets are also complete. He will let me know when that is.

chowington commented 1 year ago

This ticket will be ready for testing when https://github.com/VEuPathDB/web-eda/issues/1150 is deployed. To test, first submit a data access request for an EDA study, then go back to the request page and check that your previous response for the question Have you contacted or discussed your request with the [X] study team? If yes, please describe: is already in the text box.

danicahelb commented 1 year ago

Hey @chowington I don't quite understand. I submitted a request for MALED using my Danica_yahoo account. I then tried to request MALED again and I am directed to a page that says "Data access request submitted"

image

If I copy the URL for that page into a new browser window, then I can see my access request form with my responses filled out.

image

Is this what we want?

chowington commented 1 year ago

Hi Danica, this ticket is really a backend ticket, and the evidence that it works would be that this front-end ticket is implemented: https://github.com/VEuPathDB/web-eda/issues/1150

Simply confirming what I mentioned above will satisfy this ticket, as well:

This ticket will be ready for testing when VEuPathDB/web-eda#1150 is deployed. To test, first submit a data access request for an EDA study, then go back to the request page and check that your previous response for the question Have you contacted or discussed your request with the [X] study team? If yes, please describe: is already in the text box.

Specifically, check on that last page you screenshotted that your previous response for the question Have you contacted or discussed your request with the [X] study team? If yes, please describe: is already in the text box.

danicahelb commented 1 year ago

OK, its working. thanks!