Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change "link dataverse" feature to be powered by Saved Search #1852

Closed
pdurbin opened this issue Apr 2, 2015 · 8 comments
Closed

Change "link dataverse" feature to be powered by Saved Search #1852

pdurbin opened this issue Apr 2, 2015 · 8 comments
Assignees

Comments

@pdurbin
Copy link
Member

pdurbin commented Apr 2, 2015

From #90 originally:

Now that I've prototyped this change I can better express that we would be changing the behavior of linking a dataverse not a dataset.

Current behavior: linking a dataverse adds an entry in the dataverselinkingdataverse table. The problem is the contents of the dataverse you link to are not searchable and do not show up as cards, as reported at #1366.

Goal: Change "link dataverse" to be powered by Saved Search (#90) which will find all the contents/children of the dataverse (all dataverses and datasets that are part of the subtree) an add links to all those contents to both the dataverselinkingdataverse table and the datasetlinkingdataverse table. The hope is to resolve #1366.

@pdurbin
Copy link
Member Author

pdurbin commented Apr 2, 2015

@scolapasta I'd like to give you a demo of 1814251 before I merge it to master.

@pdurbin
Copy link
Member Author

pdurbin commented Apr 2, 2015

I merged 1814251 with master but @scolapasta and I agree that we'll persist a single saved instead of two. We'll link the target dataverse immediately so the user can see some effect right away. I'll work on this now.

@pdurbin
Copy link
Member Author

pdurbin commented Apr 2, 2015

Again, the focus of this ticket is how we’ve changed the behavior of “link dataverse” so this could be a good fix for #1366 so please feel free to test both tickets at once.

Below is how I was testing this locally with the same data you can see at https://apitest.dataverse.org

This is a superuser only feature for now.

Go to http://localhost:8080/dataverse/trees and click “link dataverse” and choose “Finches”.

I then see “Success! – Trees Dataverse has been successfully linked to Finches Dataverse. Please wait for its contents to appear.”

Go to http://localhost:8080/dataverse/finches and make sure you see the Trees dataverse, which should be linked right away. You should not expect to see any contents yet, which is what #1366 is about.

To see the contents of Trees, we run a curl command (example below) for a saved search you just created. (Post 4.0 we’d like to experiment with making this automatic and async.)

After running the curl command, if you refresh under the Finches dataverse you should see all the content of the Trees dataverse, including child dataverses, datasets, and files.

murphy:dataverse pdurbin$ curl -s http://localhost:8080/api/admin/savedsearches/list  | jq .
{
  "data": {
    "saved searches": [
      {
        "creatorId": 1,
        "definitionPointAlias": "finches",
        "definitionPointId": 3,
        "id": 7,
        "filterQueries": [
          "subtreePaths:\"/7\""
        ],
        "query": "*"
      }
    ]
  },
  "status": "OK"
}
murphy:dataverse pdurbin$ curl -s -X PUT http://localhost:8080/api/admin/savedsearches/makelinks/7  | jq . 
{
  "data": {
    "hits for saved search id 7": [
      {
        "hitInfo": [
          {
            "result": "Persisted DatasetLinkingDataverse id 3 link of [Dataset id:10 ] to [Dataverse id:3 name:Finches]",
            "dvObjectId": 10,
            "name": "Spruce Goose"
          },
          {
            "result": "Skipping because [Dataverse id:3 name:Finches] already links to dataset [Dataset id:10 ] that contains file id 12.",
            "dvObjectId": 12,
            "name": "trees.png"
          },
          {
            "result": "Persisted DataverseLinkingDataverse id 9 link of [Dataverse id:9 name:Chestnut Trees] to [Dataverse id:3 name:Finches]",
            "dvObjectId": 9,
            "name": "Chestnut Trees"
          },
          {
            "result": "Persisted DataverseLinkingDataverse id 10 link of [Dataverse id:8 name:Spruce] to [Dataverse id:3 name:Finches]",
            "dvObjectId": 8,
            "name": "Spruce"
          }
        ],
        "savedSearchId": 7,
        "definitionPointAlias": "finches"
      }
    ]
  },
  "status": "OK"
}

Moving to QA.

@sbarbosadataverse
Copy link

@pdurbin

Testing this ticket, may need more information on steps needed to test it accurately:

1-you get this message at the top of the page when you link a dataverse---"please wait for its content to appear."---but nothing happens.....

xzc5ty7wygjw0pqwf4pdwkdqpjmxecngm5l7x7kec0s

@sbarbosadataverse
Copy link

@pdurbin
is the "link dataverse" feature only available to admins? when I log in with my nonadmin user account, I don't get the option

@sekmiller
Copy link
Contributor

Link Dataverse is only available to admins in 4.0

On Apr 9, 2015, at 12:23 PM, sbarbosadataverse <notifications@github.commailto:notifications@github.com> wrote:

@pdurbinhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_pdurbin&d=BQMCaQ&c=WO-RGvefibhHBZq3fL85hQ&r=d7bbsLIcERTG2Qe_gE_iKH1z80JxaTHhJpRXaS4mxwM&m=XvsbY1GFFUaYliwI7d0IJJW7IH6CuDXRv_vVyba4BuQ&s=2g0wtwu6t-AcCQelnkXoOIXA3grnp2Q2eZ0eUWltukk&e=
is the "link dataverse" feature only available to admins? when I log in with my nonadmin user account, I don't get the option


Reply to this email directly or view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_IQSS_dataverse_issues_1852-23issuecomment-2D91280325&d=BQMCaQ&c=WO-RGvefibhHBZq3fL85hQ&r=d7bbsLIcERTG2Qe_gE_iKH1z80JxaTHhJpRXaS4mxwM&m=XvsbY1GFFUaYliwI7d0IJJW7IH6CuDXRv_vVyba4BuQ&s=4BkAZqPdzwsRlJt06sBnIV7yODxuIbzJpLfbAkU6M_4&e=.

@sbarbosadataverse
Copy link

@kcondon
can we discuss when you have time

@sbarbosadataverse
Copy link

Tested with Kevin:
Can't link dataverse to it's own name
Can't link a dataset in a dataverse back to the same dataverse
Search results working as expected for dataset linked to a dataverse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants