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/ copy variables and plot attributes from one study period to the next #693

Open aislinnpearson opened 4 months ago

aislinnpearson commented 4 months ago

To make it easier to create a Study Plan for the long term experiments, we need to consider how to duplicate a study plan including the plots, variables boundaries.

Following an initial discussion with @paul121 and @mstenta this will be a separate, standalone step to duplicating plans (see #752). The ideal process here I think is also a bit simpler, but would again benefit from some discussion around functionality. Ideally I think the process would look something like the below:

  1. You can either upload your own variables (as at present) or there is a button to duplicate from a different plan
  2. If you opt to duplicate, you are asked to select which of the three files/ elements you want to duplicate. The logic here should be that you can i. copy the columns only from the plan you want to duplicate, and then upload your own column levels and plot attributes; or ii. copy both columns and column levels from the plan you want to duplicate, and then upload your own plot attributes; or iii. copy the columns, column levels and plot attributes from the plots you want to duplicate
  3. Regardless of the option selected this action should only be allowed once: i. The study plan has been created ii. The study plan has been given an experiment code iii. The plots have been created iv. The logic for checking the variable uploads should also remain the same (columns are checked against column levels, columns and column levels are checked against plot attributes, the number of plot attributes matches the number of plots)
  4. There should then be an additional box asking 'Do you want to duplicate the plot geometry' i. If yes, the plot geometry is copied across from the selected plan ii. If no, then you have the option to upload your own geometry or skip this step (e.g. if you want to upload plot geometry later). This is fully specified in issue #756
  5. Duplicating these elements should include a note to say which study plan (with revision version) the column, column levels and/or plot attributes have been copied from (similar to the functionality for duplicating proposals)

This needs to be considered in relation to issues described in #540 See also #743 (specifically this comment here) Duplicating experiment boundaries is specified in #757