GGCE Server issueshttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues2020-05-26T17:17:01+02:00https://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/21Register new Cooperator2020-05-26T17:17:01+02:00Matija ObrezaRegister new CooperatorExtend the `CooperatorController` with `add`, `update` and `delete` methods.Extend the `CooperatorController` with `add`, `update` and `delete` methods.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/25ES Client2020-05-28T15:55:05+02:00Matija ObrezaES ClientThe HighLevelRestClient seems to pool connections and they get closed by ES, resulting in:
![image](/uploads/21c9fd5f6c49aab44bd825dba14a8904/image.png)
This is the same as reported in genesys-pgr/genesys-server#521
Any ideas how to m...The HighLevelRestClient seems to pool connections and they get closed by ES, resulting in:
![image](/uploads/21c9fd5f6c49aab44bd825dba14a8904/image.png)
This is the same as reported in genesys-pgr/genesys-server#521
Any ideas how to manage reconnecting and timeouts better?1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/26Retrieve AccessionDetails2020-06-04T11:27:09+02:00Matija ObrezaRetrieve AccessionDetailsAdd API endpoint at */a/details/{id}* that loads accession and related data and returns `AccessionDetails`:
```java
class AccessionDetails {
@JsonWrapped
Accession accession;
List<AccessionSource> sources;
List<AccessionAction> act...Add API endpoint at */a/details/{id}* that loads accession and related data and returns `AccessionDetails`:
```java
class AccessionDetails {
@JsonWrapped
Accession accession;
List<AccessionSource> sources;
List<AccessionAction> actions;
List<AccessionIpr> ipr;
List<AccessionPedigree> pedigree;
List<AccessionQuarantine> quarantine;
List<Citation> citations;
}
```1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/29Empty caches2020-06-07T00:34:14+02:00Matija ObrezaEmpty cachesAdd admin action to empty caches. Copy from Genesys.Add admin action to empty caches. Copy from Genesys.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/30File repository2020-06-07T09:22:18+02:00Matija ObrezaFile repositoryIntegrate `file-repository` and `ImageGalleryAspects`.Integrate `file-repository` and `ImageGalleryAspects`.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/31AccessionDetails with AccessionInvAttach2020-06-07T10:33:27+02:00Matija ObrezaAccessionDetails with AccessionInvAttach#30 adds file repository support and we should add `AccessionInvAttach` to `AccessionDetails`.#30 adds file repository support and we should add `AccessionInvAttach` to `AccessionDetails`.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/28Actions2020-06-10T18:39:21+02:00Matija ObrezaActionsgrin-global/grin-global-ui#27 is a use case that relies on `RequestOrderItemAction` and we need new APIs to manage action records.
## Superclass
We have a number of `...Action` entities (e.g. `InventoryAction`, `AccessionAction`, `Requ...grin-global/grin-global-ui#27 is a use case that relies on `RequestOrderItemAction` and we need new APIs to manage action records.
## Superclass
We have a number of `...Action` entities (e.g. `InventoryAction`, `AccessionAction`, `RequestOrderItemAction`, `RequestOrderAction`) that can extend from a new `@MappedEntity` superclass `AbstractAction`.
The `@ManyToOne` entity that owns the action should always be serialized as id.
## Services and API
Actions are identified by the `actionNameCode`. These are declared as `CodeValue`. We should not use `@PathVariable` because we cannot assure values are sensible.
We want to record in the system that an action was initiated (`startedDate = now()`) and that an action was completed (`completedDate = now()`).
Add API endpoints to **add** action records for request orders as a demo:
- POST */order/action/start*
- POST */order/action/complete*
- POST */order/action/reopen* (resets `completedDate` to null and `startDate = now()` on the last action only)
The API should receive a set of IDs of `RequestOrder` (or `RequestOrderItem`) and the action data. This could probably be a small utility class:
```java
{
public String actionNameCode; // action code
public Set<Long> id; // entities
// data
public Double actionCost;
public String actionInformation;
public String actionNameCode....
}
```
# Listing actions
We want to retrieve action records by entity ID set (and optionally `actionNameCode` and `closed`):
- POST */order/action/list*
This returns all `RequestOrderAction` records where
```java
RequestOrder.id.in(entityIds)
// if actionNameCode
.and(RequestOrderAction.actionNameCode.eq(actionNameCode)
// if closed
.and(....completedDate.notNull())
// if ! closed
...completedDate.isNull()
```
The filter object:
```java
public class ActionFilter {
public Set<String> actionNameCode; // action code
public Set<Long> id; // entities
public Boolean closed;
}
```
1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/36Genesys import with crops2020-06-11T09:08:59+02:00Matija ObrezaGenesys import with cropsMappings of crops to taxonomy should be imported from Genesys.
It should add records to `TaxonomyCropMap`.Mappings of crops to taxonomy should be imported from Genesys.
It should add records to `TaxonomyCropMap`.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/37Add disclaimer2020-06-12T09:20:45+02:00Matija ObrezaAdd disclaimerAdd a disclaimer to README, just in case it is not clear.Add a disclaimer to README, just in case it is not clear.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/33Liquibase migration error2020-06-12T10:41:36+02:00Oleksii SavranLiquibase migration error```
11:03:23,704 main WARN AnnotationConfigWebApplicationContext:558 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with n...```
11:03:23,704 main WARN AnnotationConfigWebApplicationContext:558 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'databaseMigration' defined in org.gringlobal.application.config.DatabaseConfig: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set classpath:liquibase/liquibase-changeLog.yml::1591376792000-2::mobreza:
Reason: liquibase.exception.DatabaseException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delete from oauthclient; delete from acl_sid;
set identity_insert acl_sid on; in' at line 1 [Failed SQL: (1064) delete from oauthclientrole; delete from oauthclient; delete from acl_sid;
set identity_insert acl_sid on; insert into acl_sid (id, type, version, active, principal, sid, createdDate, lastModifiedDate) (select sys_user_id, 1, 1, iif(is_enabled = 'Y', 1, 0), 1, user_name, created_date, modified_date from sys_user);
declare @max_sid bigint; select @max_sid = max(id) from acl_sid; insert into acl_sid (id, type, version, active, principal, sid, createdDate, lastModifiedDate) (select web_user_id + @max_sid, 3, 1, 1, 1, user_name, created_date, modified_date from web_user); set identity_insert acl_sid off;]
11:03:23,721 main ERROR ContextLoader:313 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'databaseMigration' defined in org.gringlobal.application.config.DatabaseConfig: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set classpath:liquibase/liquibase-changeLog.yml::1591376792000-2::mobreza:
Reason: liquibase.exception.DatabaseException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delete from oauthclient; delete from acl_sid;
set identity_insert acl_sid on; in' at line 1 [Failed SQL: (1064) delete from oauthclientrole; delete from oauthclient; delete from acl_sid;
set identity_insert acl_sid on; insert into acl_sid (id, type, version, active, principal, sid, createdDate, lastModifiedDate) (select sys_user_id, 1, 1, iif(is_enabled = 'Y', 1, 0), 1, user_name, created_date, modified_date from sys_user);
declare @max_sid bigint; select @max_sid = max(id) from acl_sid; insert into acl_sid (id, type, version, active, principal, sid, createdDate, lastModifiedDate) (select web_user_id + @max_sid, 3, 1, 1, 1, user_name, created_date, modified_date from web_user); set identity_insert acl_sid off;]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
```
cc @mobrezaMatija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/38Update Geography2020-06-13T20:41:46+02:00Matija ObrezaUpdate GeographyThe `.cab` file contains geography and region data. Import that to local database.The `.cab` file contains geography and region data. Import that to local database.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/27Site locations2020-06-15T12:34:52+02:00Matija ObrezaSite locationsA controlled list of available storage locations for a `Site` helps users with picking valid locations of *Inventory* recors.
Add a new entity `SiteLocation` with:
```java
class SiteLocation extends EmptyModel {
Long id;
Site site;
...A controlled list of available storage locations for a `Site` helps users with picking valid locations of *Inventory* recors.
Add a new entity `SiteLocation` with:
```java
class SiteLocation extends EmptyModel {
Long id;
Site site;
@Column(name = "storage_location_part1", length = 20, nullable = false)
private String storageLocationPart1;
@Column(name = "storage_location_part2", length = 20)
private String storageLocationPart2;
@Column(name = "storage_location_part3", length = 20)
private String storageLocationPart3;
@Column(name = "storage_location_part4", length = 20)
private String storageLocationPart4;
}
```
Only administrator can create, modify and delete `SiteLocation` records, but all can read.
The filter class:
```java
class SiteLocationFilter {
long site; // site id
Set<String> storageLocationPart1; // multiple values
Set<String> storageLocationPart2; // ..
Set<String> storageLocationPart3;
}
```
Add model, filter, repository, filtered CRUD service and extends SiteController API.
## Additional properties
We also wish to record the "type" of storage location. This can be one of `LTS`, `MTS`, `Cryo`, `TC`, `Backup`, ... We will use `CodeValue` group **LOCATION_TYPE**, in the database this is `@Column(length=20) String locationType`.
1.0Edwin RojasEdwin Rojashttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/40Inventory details2020-06-15T15:26:58+02:00Matija ObrezaInventory detailsAdd `InventoryDetails` for grin-global/grin-global-ui#35Add `InventoryDetails` for grin-global/grin-global-ui#351.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/42Genebank reporting2020-06-16T18:31:13+02:00Nora Castaneda-AlvarezGenebank reportingWe want to enable partners to report on several genebank management aspects, using information recorded in GG. Partners should be able to report on:
* Availability of selected crop collections - accession level.
* Security (safety dupl...We want to enable partners to report on several genebank management aspects, using information recorded in GG. Partners should be able to report on:
* Availability of selected crop collections - accession level.
* Security (safety duplication) - accession level.
* Data availability - accession level.
* Distribution - accession level.
Some considerations to look upon are:
1. Availability is estimated on four variables:
* health - conducted at inventory level.
* viability - conducted at inventory level.
* quantity sufficiency - conducted at inventory level.
* legal status - defined at accession level.
2. Distribution: we also ask genebanks to report on:
* type of recipient
* country of recipient
* distinguish between internal vs. external recipients (same institution or not)
* exclude material sent to safety duplication
* type of germplasm (SAMPSTAT)
* distribution of subsets
* purpose of the requestor
3. Storage: we ask genebanks about the storage of inventory/accessions.
4. Security: we ask genebanks to report on the places where they have sent material for safety duplication.
How to summarize inventory level to report at accession level?
5. We also want to know how many viability tests are conducting per year.
6. We want to know the number of accessions/inventory (?) regenerated and characterized per year.
7. We want to know the number of requests received annually.
8. We want to know the total number of accessions and number of unique accessions distributed annually.
Here is the table of indicators and targets applicable to Seeds for Resilience (indicators 1,2,3,5,11 are potentially estimated through GG):
| | **Indicator** | **Target at year 5** |
|----|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------:|
| 1 | **Availability:** % collection which is clean of pathogens of quarantine risk, viable, and in sufficient quantity to be immediately available for international distribution from medium-term storage (or local distribution for some tree species). | 90% accessions available |
| 2 | **Security:** For seed crops: % collection held in long-term storage at two locations and also in Svalbard Global Seed Vault (except for tree species). For clonal crops: % of the collection held in long-term storage or cryopreservation at two locations; % of the collection held in slow growth conditions in vitro at two locations | 90% seed accessions safety duplicated 50% clonal accessions in cryo-preservation; Intermediate target 90% accessions duplicated in in vitro |
| 3 | **Data availability** | Passport: PDCI >6 Characterization: 100% accessions with characterization data |
| 5 | **Distribution:** % of annual requests for seed samples from users successfully serviced | 80% relevant requests serviced annually |
| 11 | Number of user requests for seed samples | 100 |Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/48Drop USDA-specific models2020-06-16T23:33:57+02:00Matija ObrezaDrop USDA-specific modelsRemove models inherited from the *Original* database.Remove models inherited from the *Original* database.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/53Add max rows limit to Dataview2020-06-19T11:49:49+02:00Matija ObrezaAdd max rows limit to DataviewAdd a limit on maximum number of rows that the server will return when using Dataviews.
Add configuration variable `dataview.max.rows=100000`.Add a limit on maximum number of rows that the server will return when using Dataviews.
Add configuration variable `dataview.max.rows=100000`.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/50Error on closing CT2020-06-20T09:02:54+02:00Matija ObrezaError on closing CT@lsison Reports an error when closing the CT main window:
![image](/uploads/49e77938df4939059048fbe784dc45e2/image.png)@lsison Reports an error when closing the CT main window:
![image](/uploads/49e77938df4939059048fbe784dc45e2/image.png)1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/57Stream logs2020-06-23T10:05:26+02:00Matija ObrezaStream logsAdd an admin controller that will stream log messages in plain/text response to the client.
1. Attach a `logAppender` to root logger
1. Forward messages and `flush` every message
1. When the client cancels the request (IOException), mak...Add an admin controller that will stream log messages in plain/text response to the client.
1. Attach a `logAppender` to root logger
1. Forward messages and `flush` every message
1. When the client cancels the request (IOException), make sure to detach the appender.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/56Logger controller2020-06-23T17:21:40+02:00Matija ObrezaLogger controllerBring admin `LoggerController` from Genesys.
Add Logger display and editing to administration pages.Bring admin `LoggerController` from Genesys.
Add Logger display and editing to administration pages.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/34Generating the initial schema2020-06-24T08:31:08+02:00Matija ObrezaGenerating the initial schemaPlease test the instructions to generate the database schema when the MSSQL database is completely empty.
Start with a blank MSSQL docker container:
```sh
docker volume create mssql-gg-data
docker run --name 'mssql-gg' -e 'ACCEPT_EULA=...Please test the instructions to generate the database schema when the MSSQL database is completely empty.
Start with a blank MSSQL docker container:
```sh
docker volume create mssql-gg-data
docker run --name 'mssql-gg' -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=YourStrong@Passw0rd' -e 'MSSQL_PID=Express' -e 'TZ=UTC' -v mssql-gg-data:/var/opt/mssql mcr.microsoft.com/mssql/server:2019-latest
```
Document how to:
1. Create a database `gg-ce-dev`
1. Execute liquibase to generate the schema in `gg-ce-dev` (see README and liquibase.properties)1.0Oleksii SavranOleksii Savran