Rothamsted-Ecoinformatics / farm_rothamsted

Custom farmOS features for Rothamsted Research.
GNU General Public License v2.0
6 stars 1 forks source link

Experiment Module: Duplicate Plans #752

Open aislinnpearson opened 1 month ago

aislinnpearson commented 1 month ago

Hi @paul121,

Following on from this comment I have made an issue below for duplicating the plan and then edited #693 for duplicating the variables/ geometry. Perhaps we need to also create an issue for duplicating experiment boundaries (see below).

Please be aware this is very much my first attempt at specifying the functionality for duplicating Plans. Really more an observation of what needs to happen for different data fields.

Starting with the easy/ obvious data fields:

Status: This is easy. Any duplicated plan should be in Planning (we don't really use 'Requested' - if the associated proposal has been approved, the Study is in planning).

Blank fields: Again this was easy. The following data fields should appear blank in any duplicated study plan:

Then it gets a bit more complicated and I get a bit confused. Here I am hoping we can discuss the functionality available and it might become a bit clearer:

Unique data fields: The following data fields needs to be unique from previous studies:

Possibly duplicated fields, depending on user preference: Then there needs to be the option to copy across some data fields (alternatively they appear blank). Ideally you'd be able to see the existing data in the plan you have selected to copy: Design (but a required field...) Crops Cost code Cost allocation Location Assets (but see notes below on the experiment boundary) Files (i.e. those files previously uploaded) Images (i.e. those images previously uploaded) Links (including experiment file and experiment plan)

Experiment boundaries: In addition, we would ideally give the option to copy the geometry of the experiment boundary (the name is pulled from the study code and the location. Maybe this should be a separate step (and so a separate issue?). It is also related to #688

For the implementation, I wonder if we should stick with a simple 'duplicate' button for now (as per the plans). I can see this getting more complicated with #500

As an aside, and a separate issue to discuss, i was wondering if we can visualise variables from multiple plans on the designs (so they are uploaded, but you can look at a design and see which plans use the same variables and where they differ). Probably something to monitor for now, i was just curious about the feasibility.