Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.
@julesies:
I tried to create a work and set an embargo, however as soon as you hit save, the entire description and file disappears. This was with the Admin set 2.
Works fine with public, institution only, lease, private.
@vantuyls can you try to confirm this?
What I did:Chrome:-Add new work-add MD and Files-Choose Admin Set Test 2-Choose Embargo-Choose Public-Choose Embargo-Click agreement-Click saveDisappeared.
@mjgiarlo:
Ah, I see what's going on. The visibility component javascript is disabling the form field that allows users to specify the visibility after embargo, because the Admin Set says that after embargo all works become public. As a result of disabling the form field, the :visibility_after_embargo input parameter is not sent to the controller, and validation of the submitted input fails here:
Because :visibility_after_embargo is not present. Thus value is nil and it's being compared against 'open', which fails the validation.
@tdonohue did the lion's share of the work on this, and I imagine there might be a handful of related error conditions here. @tdonohue would you be willing to take a hack at this? (This is an issue with Hyrax, not Nurax. I can create a Hyrax issue if necessary, else let's run with this one.) To reproduce, create an AdminSet with release = "Varies between now and 2yrs after deposit" (though this may not be part of the specific error condition) and visibility = "Everyone".
@tdonohue
Verified this also exists in Hyrax (and Hyku). My suspicion here is that this visibility_after_embargo field shouldn't be disabled but rather made read-only (e.g. readonly='readonly'). That way it isn't editable, but it is still included in the submitted form. So, it might be a pretty quick fix here (and we may want to verify other fields won't have this same issue).
I may be able to dig into this in the next few days, if no one else gets to it.
@mjgiarlo : personally, I'm of the opinion that this should be logged as a Hyrax ticket (too), so it is tracked there as a bug (for others unaware of this issue) and I can assign it to myself once I get to it. As-is, this ticket is on the sidelines of the larger Samvera community.
@mjgiarlo:
@tdonohue I believe @vantuyls will be adding an issue for this in Hyrax soon. Thanks for taking this on! This and samvera/hyrax#1700 and samvera/hyrax#1687 are blocking the 2.0.0.rc1 release, and I'll be seeing to those other two PRs today.
Descriptive summary
Related work
https://github.com/curationexperts/nurax/issues/43