samvera / hyrax

Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.
http://hyrax.samvera.org/
Apache License 2.0
183 stars 124 forks source link

Feature request: Always make default admin set the first item in the select menu of the relationships tab #1773

Closed bess closed 6 years ago

bess commented 6 years ago

Descriptive summary

Currently, when a new AdminSets is created, it becomes the first (and thus, the auto-selected) option on the "Add as member of administrative set" select menu. This results in unexpected behavior for users.

Rationale

An institution using Hyrax starts by only using the default admin set. Staff members are depositing items, and they get used to not having to select anything in the "Relationships" tab because it has automatically selected the default admin set for them. Then, someone adds a second admin set. Now that new admin set is the one being automatically selected, and to many users it appears that their deposited items are disappearing.

Expected behavior

I would expect that the behavior of the deposit would not change just because a new AdminSet had been created.

Related work

This has come up at more than one institution. In slack, @bmquinn says he fixed it like this:

Brendan Quinn [1:41 PM] We added selected: AdminSet::DEFAULT_ID after https://github.com/samvera/hyrax/blob/master/app/views/hyrax/base/_form_relationships.html.erb#L6 in an override of _form_relationships.html.erb

VivianChu commented 6 years ago

@bess - Do you know if anyone working on this issue? Thanks

julesies commented 6 years ago

i tested this on nurax and it works! Thank you!