DataConservancy / dcs-packaging-tool

The Data Conservancy Packaging Tool
http://dataconservancy.github.io/dcs-packaging-tool
2 stars 3 forks source link

Inheritance not properly working #21

Open rduerr opened 7 years ago

rduerr commented 7 years ago

I noticed today that the inheritance function does not always work properly. In particular, where it says that the discipline will be inherited, that never happens as far as I can tell.

emetsger commented 7 years ago

I can confirm this behavior, but I think it's even worse: I don't think that the discipline is ever persisted on the Collection in the first place.

I can select a Discipline on a Collection, and select Apply. When I open the properties on the Collection, the Discipline is reset to "Life Sciences", presumably the default.

emetsger commented 7 years ago

Ok, I take back what I said earlier. It was based on my mis-understanding of how the PTG works in this case.

I can confirm this behavior, but I think it's even worse: I don't think that the discipline is ever persisted on the Collection in the first place.

This is a red-herring, and documented (#40) as a usability issue. I wasn't selecting a sub-discipline, so it was never persisted.


I can confirm that as of version 1.0.5-SNAPSHOT that disciplines are indeed persisted, but it was a little mind-bending to figure out.

First, you have to properly select a discipline and a sub-discipline:

screen shot 2017-04-20 at 3 26 33 pm

Secondly, scroll down and select "Discipline" as an inherited field:

screen shot 2017-04-20 at 3 27 26 pm

Finally, one has to understand that "Discipline" is a property that holds for the Collection type only: DataItems, DataFiles, etc. don't carry that property at all, so any "Discipline" values set on a parent Collection won't affect them. Only sub Collections will have the "Discipline" property inherited.

Here, the top-level Collection "Catalogs" has been set to propagate its Discipline "Animal Sciences" to the sub Collection (checkbox not shown in graphic):

screen shot 2017-04-20 at 3 26 33 pm

And, indeed, the sub Collection carries the inherited value:

screen shot 2017-04-20 at 3 30 21 pm

Note: the sub-Collection has two Discipline values because I had added "Enotomology" directly to the sub Collection earlier (and value propagated by the parent Collection added the "Animal Sciences" to it).

emetsger commented 7 years ago

@rduerr whenever you have time, can you confirm that inheritance is working? And/or feel free to comment on how you would like it work better, or what your expectations as a user are when you select a property for inheritance. Thanks!!