scientist-softserv / atla_digital_library

0 stars 0 forks source link

Collection search box when adding/editing a work #94

Open orangewolf opened 1 year ago

orangewolf commented 1 year ago

Summary

Collections that were created in bulkrax are not appearing in the dropdown for adding a work to a collection in the work/edit form.

Observed behavior:

As a user who is adding or editing a work, I go to the relationships tab and click on the "add to collection" search box to select a collection which the work should go in. Right now, there is no substring completion, so you need to type in a whole word in the collection name for a search result to show up, which is fine and probably outside the scope to try to address.

https://user-images.githubusercontent.com/29311858/202257266-506e282e-338c-4bf0-ba41-61da0669f052.mov

The problem appears to be that it didn't index any of the collections that were generated from bulkrax imports (read: ones that weren't created by hand in the dashboard). For example, in the video I searched for "collection", but it wasn't able to find the collection named "The Methodist Manuscripts Collection (Garrett-Evangelical Theological Seminary)", nor any of the "items with collection equal to ..." that was generated from the OAI Internet Archive importer. The one exception (which I'm not sure if it was done by hand or not) was the CDRI, which did show up in the search

https://user-images.githubusercontent.com/29311858/202257336-a1434e99-20bc-4475-95c8-c65ee026526c.mov

Expected Behavior:

When adding a work to a collection, existing collections should be indexed to be addable

Acceptance Criteria

Note

Current behavior in hyrax is that collections only appear in this dropdown when a full word in the collection is matched - it does not match just the first 2 letters. Fixing this is out of scope for this ticket.

Testing Instructions

  1. Log in and visit /dashboard
  2. Make sure you have several collections - some created manually, and some created with bulkrax
  3. Go to "Works" and then click the "Add new work" button
  4. Go to the "Relationships" tab
  5. Select the form input for the dropdown to add your new work to a collection
  6. Type a full word from one of the collection titles of a collection that was created with bulkrax
  7. Check that the title appears in the list for the dropdown
  8. Repeat with a search for one of the collection titles of a collection that was created manually
orangewolf commented 1 year ago

Kelly Chess - July 2019

Confirmed that a user is not able to find "The Methodist Manuscripts Collection" in the collection drop down when creating a new work.

orangewolf commented 1 year ago

Daniel Lim - August 2019

image

The "add to collection" button in the edit collection page has a dropdown instead of a search box to access this same selection set. It appears that only collections that were created manually are available

crisr15 commented 1 year ago

Christy, can we close this? This matches #176 and we confirmed the functionality now exists.

ckarpinski commented 1 year ago

@crisr15 Can you show me how this works - when i follow the first post about this at the top of the ticket I cannot get collections to show - tried the methodist one in the example.

Image

labradford commented 1 year ago

It appears that some collections are populating but not all of them are available in the collection drop down box

summer-cook commented 1 year ago

Notes

Confirmed on main 4/18 - searching for collections that have been added through bulkrax does not work

image
DiemBTran commented 1 year ago

This passes SoftServ QA: See attached screenshots.

tested on:

Works can be added to collections that were created manually and through Bulkrax ![New Work - Atla Digital Library 2023-04-24 at 3 25 01 PM (1)](https://user-images.githubusercontent.com/29311858/234133275-6390f5df-4bc2-457a-b1bc-8293794cb60e.jpg) ![New Work - Atla Digital Library 2023-04-24 at 3 25 19 PM (1)](https://user-images.githubusercontent.com/29311858/234133281-9c430e63-90e3-4473-8d3b-4a66ae6c3be9.jpg)
ckarpinski commented 1 year ago

Okay so I think this issue arose from the work show page and trying to add a work to a collection there not from the work edit page in the dashboard. It works now in the dashboard but still does not seem to work from the workshow page

Image

I had to type out the entire first word before something showed up

Image

DiemBTran commented 1 year ago

This passes SoftServ QA: See attached screenshots. From the work-show page, users can add a work to a collection via a dropdown. Before https://github.com/scientist-softserv/atla_digital_library/pull/293, users were unable to see collections in the dropdown that were added in bulkrax. After https://github.com/scientist-softserv/atla_digital_library/pull/293, users will be able to see all collections in the collection dropdown.

tested with:

From the work show page, a work can be added to collections that were manually created or imported through Bulkrax https://user-images.githubusercontent.com/29311858/236085930-03cef4b0-c45e-46cd-935c-fc511e427d18.mp4
ckarpinski commented 1 year ago

When i go to a work on staging and try to add the collection Electric Sheep - from the work show page, I still cant get this to work. I see you created a bunch of tests that worked for you, but why cant I do this with this Electric Sheep collection?

Also, If i pick a work on staging and go to its show page and try to add any of the collections you name above, they do not show up as options to add.

summer-cook commented 1 year ago

@ckarpinski I noticed that the difference between Electric Sheep and Diem's collection is that you/"rob" have manage access for Diem's collection, while no one has manage, or deposit access for Electric Sheep.

Image

Image

You need one of these access levels in order to add a work to a collection from the show page, since it is a public facing page.

What importer did you use to create electric sheep? It could have been that the collection was created when relationships were not being created properly on staging, which has since been fixed (which is why Diem's imported collection automatically has the manage access added.

ckarpinski commented 1 year ago

Image

@summer-cook I also tried adding the collections that Diem had created to a random work and they also do not show up.

ckarpinski commented 1 year ago

Electric sheep was created by OAI import. Our collections are almost always created this way - how do we make it so the admin which is usually rob's login - has the ability to add things to any collection?

ckarpinski commented 1 year ago

Okay played around with this more for Diem's collections and it looks like despite what the UI says you have to type in the entire first word of the collection name for it to work. Maybe should change that help text to say type in the first word?

Question remains about our OAI imported/created collections - is there a way to make them have the right permissions or do we need to edit the collections if we ever want to add to a collection that was importer created?

summer-cook commented 1 year ago

Okay played around with this more for Diem's collections and it looks like despite what the UI says you have to type in the entire first word of the collection name for it to work. Maybe should change that help text to say type in the first word?

this is an issue in upstream hyrax, yes it should be changed but it is out of scope for this ticket

Question remains about our OAI imported/created collections - is there a way to make them have the right permissions or do we need to edit the collections if we ever want to add to a collection that was importer created?

There is not a way to do that by default with this version of bulkrax. It would be additional work, and we could make a separate ticket for it for later if you so choose.

but for now, if you are trying to add a work to an oai collection from the UI, you are able to do this from the dashboard. you would not be editing the collection, but editing the work. from the work-show page: Edit -> Relationships tab -> Add to collection. it is one more step but its a good workaround.

I was able to do this without an issue for Electric Sheep. https://share.getcloudapp.com/v1uP72Xb