Skip to content

Sufia 7.3.0

Compare
Choose a tag to compare
@jcoyne jcoyne released this 13 Feb 21:31
· 25 commits to master since this release
8bb4514

Sufia 7.3.0 is a feature-packed release. Now you can:

  • Create and use multiple work types, not just the previously pre-packaged "GenericWork" type
  • Use mediated deposit workflow -- and build your own custom workflows -- in addition to self-deposit and proxy deposit
  • Configure the banner image without needing to override views
  • Assign visibility and release information (automatically) to works deposited into administrative sets via "permission templates"
  • Add depositors to administrative sets
  • Add child works to other works

Due to more and earlier quality assurance testing, this release also includes many bug fixes, including the following notable changes to the Save Work form:

  • No longer submits when uploads are still in progress
  • Uses optimistic locking to prevent an earlier form from submitting if the object has changed since the form was loaded

Thanks to the many folks who've contributed to this release by providing use cases, documentation, tickets, design expertise, and the myriad ways that we pull together as a community, including the following developers (and their managers) for contributing to this release:

REMINDER: Ordering changes

Sufia 7.3.0 includes Rails 5 support, and also includes support for RDF 2 which fixes a long-standing bug in ActiveFedora that returned RDF statements in a predictable, though not directly alterable, order. The new behavior, which is correct for graphs that have not been explicitly ordered, is such that if an item has (e.g.) more than one title, the first title may change whenever the item is loaded.

If your application depends upon the old behavior of predictable, but arbitrary and unchangeable, ordered RDF graphs, you can add gem 'rdf', '~> 1.99' to your Gemfile, and ordering will be "preserved" in its current form. (You may also need to pin rdf-reasoner as follows: gem 'rdf-reasoner', '0.3.0')

Install Notes

After installing Sufia 7.3.0 (per the README), create the default administrative set after Fedora and Solr are running:

rake sufia:default_admin_set:create

Note this task will fail if you have not loaded workflows.

Upgrade Notes

Gemfile

Sufia 7.3.0 no longer depends upon a fork of Flipflop. If your Gemfile includes Flipflop directly, you should remove that dependency and let Sufia handle it directly. This is especially true if your Gemfile is pointing at a GitHub link like so:

# We DON'T want this. Remove it.
gem 'flipflop', git: 'https://github.com/jcoyne/flipflop.git', branch: 'hydra'

You shouldn't need to pin to a particular version of CurationConcerns, so if you have an entry in your Gemfile for CC, you ought to be able to remove it. (Sufia should pick up the latest 1.7.x release of CurationConcerns automatically.)

Sufia 7.3.0 has been tested with Rails versions 4.2.7.1, 5.0.0.1, and 5.0.1, so if your application is pinned to an earlier version of Rails, you will want to upgrade Rails.

This release removes support for BlacklightAdvancedSearch, so unless you know your application doesn't need it, add the following line to your Gemfile:

gem 'blacklight_advanced_search', '~> 6.0'

Then, update your Gemfile to point Sufia at version 7.3.0, and run bundle update sufia

Database structure

  • Create the new tables:
rake curation_concerns:install:migrations
rake sufia:install:migrations
rake db:migrate

Collections

Reindex your repository in Solr to pick up a fix to collection icons. If you don't already have a better way to do this, drop into a Rails console and run:

ActiveFedora::Base.reindex_everything

(And wait.)

Workflows

  • Grab the workflows from Sufia and CC:
mkdir config/workflows/
wget -O config/workflows/default_workflow.json https://raw.githubusercontent.com/projecthydra/curation_concerns/v1.7.4/lib/generators/curation_concerns/templates/workflow.json.erb
wget -O config/workflows/one_step_mediated_deposit_workflow.json https://raw.githubusercontent.com/projecthydra/sufia/v7.3.0.rc1/lib/generators/sufia/templates/workflow.json.erb
  • Load the default worklows: rake curation_concerns:workflow:load (note that you'll want to run this at point of deployment as well, to make sure all your instances have the workflows loaded)
  • If you are upgrading from Sufia 7.3.0.rc1 or an earlier post-7.2.0 master build, you'll want to migrate existing workflows by running rake sufia:migrate:from_7_3_0rc1_release. (If you're not sure if you need to do this, you should be able to run it without any negative side effects.)
  • You may also want to run Sipity::Workflow.find_by_name('default').update(allows_access_grant: true) which will allow the user, using the selected workflow, to share their uploaded works.

Default Admin Set

After loading workflows you should create a default admin set. Assuming Fedora and Solr are running, create the default administrative set :

rake sufia:default_admin_set:create

Models

  • Re-run rails generate sufia:work MyWorkType for your primary work type in order to generate the required internationalization keys. (See #2845.) Respond 'n' to any overwrite prompts.
  • If you see multiple include Sufia::WorkBehavior lines in app/models/my_work_type.rb, remove the newly added one.
  • If you see multiple self.human_readable_type = 'Whatever' lines in app/models/my_work_type.rb, remove the less specific one.
  • If you see a new self.terms line in app/forms/curation_concerns/my_work_type_form.rb, remove it.

Routes, controllers, views

Optional

  • All deposited works now belong to an AdminSet. If you do not create any AdminSets and specify the relationship at time of creation, they will be added to a default AdminSet. There is now a rake task available to add all existing works to the default AdminSet, if you want to send those works through workflow at a later date:
rake sufia:migrate:move_all_works_to_admin_set
  • There's a new config value to set the location carrierwave uses to store uploaded files before the upload form is submitted. You can set cache_path in your sufia initializer to customize this location.

Changes

v7.2.0...v7.3.0