Skip to content

Viability: Start date of test

GG database schema has testedDate which represents the end date of the test, but does not have one for the start of test. By including started_date we can display the number of days the sample has been in the test, making it easier to follow the protocol.

Add to InventoryViabiltiy:

/**
 * The date when viability test was started and seeds sown.
 */
@Basic
@Column(name = "started_date", nullable = true)
private LocalDate startedDate;

/**
 * The duration of the test since its start (in days)
 */
@IgnoreField
@Formula("datediff( day, started_date, isnull( tested_date, CURRENT_TIMESTAMP) )")
private Integer durationInDays;

Note the use of LocalDate. I'd like to see if it also works with the SOAP protocol.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information