github samvera/hyrax v2.0.0
Hyrax 2.0.0

latest releases: v3.4.1, v3.4.0, v3.3.0...
6 years ago

Hyrax 2.0.0 includes many new features and bug fixes. Highlights include:

  • Consolidated user and admin dashboards into a single, collapsible dashboard, including new functionality to:
    • Change site colors via dashboard settings UI
    • Customize About, Help, Terms, and Agreement pages in an in-browser editor
  • Translated user interface into five new languages: German, French, Italian, Portuguese, and Chinese (adding to English and Spanish)
  • Added embargo and lease management views
  • Disentangled licenses from rights statements, making rights statements a required field by default. You may need to update your translation files to use the new rights_statement_tesim instead of the old rights_tesim
  • Moved editable content blocks from homepage into dashboard settings UI
  • Improved ingest job pipeline, now agnostic with regard to whether ingest is happening in a single-filesystem context or a multi-node/cloud context
  • Improved support for nested data structures and controlled vocabularies in metadata fields, connecting GeoNames to the Location field and persisting both labels and URIs
  • Added a new background job for invoking the Fedora import-export tool
  • Granted all administrative users the ability to manage all administrative sets

Install Notes

If you are installing a new Hyrax application using Rails 5.1 and MySQL, you will want to use Hyrax 2.0.1 instead, which works around a bug in the MySQL ActiveRecord adapter.

Upgrade Notes

New database migrations

Generate new database migrations into your application and apply them:

rails hyrax:install:migrations
rails db:migrate

Work type-specific metadata changes

If you have customized the metadata in any generated work types (in app/models/YOUR_WORK_TYPE.rb), make sure that include ::Hyrax::BasicMetadata appears below any custom predicate definitions. If if appears above these, you can expect to see ActiveTriples::UndefinedPropertyError.

Catalog controller

The 'rights' field has been replaced with 'rights_statement' and 'license' in app/controllers/catalog_controller.rb. If you use the 'rights' field and want to use 'license' and 'rights_statement', you can apply these changes to your application's catalog controller: 7815f7a#diff-bdf859c784271d81391867ef1edf1f79

Reindex works

To fix #1769 (related to Review Submissions UI), the code that indexes workflow information needed to be changed to reflect that workflows are not shared among Admin Sets. You will need to reindex all of your works in Solr after upgrading to Hyrax 2.0.0.

User notifications

Please see the Hyrax Management Guide for a thorough discussion of this change, and what it will require. Of particular note: if you're upgrading from a prior version of Hyrax, there's a new config option you can add to config/initializers/hyrax.rb to disable/enable realtime user notifications:

  config.realtime_notifications = true

The default value, as above, is true. If you don't need realtime notifications in the browser, you can set this to false. Note also that if you deploy your Hyrax-based application under Passenger + Apache, you won't be able to use this feature. Hyrax is smart enough to detect when it's being deployed in this way, and will automatically turn this feature off and generate warnings so you're aware that the app has disobeyed you. Set this option to false in the Hyrax initializer to stop seeing this warning. Note that users will still see notifications with this feature off -- they just won't appear until the next page load/refresh.

Controller behavior modules removed

If you use to override a controller and include a module such as Hyrax::DownloadBehavior, you must switch to injecting your behavior on these classes instead, as the behavior modules have been eliminated.

You can do this by using Module#prepend. We recommend you do this in the to_prepare hook as it supports code reloading in development mode. For example:

 # config/application.rb
    config.to_prepare do
      Hyrax::DownloadsController.prepend MyCustomBehavior
    end

View changes

If you have overridden app/views/_user_util_links.html.erb in your application, you will need to replace the following line:

      <%= render 'hyrax/users/notify_number' %>

with:

     <%= render_notifications(user: current_user) %>

If you have overridden any of Hyrax's views or partials, please compare them to what is in Hyrax to look for changes you'll need to reflect in your overrides. You can do this comparison via a command like:

diff -srw app/views/ $(bundle show hyrax)/app/views/

Accessibility changes

To increase color contrast, you can use some Bootstrap SASS overrides that Hyrax provides by adding the following line above any Bootstrap-related imports in app/assets/stylesheets/hyrax.scss:

@import "bootstrap-default-overrides";

Rights Statements service

If your application code interacts with the rights statement service, this has been renamed from RightsStatements to RightsStatementService. Update these references to avoid breakages.

Search builder module changes

Those search builders that used to start with My (as well as the FindWorksSearchBuilder) have been moved to the My module (e.g. MyWorksSearchBuilder is now My::WorksSearchBuilder)

Administrative Set relationship

By default, Administrative Sets and their member objects use the Dublin Core Terms predicate isPartOf to express the membership relationship. Hyrax also allows use of a custom predicate for this relationship. To customize the predicate, point the Hyrax configuration option admin_set_predicate (in config/initializers/hyrax.rb) at another RDF term or a URI object.

Allowing customization is the first step towards changing the default predicate for this relation. After the 2.0.0 release, Hyrax will warn users about using isPartOf for this purpose and add migration tooling for production instances using isPartOf. The default will change in Hyrax 3.0.0.

Configuration options changed

A new configuration option has been added to restrict what directories can be used to upload files from BrowseEverything, whitelisted_ingest_dirs.

If you uncommented and set the configuration properties binaries_directory or descriptions_directory (which weren't actually used), you now need to set bagit_directory instead.

Additionally, the notifications_update_poll_interval configuration property has been removed.

A new configuration option has been added that allows you to control parameters of the file uploader. You can add this to your Hyrax initializer and, if you wish, uncomment the defaults and tweak it to match your needs:

  # Options to control the file uploader
  # config.uploader = {
  #   limitConcurrentUploads: 6,
  #   maxNumberOfFiles: 100,
  #   maxFileSize: 500.megabytes
  # }

File-related actors

The actor that used to act upon the :files attribute, AttachFilesActor, was removed as largely duplicative code and was subsumed into the CreateWithFilesActor. The actor stack now uses the :uploaded_files attribute, and expects it to contain Hyrax::UploadedFiles.

New locales

Re-generate your work types to pick up new translations via rails g hyrax:work YourWorkNameHere This will prompt you a number of times about overwriting files already in your application -- rely on version control here. You may want to have a clean (code) repository before running this task, so you can closely examine the differences.

Removed Deprecations from 1.x Release Series

Several methods and options deprecated during the 1.x release series are removed. These include:

  • max_days_between_audits is now max_days_between_fixity_checks;
  • always_display_share_button is now display_share_button_when_not_logged_in.
  • AssignRepresentativeActor was a no-op, and the class is removed.

Changes

v2.0.0.beta1...v2.0.0
1-0-stable...v2.0.0

Don't miss a new hyrax release

NewReleases is sending notifications on new releases.