hyrax: work.is_part_of metadata attribute usage in forms conflicts with AdminSet behavior
Descriptive summary
In Hyrax 2.x, isPartOf is used for AdminSet membership. If you create a Hyrax app that uses isPartOf and include it in a form, you’re unable to save the work and if you edit an existing object the property is replaced with a string.
Rationale
isPartOf is a common metadata term and it would be reasonable to think that institutions may want to have the term be editable in forms.
Expected behavior
Adding is_part_of to the work’s form object behaves like any other attribute.
Actual behavior
After adding work.is_part_of to the form:
Trying to save a new work that has a work.is_part_of
attribute raises this error:
Couldn't find Sipity::Workflow with [WHERE `sipity_workflows`.`active` = ? AND `sipity_workflows`.`permission_template_id` IN (SELECT `permission_templates`.`id` FROM `permission_templates` WHERE `permission_templates`.`admin_set_id` = '#<ActiveTriples::Resource:0x007f78451adc08>')]
Steps to reproduce the behavior
- In the work’s Form class add
is_part_of
toself.terms
- Save or edit a work
Related work
About this issue
- Original URL
- State: open
- Created 7 years ago
- Comments: 37 (34 by maintainers)
Commits related to this issue
- Allow configuration of the predicate used for AdminSet inclusion Allow a custom predicate to be used to relate objects to their administrative sets. The default remains `dcterms:isPartOf`. This is th... — committed to samvera/hyrax by deleted user 7 years ago
- Index admin_sets using the configured predicate Fixes #2405. Connected to #1461 — committed to samvera/hyrax by no-reply 5 years ago
- Index admin_sets using the configured predicate Fixes #2405. Connected to #1461 — committed to samvera/hyrax by no-reply 5 years ago
- Index admin_sets using the configured predicate Fixes #2405. Connected to #1461 — committed to samvera/hyrax by no-reply 5 years ago
- Test `Hyrax::BasicMetadata` There are two changes to `BasicMetadata` between `CurationConcerns` 1.7.x and `Hyrax` 2.3.x: - `dc:isPartOf` is now bound to AdminSets by default; (see: https://git... — committed to scientist-softserv/atla_digital_library by deleted user 6 years ago
@elrayle @mark-dce @no-reply @jlhardes cc: @vantuyls Good points, all.
I’m hesitant to change the default this late in the release process of 2.0.0. Could we address this via documentation in the meantime, letting folks know of collection extension changes that are coming and recommending usage of the community-preferred predicate (from @mark-dce’s
2.
above)? If so… we need to figure out what the community-preferred predicate is, i.e., have a process for getting this done and a volunteer for taking the lead.@mjgiarlo - The DCE team would like to make a counter-proposal that might allow us to approach the issue in a more incremental and flexible way:
PHASE ONE As part of the Hyrax 2.0.0 release
::RDF::Vocab::DC.isPartOf
)This is sufficient to meet the needs of the Greenfield 2.x adopters who wish to use
DC.isPartOf
as part of their own modeling, and use a different predicate for AdminSet relationships. At the same time, it does not interfere with users migrating production implementations from Hyrax 1.x based repositories.PHASE TWO At a later date in the 2.x release stream 3. Select a more narrowly defined predicate, perhaps something as specific as
::RDF::Vocab::Samvera.belongsToAdminSet
4. Provide a deprecation notice that the usage will be changed in 3.x 5. Provide migration tooling as described in Mike’s comment aboveThis allows folks with existing 1.x based implementation to plan a scheduled data (predicate) migration independently of updating their application to use the 2.x codebase. The sooner we can do steps 3 and 4 the better, but the wouldn’t have to be in place at the 2.0.0 release. The hardest part here might be reaching consensus on the new predicate.
PHASE THREE As part of the 3.0.0 release 6. Change the default for the predicate used internally to indicate AdminSet membership to something other than
DC.isPartOf
If folks want to carry forward the use of
DC.isPartOf
from their 1.x or 2.x implementation, they’re free to keep the default configuration they’ve been using. Greenfield deployers of 3.0.0 get a more narrowly defined predicate for the AdminSet relationship when the application is initially generated.=========== DCE can definitely signs up for PHASE ONE. We can probably help on a significant portion of PHASE TWO. After that, PHASE THREE feels almost trivial (other than remembering to do it).
I like @mark-dce’s breakdown and phased implementation. It makes sense to narrow the administrative scope of this predicate
@mjgiarlo yes, folks obviously could use a different predicate; however, none that we are aware of, stand out as obvious or clear candiates. Hence this ticket.
We’ve discussed alternatives internally to DCE and have not come up with useful alternatives - partially because the specific current use case also implements dc.has_part, dc.has_format, dc.is_format_of, dc.replaces, and dc.is_replaced_by. In this broader context, using a non-dc predicate for is_part_of (because of the collision with internal Admin Set use) breaks a clear pattern present with other descriptive metadata - i.e. there’s a clear parallelism when describing things using dc.is_part_of / dc.has_part that is broken when you use other_vocab.is_subunit_of / dc.has_part.
I guess my questions would be “How much are AdminSets meant to be externally referenced or to support behavior outside the repository?” and “Are there characteristics of the AdminSet relationship that would be more clearly represented by a narrower or application specific predicate?”
If the AdminSet relations are meant to be first class relationships that are actionable outside of Samvera, then dc.is_part_of probably does make sense. If AdminSets really aren’t meaningful outside the context of Samvera and it’s workflows, then I’d lobby to free up the current predicate and choose something more narrowly defined.