icatproject / icat.server

The ICAT server offering both SOAP and "RESTlike" interfaces to a metadata catalog.
Other
1 stars 5 forks source link

Add a direct relationship between FacilityCycle and Investigation #259

Closed tomhayter closed 2 years ago

tomhayter commented 2 years ago

In ISIS we currently have some investigations that fall outside of FacilityCycle dates. These gaps in between cycles can last up to a few months. All investigations belong to a cycle, but it is difficult to calculate which FacilityCycle an Investigation belongs to based on it's date. This causes issues when users try to access these investigations in topcat/datagateway.

Adding a direct many-to-one relationship between Investigation and FacilityCycle would help us solve this problem. My proposal is to add a facilityCycle field to the Investigation table. This means that even if the dates don't always match up, an Investigation can still belong to a FacilityCycle.

RKrahl commented 2 years ago

Note that this relation did exist in ICAT 4.2.5. It has been removed in 4.3.0. I don't remember the reason.

I'm indifferent to adding it again. In any case, it should be optional, as there are facilities (HZB) that do not use FacilityCycle at all.

tomhayter commented 2 years ago

After a little more investigation it looks like it would make more sense at ISIS if Investigations belonged to multiple cycles, as some of our investigations run over multiple years. Therefore, I'd like to suggest we make the direct relationship between Investigation and FacilityCycle a many-to-many relationship by adding an InvestigationFacilityCycle join table.

agbeltran commented 2 years ago

Included in 5.0.0