GGCE Server issueshttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues2020-01-24T20:36:26+01:00https://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/1Implement CI2020-01-24T20:36:26+01:00Matija ObrezaImplement CI1. Package the project
1. Build docker image1. Package the project
1. Build docker imageMatija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/2Accession API2020-02-18T09:22:04+01:00Matija ObrezaAccession APIAdd API endpoints to:
- register new accessions
- list accessions using `AccessionFilter`
- delete accessionsAdd API endpoints to:
- register new accessions
- list accessions using `AccessionFilter`
- delete accessions1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/3Project introduction2020-02-15T19:09:00+01:00Matija ObrezaProject introduction@mborodenko Please get familiar with this codebase.@mborodenko Please get familiar with this codebase.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/4Add model Filters2020-02-14T15:49:57+01:00Matija ObrezaAdd model FiltersAdd `*Filter` classes for `Accession`, `Inventory` and `Taxonomy`.
Implement `*Service` for these three with:
- `list(Filter, Pageable)`
We may need to copy over the `ShortFilterService` code.Add `*Filter` classes for `Accession`, `Inventory` and `Taxonomy`.
Implement `*Service` for these three with:
- `list(Filter, Pageable)`
We may need to copy over the `ShortFilterService` code.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/5ACL Security2020-07-09T13:43:17+02:00Matija ObrezaACL Security`Cooperator` is the primary ACL SID **principal** in GRIN-Global. `SysGroup` is an **authority** (`! principal`).
`SysUser` (and eventually `WebUser`) implement Spring `UserDetails` and can authenticate against the server, but they are ...`Cooperator` is the primary ACL SID **principal** in GRIN-Global. `SysGroup` is an **authority** (`! principal`).
`SysUser` (and eventually `WebUser`) implement Spring `UserDetails` and can authenticate against the server, but they are not SIDs. We need a custom `SidRetrievalStrategy sidRetrievalStrategy` added to `SecurityConfig#aclAuthorizationStrategy()` to fetch the `Cooperator` from the Spring authentication object.
Our `UserServiceImpl` already loads authorities for `SysUser` after login.
## Original GG Permissions
There is no ACL inheritance in the original GG. Permissions need to be granted explicitly to each object. From [CT Manual # Security](https://www.grin-global.org/docs/gg_curator_tool_user_guide.pdf):
> Currently the inheritance only cascades one level. This implies that it may be necessary for you to establish certain permissions at the accession level, and then again at the inventory level.
There is no inheritance, permissions must be set explicitly on every object.
## ACL version
`Accession` inherits permissions from the `Site` of the owner of the record: `.owner.site`.
`Inventory` inherits permissions from its `inventoryMaintenancePolicy`. Whoever has permissions on the policy, has permissions on the inventory. The inventory is therefore detached from the `Accession` in terms of security. `InventoryMaintenancePolicy` can be linked to a `Site` through its `.owner.site`.
Cooperator can link to one single site. That means that any accessions and policies she owns are attached to the single site. Site permissions apply.
Therefore, if a cooperator is assigned to a new site, all the associated accessions and inventories "move" from the original site to the new site. As permissions in the original GG are not inherited and must be granted explicitly to other users, this is a non-issue in the old system.
1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/6Jetty 9.4.272020-03-03T09:38:07+01:00Matija ObrezaJetty 9.4.27Switch to jetty 9.4.27 when released.Switch to jetty 9.4.27 when released.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/7Application configuration API2020-02-19T15:37:13+01:00Matija ObrezaApplication configuration APIAfter login, the client needs some basic information from the server. Add API endpoints to `AppController` at */app*:
### `/app/code/{lang}`
Retrieve all `CodeValue` entries and the `CodeValueLang` translations for specified language.
...After login, the client needs some basic information from the server. Add API endpoints to `AppController` at */app*:
### `/app/code/{lang}`
Retrieve all `CodeValue` entries and the `CodeValueLang` translations for specified language.
Maybe add a new class that wraps `CodeValue` + `title` and `description` from `CodeValueLang`.
### `/app/resource/`
Retrieve all `AppResource` entries.
### `/app/setting/`
Retrieve all `AppSetting` entries.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/8GRIN Taxonomy2020-02-18T10:33:05+01:00Matija ObrezaGRIN TaxonomyUpdate local database with GRIN Taxonomy data.Update local database with GRIN Taxonomy data.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/9Update documentation2020-02-18T19:30:08+01:00Matija ObrezaUpdate documentationDocument defaults and featuresDocument defaults and features1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/10Upgrade spring and java2020-02-28T09:52:31+01:00Matija ObrezaUpgrade spring and javaCan we upgrade to Spring 5.
Check that we have jetty docker images available.Can we upgrade to Spring 5.
Check that we have jetty docker images available.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/11Upgrade Java2020-07-28T11:35:10+02:00Matija ObrezaUpgrade JavaUpgrade to the newer version of Java.Upgrade to the newer version of Java.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/12ElasticSearch2020-04-08T17:54:32+02:00Matija ObrezaElasticSearchAdd support for entity indexing with ES.
Genesys uses a good approach to indexing with ES and I don't think we use many of the spring-data-elastic features.
Use a more recent version of ES (Genesys is on 2.7).
Top-level entities for ...Add support for entity indexing with ES.
Genesys uses a good approach to indexing with ES and I don't think we use many of the spring-data-elastic features.
Use a more recent version of ES (Genesys is on 2.7).
Top-level entities for indexing: `Accession`, `TaxonomyGenus`, `TaxonomySpecies`.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/13Resize Cooperator.organization2020-04-02T07:17:09+02:00Matija ObrezaResize Cooperator.organizationCan we increase the size of the organization field in dbo.cooperator table? There are some cooperators whose organization names have a length > 100.Can we increase the size of the organization field in dbo.cooperator table? There are some cooperators whose organization names have a length > 100.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/14Site controller2020-04-09T17:46:43+02:00Matija ObrezaSite controllerAdd `SiteService` and an API controller for `Site` at */site* with.
- `list(SiteFilter, pagination)` (don't use short filters)
- `create`
- `update`
- `remove`
Create, update, remove require admin permission.
Add unit test for the `Si...Add `SiteService` and an API controller for `Site` at */site* with.
- `list(SiteFilter, pagination)` (don't use short filters)
- `create`
- `update`
- `remove`
Create, update, remove require admin permission.
Add unit test for the `SiteService` and a unit test for the `SiteController`.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/15Maintenance Policy controller2020-05-12T08:33:24+02:00Matija ObrezaMaintenance Policy controllerAdd service and the API controller for `InventoryMaintenancePolicy` at */i/maintenance*:
* `list(InventoryMaintenancePolicyFilter, pagination)` (don't use short filters)
* `create`
* `update`
* `remove`
No permission checks.
Add servi...Add service and the API controller for `InventoryMaintenancePolicy` at */i/maintenance*:
* `list(InventoryMaintenancePolicyFilter, pagination)` (don't use short filters)
* `create`
* `update`
* `remove`
No permission checks.
Add service and API unit tests.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/16EmptyModel as base class2020-04-08T18:21:54+02:00Matija ObrezaEmptyModel as base classgenesys-pgr/application-blocks#37 adds `EmptyModel`. Update models to extend from this class.genesys-pgr/application-blocks#37 adds `EmptyModel`. Update models to extend from this class.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/18Accessing API with Swagger2020-04-30T09:26:47+02:00Matija ObrezaAccessing API with SwaggerSwagger UI doesn't use the tokens after authentication.Swagger UI doesn't use the tokens after authentication.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/19Updates for Spring and Hibernate2020-05-13T08:48:33+02:00Matija ObrezaUpdates for Spring and HibernateWe recently addressed some key issues introduced with Spring and Hibernate in Genesys.
Update this code with fixes from Genesys.
Example: `FilteredPage` serialization, `Sort` serializer, etc.We recently addressed some key issues introduced with Spring and Hibernate in Genesys.
Update this code with fixes from Genesys.
Example: `FilteredPage` serialization, `Sort` serializer, etc.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/20Controller for Orders2020-05-20T13:35:25+02:00Matija ObrezaController for OrdersAdd service to manage requests for material (`OrderRequest`).
Add controller at `/order` to create, list and manage orders. Adding and removing items `OrderRequestItem` needs separate endpoints.
Creating a new order request requires th...Add service to manage requests for material (`OrderRequest`).
Add controller at `/order` to create, list and manage orders. Adding and removing items `OrderRequestItem` needs separate endpoints.
Creating a new order request requires the `finalRecipientCooperator`, but we would also like to provide initial values for other fields in `OrderRequest`.
From the client perspective, it would be convenient to call `createOrder(long cooperatorId, OrderRequest data)` method -- not providing the full `Cooperator` for `finalRecipientCooperator.
Any suggestions?1.0Maxym BorodenkoMaxym Borodenkohttps://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/22GeographyController2020-05-22T18:04:36+02:00Matija ObrezaGeographyControllerAdd `GeographyController` with `filter`, `add`, `update`, `delete` methods.
Wait for !22.Add `GeographyController` with `filter`, `add`, `update`, `delete` methods.
Wait for !22.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/23Sorting by multiple columns2020-05-26T16:50:04+02:00Matija ObrezaSorting by multiple columnsThe API now allows for sorting on multiple columns, but they all share the same `Sort.Direction`.
Add support for the client to specify sort direction **by column**:
```json
{ "sort": { "foo": "asc", "bar": "asc", "xxx": "desc" } }
```...The API now allows for sorting on multiple columns, but they all share the same `Sort.Direction`.
Add support for the client to specify sort direction **by column**:
```json
{ "sort": { "foo": "asc", "bar": "asc", "xxx": "desc" } }
```
Also upgrade support for `DEFAULT_SORT` in `SpeciesController` to:
```java
DEFAULT_SORT = { QTaxonomySpecies.taxonomySpecies.taxonomyGenus.genusName.asc(), QTaxonomySpecies.taxonomySpecies.speciesName.asc() };
```1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/24ES JSON serialization2020-05-22T20:52:41+02:00Matija ObrezaES JSON serializationES complains that we have duplicate JSON fields:
```
Caused by: com.fasterxml.jackson.core.JsonParseException: Duplicate field 'createdBy'
```
```json
{
"id": 22635,
"createdBy": 4,
"createdBy": 4,
"createdDate": "2005-01-02T23:00:...ES complains that we have duplicate JSON fields:
```
Caused by: com.fasterxml.jackson.core.JsonParseException: Duplicate field 'createdBy'
```
```json
{
"id": 22635,
"createdBy": 4,
"createdBy": 4,
"createdDate": "2005-01-02T23:00:00.000+00:00",
"modifiedBy": 4,
"modifiedDate": "2011-04-27T22:00:00.000+00:00",
"ownedBy": {
"id": 4,
"createdDate": "2019-08-06T06:04:04.000+00:00",
"categoryCode": "UARS",
"city": "Beltsville",
"currentCooperator": 4,
"firstName": "Taxonomist",
"job": "(NPGS Taxonomist)",
"lastName": "SYSTEM",
"note": "Various NPGS Taxonomists",
"organization": "USDA-ARS",
"postalIndex": "20705",
"site": {
"createdDate": "2019-10-24T17:21:53.000+00:00",
"ownedDate": "2019-10-24T17:21:53.000+00:00",
"id": 5,
"isDistributionSite": "N",
"isInternal": "N",
"siteLongName": "SYSTEM",
"siteShortName": "SYS",
"_class": "Site"
},
"statusCode": "INACTIVE",
"_class": "Cooperator"
},
"ownedDate": "2005-01-02T23:00:00.000+00:00",
"currentTaxonomyGenus": 6280,
"genusAuthority": "(M. Roem.) Post & Kuntze",
"genusName": "Gijefa",
"qualifyingCode": "=",
"taxonomyFamily": {
"id": 2932,
"id": 2932,
"createdDate": "2011-04-27T22:00:00.000+00:00",
"modifiedDate": "2017-01-12T22:57:54.000+00:00",
"ownedDate": "2011-04-27T22:00:00.000+00:00",
"familyAuthority": "Juss., nom. cons.",
"familyName": "Cucurbitaceae",
"suprafamilyRankCode": "ORDER",
"suprafamilyRankName": "Cucurbitales",
"tribeName": "Coniandreae",
"_class": "TaxonomyFamily"
},
"_class": "TaxonomyGenus"
}
```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/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/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/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/32GG PW and GG-CE2023-09-05T06:51:22+02:00Matija ObrezaGG PW and GG-CE@gcapilit You're now running the GG PW at gringlobal.irri.org. This is running on the Windows server and probably a different database.
What level of interaction do you see between GG PW and GG-CE Server?
@jalarcon Do you run two datab...@gcapilit You're now running the GG PW at gringlobal.irri.org. This is running on the Windows server and probably a different database.
What level of interaction do you see between GG PW and GG-CE Server?
@jalarcon Do you run two databases and PWs (external and internal) at CIMMYT?
## `Web*` tables
These tables are generally updated by web users. What kinds of integration would you want to put in place?
My assumption is that `web_*` tables would somehow be copied directly from the public database to the internal database to make the records available for processing.
In the other direction, `accession_*` and `order_*` tables would be copied from the internal server to the public database. I could be wrong.https://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/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 Savranhttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/35Processes in request handling2023-09-05T06:51:11+02:00Matija ObrezaProcesses in request handling@jalarcon @gcapilit GG allows for recording process steps as `*Actions`.
There is no specific *status* on the order itself, it is considered as closed when the `completedDate` is set. Everything else is recorded as order actions.
Cons...@jalarcon @gcapilit GG allows for recording process steps as `*Actions`.
There is no specific *status* on the order itself, it is considered as closed when the `completedDate` is set. Everything else is recorded as order actions.
Considering a generic request for material (think distribution), once the list of accessions and request details are filed in GG, the next steps are:
1. **Assign** source inventory to each requested item
1. If there is **no available** inventory, what can we do with that order item? Set SYSTEM inventory and `CANCEL` the item?
1. This leaves us with order items that have valid source inventory and can be packaged for distribution
1. Determine if SMTA acceptance is required
1. If SMTA required, initiate order item action `SMTAACCEPT` for all remaining items
1. If other MTA is required, initiate relevant item action.
1. Determine if IMPORT PERMIT is required
1. Initiate `IMPORT_PER` action on items
For each item in the request:
1. **Retrieve** source inventories from storage
1. **Pack** take material from source inventory and package for distribution. This updates the available `quantityOnHand` of the source inventory.
1. **Verify** that packets for distribution match (@jalarcon This is your `ORIA_VER_SHIP` action)
1. **Ship** the material
Each of these is a task that can be recorded as `OrderRequestItemAction` with its own `start` and `completed` date.
Are any steps missing?
## Relationship with order item `Status`
The status of each order item begins with `NEW` and ends in one of: `SHIPPED`, `CANCEL` or `SPLIT` states.
Intermediate states in GG are: `HOLD`, `PENDING`, `INSPECT` and `QUALITYTEST`. It is not immediately clear how these relate to the actions listed above.Grace CapilitGrace Capilithttps://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/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/39Site on accession and inventory2020-06-30T17:46:28+02:00Matija ObrezaSite on accession and inventoryAdd a new property `Site site` to `Accession` and `Inventory` records. It is **not nullable**.
Migration scripts need to populate the `site` from:
- For accessions: from `accession.ownedBy.site`
- Inventories: from `inventory.inventory...Add a new property `Site site` to `Accession` and `Inventory` records. It is **not nullable**.
Migration scripts need to populate the `site` from:
- For accessions: from `accession.ownedBy.site`
- Inventories: from `inventory.inventoryMaintPolicy.owner.site`1.0Anastasiia KarasAnastasiia Karashttps://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/41KPI Infrastructure2020-06-30T15:48:00+02:00Matija ObrezaKPI InfrastructureCopy the KPI models, services and controllers from Genesys.
Update `liquibase` (needs to work for mysql and MSSQL, usually mysql-sourced changes generate good changelogs, but see existing changesets for examples).
Copy the KPI models, services and controllers from Genesys.
Update `liquibase` (needs to work for mysql and MSSQL, usually mysql-sourced changes generate good changelogs, but see existing changesets for examples).
1.0Maxym BorodenkoMaxym Borodenkohttps://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/43Reporting: Availability indicator2023-09-05T06:51:56+02:00Matija ObrezaReporting: Availability indicator@ncastaneda the proposed indicator is composed of:
* health - conducted at inventory level.
* viability - conducted at inventory level.
* quantity sufficiency - conducted at inventory level.
Let's focus on **viability**. There are pote...@ncastaneda the proposed indicator is composed of:
* health - conducted at inventory level.
* viability - conducted at inventory level.
* quantity sufficiency - conducted at inventory level.
Let's focus on **viability**. There are potentially multiple viability tests (and their results) per inventory.
I assume you want only the results of the **last** test. Even so:
1. What is **sufficient viability threshold** so that the material considered viable?
1. If the test is 10 years old, how do you consider the **time since the test** in marking something as *sufficiently viable*?Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/44Reporting: Health2023-09-05T06:52:04+02:00Matija ObrezaReporting: HealthThere are innumerable potential pathogens that material can be tested against.
Assuming we only consider the **most recent test results** for each pathogen:
1. How do you declare which pathogens must **be tested for** and **not be pres...There are innumerable potential pathogens that material can be tested against.
Assuming we only consider the **most recent test results** for each pathogen:
1. How do you declare which pathogens must **be tested for** and **not be present** to consider the material *healthy*?Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/45Reporting: Quantity available for distribution2023-09-05T06:52:16+02:00Matija ObrezaReporting: Quantity available for distributionThis relates closely with the viability of material (and the unresolved *age of test*) where *theoretically_viable_quantity = quantity_on_hand \* current_viability*.
GG maintains a `distributionCriticalQuantity` for each inventory, but ...This relates closely with the viability of material (and the unresolved *age of test*) where *theoretically_viable_quantity = quantity_on_hand \* current_viability*.
GG maintains a `distributionCriticalQuantity` for each inventory, but until the *theoretically_viable_quantity* is resolved, this flag doesn't really help.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/46Reporting: Safety duplication2023-09-05T06:52:23+02:00Matija ObrezaReporting: Safety duplication(The *Original*) GG records backup `site1` and `2` on `Accession` level which is not really sufficient for appropriate management of backups.
In GG-CE we wish to record the inventory-level records for material sent for safety backup. Th...(The *Original*) GG records backup `site1` and `2` on `Accession` level which is not really sufficient for appropriate management of backups.
In GG-CE we wish to record the inventory-level records for material sent for safety backup. This will allow us to report on:
* Age of the backup
* Quantity
* Location
### Seed crops
* % collection held in long-term storage at two locations and also in Svalbard Global Seed Vault (except for tree species).
That's doable with the approach proposed in GG-CE.
### Clonal
* % 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
That's doable with the approach proposed in GG-CE.
Questions for @ncastaneda:
1. Do we need to take the age of backup into consideration when reporting safety duplication?
We cannot rely only on `OrderRequest` type **BACKUP** as that only tells us what was sent for safety duplication.
We need to maintain all safety duplicated material as `Inventories` in GG (at a backup `Site`).
If we want to know what happened in a specified period of time (a year), we need to timestamp the appropriate events:
1. When the material was added to backup site: we can use existing fields in `Inventory` to determine when it was **added**.
1. When it was **removed** from backup site? Removing material from backup site means flagging the `Inventory` with some specific flag and inserting an action.
We need to scan additions (by date) and "deletes" (by action) to be able to determine what was **replaced**, **removed** and **added**.
I don't think there is a way to do it without having `Inventory` level data for material at backup locations. Any thoughts?Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/47Reporting: Management reporting2023-09-05T06:52:29+02:00Matija ObrezaReporting: Management reportingThis is fairly straightforward:
1. We also want to know how many viability tests are conducting per year.
1. We want to know the number of accessions/inventory (?) regenerated and characterized per year.
1. We want to know the number of...This is fairly straightforward:
1. We also want to know how many viability tests are conducting per year.
1. We want to know the number of accessions/inventory (?) regenerated and characterized per year.
1. We want to know the number of requests received annually.
1. We want to know the total number of accessions and number of unique accessions distributed annually.
## Distribution:
All indicators are simple to measure for **shipped distributions**:
* 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
Except if you want to know if the recipient actually got the material.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/49CT Genesys Wizard dataview2023-09-05T06:50:53+02:00Lilibeth SisonCT Genesys Wizard dataviewThis is the error while trying to open the `get_passport_data ` dataview using CT:
![image](/uploads/8dfb546e6156575970db4acd151c6829/image.png)This is the error while trying to open the `get_passport_data ` dataview using CT:
![image](/uploads/8dfb546e6156575970db4acd151c6829/image.png)https://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/51Configuring Genesys Wizard in CT2023-09-05T06:50:43+02:00Grace CapilitConfiguring Genesys Wizard in CT@jalarcon , @mobreza
There is an error encountered in configuring Genesys Wizard in CT for Genesys sandbox
Server Address: https://api.sandbox.genesys-pgr.org/
Authorization Code generated in genesys sandbox doesn't work in CT.
![i...@jalarcon , @mobreza
There is an error encountered in configuring Genesys Wizard in CT for Genesys sandbox
Server Address: https://api.sandbox.genesys-pgr.org/
Authorization Code generated in genesys sandbox doesn't work in CT.
![image](/uploads/4e024142b28705a2da67f0d3c6beb547/image.png)
![image](/uploads/9458cdf04a52a01f904f672b90256742/image.png)
Surprisingly, it works with the Genesys production.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/52Find accessions by names2020-06-30T10:47:40+02:00Matija ObrezaFind accessions by namesES does not index `AccessionInvName` table so we don't find material by names.
Also, check for `Itô` in `Species`.ES does not index `AccessionInvName` table so we don't find material by names.
Also, check for `Itô` in `Species`.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/54Generation number of inventory2020-07-06T15:00:04+02:00Ghost UserGeneration number of inventoryIntroduce a new generation (numeric) property to the `Inventory`. It indicates the number of regenerations (subcultures) the inventory has had since introduction. At introduction to the genebank this value is set to 0 and is then used to...Introduce a new generation (numeric) property to the `Inventory`. It indicates the number of regenerations (subcultures) the inventory has had since introduction. At introduction to the genebank this value is set to 0 and is then used to calculate the generation number of the resulting new material: `parent_inventory.generation + 1`.
Some actions don’t result in a generation number increase (e.g. taking seed for testing or planting) while others do (e.g. storing harvested seed).
A field to record the `generation` should be added to the inventory table.
@mobreza @gcapilit @rsulabo @lsisonMaxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/55Limit and Offset for Dataviews2020-06-30T16:43:31+02:00Matija ObrezaLimit and Offset for DataviewsUpdate limit and offset support in the SOAP compatibility service `DataviewServiceImpl`.
1. Assure there is at least the `order by 1` in the SQL
1. Extend `ORDER BY Id` part of the SQL with ` OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY`
htt...Update limit and offset support in the SOAP compatibility service `DataviewServiceImpl`.
1. Assure there is at least the `order by 1` in the SQL
1. Extend `ORDER BY Id` part of the SQL with ` OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY`
https://docs.microsoft.com/en-us/sql/t-sql/queries/select-order-by-clause-transact-sql?view=sql-server-2017
Also update the code to check for `sqlEngine` and apply `OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY` when `sqlEngine == "sqlserver"`, for others append `LIMIT 100 OFFSET 50`.1.0Matija ObrezaMatija Obrezahttps://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/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/58Integration with file-repository2020-07-04T12:02:11+02:00Matija ObrezaIntegration with file-repositoryThe `*Attach` entities link to `RepositoryFile` only by the URL.
Extend `*Attach` entities with `private RepositoryFile repositoryFile`.
## Curator tool
The CT's *Attachment Wizard* registers files in two steps:
1. Call `FilesEndpoi...The `*Attach` entities link to `RepositoryFile` only by the URL.
Extend `*Attach` entities with `private RepositoryFile repositoryFile`.
## Curator tool
The CT's *Attachment Wizard* registers files in two steps:
1. Call `FilesEndpoint#upload` with file paths declared
1. Call `DataviewEndpoint#saveData` on `*Attach` entities with the same file paths
## GG-CE
We have an existing `AttachmentAspect` that handles removal of `RepositoryFile`s when `IAttachment` is deleted.
We need a new aspect on `save | saveAll` to assign the `repositoryFile` references. If the `RepositoryFile` with the specified path does not exist, saving should fail.
grin-global/grin-global-ui#391.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/59Permissions API2020-07-04T09:09:42+02:00Matija ObrezaPermissions APIBring `PermissionsController` (v1 or v2 or both?) from Genesys.Bring `PermissionsController` (v1 or v2 or both?) from Genesys.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/60Acquisition: Documenting Incoming Samples2020-07-01T11:23:11+02:00Grace CapilitAcquisition: Documenting Incoming SamplesThis part will enable us to document incoming samples to the Genebank
Specifically,
1. create batch ID in accession_inventory_group
2. record donor's information (lookup from cooperator, recording new cooperator record is not covered h...This part will enable us to document incoming samples to the Genebank
Specifically,
1. create batch ID in accession_inventory_group
2. record donor's information (lookup from cooperator, recording new cooperator record is not covered here), create record in accession_source with source_type='donated'
3. create list of entries either by upload from a file or retrieving from another database (like IRIS) (entries will be created in accession_inv_group_map, accession and inventory)
4) record species (will be assigned in the system, lookup from taxon)
5) enter other names (variety names, donor codes, collection number, etc, will be recorded in accession_inventory names)
6) automatically assign temporary IDs (name type=temporaryID will be created in accession_inventory names)
7) enter other passport data like country of origin, habitat type(or collecting or acquisition source), georeference data and other available dataGrace CapilitGrace Capilithttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/61SysGroup as ACL authority2020-07-01T17:40:08+02:00Matija ObrezaSysGroup as ACL authorityThe `SysGroup#groupTag` field must be `readonly`. This prevents renaming the authority SID and the need for additional aspects that would modify the ACL SID entry.
We shouldn't extend `AclSid` in this case, but need to ensure that the e...The `SysGroup#groupTag` field must be `readonly`. This prevents renaming the authority SID and the need for additional aspects that would modify the ACL SID entry.
We shouldn't extend `AclSid` in this case, but need to ensure that the entry is created with `aclService.ensureAuthoritySid` on `@PrePersist` and then `aclService.removeAuthoritySid` on `@PreRemove`. See an example of accessing Spring services in `org.gringlobal.model.AuditedModel#fetchSysUser`.
Also please set `SysUser#username` and `WebUser#username` to `readonly`.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/62Acquisition: Evaluating Incoming samples for Inclusion in the Processing2020-08-05T09:15:30+02:00Grace CapilitAcquisition: Evaluating Incoming samples for Inclusion in the ProcessingThis will enable Genebank managers to document evaluation of incoming materials that will guide succeeding actions on the sample.
Will use accession_action to record
1) the incoming seed status
| Code | Description ...This will enable Genebank managers to document evaluation of incoming materials that will guide succeeding actions on the sample.
Will use accession_action to record
1) the incoming seed status
| Code | Description |
|------|---------------------------------------------------|
| REP | REPLACEMENT |
| MIS | MISSING SAMPLE/PACKET |
| HLD | HOLD |
| DUPY | PROBABLE DUPLICATE (INCLUDE IN SEED PROCESSING) |
| SHP | WITH SEED HEALTH PROBLEM |
| EXC | TO BE EXCLUDED IN SEED PROCESSING/PLANTING |
| INC | TO BE INCLUDED IN SEED PROCESSING/PLANTING |
| SUF | SUFFICIENT, FOR DIRECT ACCNO ASSIGNMENT |
| DUPN | EXACT DUPLICATE (NOT INCLUDED IN SEED PROCESSING) |
| MIX | MIXED SAMPLE (INSUFFICIENT AMOUNT) |
| MXS | MIXED SAMPLE (SUFFICIENT AMOUNT) |
2) viability (non-viable, weak, viable)
3) planting material availability (sufficient, insufficient)
4) remnant status (sufficient, insufficient, no remnants)
quantitative data
5) population structure (1, 2, 3, etc)
-indicates the number of population, >1 when mixed
6) number of rows that can be plantedGrace CapilitGrace Capilithttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/63Admin ES controller2020-07-08T11:52:12+02:00Matija ObrezaAdmin ES controllerBring the Admin ES controller from Genesys.
JSP only.Bring the Admin ES controller from Genesys.
JSP only.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/64Acquisition: Checking for Duplicates2020-07-29T03:58:54+02:00Grace CapilitAcquisition: Checking for DuplicatesAfter documenting incoming materials to the Genebank, we want to check whether we already have a copy of these newly received materials in the Genebank, either as registered seeds (accession) or unregistered samples (from another incomin...After documenting incoming materials to the Genebank, we want to check whether we already have a copy of these newly received materials in the Genebank, either as registered seeds (accession) or unregistered samples (from another incoming batch with TemporaryID only)
This function will search the database for similar entries by name (cultivar name, DonorID, CollNo, etc) using algorithms for
* exact match
* edistance
* soundex
Checking for duplicates can be done
1) by batch where the user can either specify/choose the BatchID of the incoming materials to be compared or upload list from a file or
2) by entry where a name is entered in the search boxGrace CapilitGrace Capilithttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/65Admin can`t login2020-07-02T12:26:21+02:00Kiril MorhalenkoAdmin can`t login**Steps:**
1. Go to GRIN-Global Server `/login` page;
2. Enter valid admin credentials;
3. Click "Login" button;
**Expected result:**
User is logged in as administrator;
**Actual result:**
403 Error Access denied error is shown;
![ima...**Steps:**
1. Go to GRIN-Global Server `/login` page;
2. Enter valid admin credentials;
3. Click "Login" button;
**Expected result:**
User is logged in as administrator;
**Actual result:**
403 Error Access denied error is shown;
![image](/uploads/2a9ebbef08b91fac33a78535b7f591f1/image.png)Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/66AppSettings endpoint /app/settings/mini2020-07-03T15:15:49+02:00Matija ObrezaAppSettings endpoint /app/settings/miniThe */api/v1/app/settings* returns a list of `AppSetting` entities, useful to display them for the administrator.
Add an endpoint that returns the settings as a `Map<string, ?>`:
```json
{
"name": value, ...
}
```
`AppSetting#catego...The */api/v1/app/settings* returns a list of `AppSetting` entities, useful to display them for the administrator.
Add an endpoint that returns the settings as a `Map<string, ?>`:
```json
{
"name": value, ...
}
```
`AppSetting#categoryTag` should be used to group settings:
```json
{
"notag_setting": "1231",
"categoryTag1": {
"setting1": "aaa",
"setting2": "333"
}
}
```
When `StringUtils.isBlank(categoryTag)`, then the settings go to the root map.
1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/67Spring env vars without dots2020-07-03T15:48:01+02:00Matija ObrezaSpring env vars without dotsOn most systems the `db.username` is not a valid environment variable.
Can we convince Spring to use `DB_USERNAME` instead?On most systems the `db.username` is not a valid environment variable.
Can we convince Spring to use `DB_USERNAME` instead?1.0Anastasiia KarasAnastasiia Karashttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/68Import backup inventories from SGSV2023-09-05T06:50:14+02:00Matija ObrezaImport backup inventories from SGSVAdd an admin function to import information on backups in SGSV as new inventories of existing accessions.
Recycle code from our 2016 implementation of the `SGSVUpdate` at https://gitlab.croptrust.org/genesys-pgr/genesys-server/-/blob/ma...Add an admin function to import information on backups in SGSV as new inventories of existing accessions.
Recycle code from our 2016 implementation of the `SGSVUpdate` at https://gitlab.croptrust.org/genesys-pgr/genesys-server/-/blob/master/src/main/java/org/genesys2/server/service/worker/SGSVUpdate.java
The CSV file from SGSV contains:
| institute_code | deposit_box_number | collection_name | accession_number | full_scientific_name | country_of_collection_or_source | number_of_seeds | regeneration_month_and_year | other_accession_designations | provider_institute_code | accession_url | country_code | country_name | continent_name | seeds | genus | species_epithet | species | taxon_name | date_of_deposit | date_of_dataset | sgsv_template_id | box_id |
|----------------|--------------------|-----------------|------------------|----------------------|---------------------------------|-----------------|-----------------------------|------------------------------|-------------------------|---------------|--------------|--------------|----------------|-------|-------|-----------------|--------------|--------------|-----------------|-----------------|------------------|--------|
| PAK001 | 02-PK/GB | Genebank | 6536 | Oryza sativa | Pakistan (PAK) | 500 | 2006 | | PAK001 | | PAK | Pakistan | Asia | 500 | Oryza | sativa | Oryza sativa | Oryza sativa | 17/06/2009 | 21/05/2009 | | 1092 |
| PAK001 | 02-PK/GB | Genebank | 6538 | Oryza sativa | Pakistan (PAK) | 500 | 2006 | | PAK001 | | PAK | Pakistan | Asia | 500 | Oryza | sativa | Oryza sativa | Oryza sativa | 17/06/2009 | 21/05/2009 | | 1092 |
| PAK001 | 02-PK/GB | Genebank | 6553 | Oryza sativa | Pakistan (PAK) | 500 | 2006 | | PAK001 | | PAK | Pakistan | Asia | 500 | Oryza | sativa | Oryza sativa | Oryza sativa | 17/06/2009 | 21/05/2009 | | 1092 |
| PAK001 | 02-PK/GB | Genebank | 6582 | Oryza sativa | Pakistan (PAK) | 500 | 2006 | | PAK001 | | PAK | Pakistan | Asia | 500 | Oryza | sativa | Oryza sativa | Oryza sativa | 17/06/2009 | 21/05/2009 | | 1092 |
And some additional fields...
In GG-CE, the code has to:
1. Filter SGSV data by admin-provided `String instCode`.
1. Find the matching `Accession` record by
`accession_number === trim(a.accessionNumberPart1 + ' ')`
` + (a.accessionNumberPart2 == null ? '' : a.accessionNumberPart2)`
` + trim(' ' + a.accessionNumberPart3)`
1. If no match, skip.
1. Create an `Inventory` for the accession with
1. `inventoryNumberPart1` <-- `"SGSV"`
1. `inventoryNumberPart2` <-- `sgsv_id`
1. `inventoryNumberPart3` <-- `null`
1. `formTypeCode` <-- `"SD"`
1. Check if such inventory exists and skip if it does.
1. `site` <-- find `Site` by WIEWS CODE *NOR051*
1. `inventoryMaintenancePolicy` <-- find by name *Backup Svalbard*
1. `quantityOnHand` <- `number_of_seeds`
1. `quantityOnHandUnitCode` <- `"SD"`
1. `storageLocation1` <-- `year(date_of_deposit)`
1. `storageLocation2` <-- `deposit_box_number`
1. `???` <-- `date_of_deposit`Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/69Reindex process is failed;2020-07-07T08:01:18+02:00Kiril MorhalenkoReindex process is failed;**Steps:**
1. Go to GRIN-Global Server `/login` page;
2. Enter valid admin credentials;
3. Click "Login" button;
4. Click on the "Reindex all" button
**Expected result:**
Reindex is successfully completed;
**Actual result:**
![image](...**Steps:**
1. Go to GRIN-Global Server `/login` page;
2. Enter valid admin credentials;
3. Click "Login" button;
4. Click on the "Reindex all" button
**Expected result:**
Reindex is successfully completed;
**Actual result:**
![image](/uploads/6cd0f62f998f4878cd5ce8c102ab847a/image.png)
`14:00:50,237 background-18 ERROR ElasticsearchServiceImpl:506 - Error while bulk for request: org.elasticsearch.action.bulk.BulkRequest@4791ec16
org.springframework.data.elasticsearch.ElasticsearchException: Error while bulk for request: org.elasticsearch.action.bulk.BulkRequest@4791ec16
at org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate.bulkIndex(ElasticsearchRestTemplate.java:771)
at org.springframework.data.elasticsearch.core.ElasticsearchOperations.bulkIndex(ElasticsearchOperations.java:474)
at org.gringlobal.service.impl.ElasticsearchServiceImpl.update(ElasticsearchServiceImpl.java:504)
at sun.reflect.GeneratedMethodAccessor651.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:366)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:99)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy237.update(Unknown Source)
at org.gringlobal.service.impl.ElasticsearchServiceImpl.lambda$asyncUpdate$0(ElasticsearchServiceImpl.java:551)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketTimeoutException
`Anastasiia KarasAnastasiia Karashttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/70Model validation: CodeValue2020-07-09T06:20:21+02:00Matija ObrezaModel validation: CodeValue`CodeValue`s define the set of allowed `Strings` for a specific field in the model. For example in `Inventory`, the field `String formTypeCode` uses codes defined where `CodeValue.groupName == "GERMPLASM_FORM"`.
Can we introduce a valid...`CodeValue`s define the set of allowed `Strings` for a specific field in the model. For example in `Inventory`, the field `String formTypeCode` uses codes defined where `CodeValue.groupName == "GERMPLASM_FORM"`.
Can we introduce a validator that will check that the provided `String` value for `Inventory#formTypeCode` is one of the defined `CodeValue#value` in the specified group?
```java
@Entity
class Inventory {
// ...
@Basic
@Column(name = "form_type_code", nullable = false, length = 20)
@CodeValue("GERMPLASM_FORM") // New validator
private String formTypeCode;
```1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/71User and Client API2020-11-19T20:52:58+01:00Matija ObrezaUser and Client APIAdd user and oauth client management.
Bring *admin* User (for `SysUser`) and OAuth Client controllers from Genesys.
Please add a controller for managing `SysGroup`s.Add user and oauth client management.
Bring *admin* User (for `SysUser`) and OAuth Client controllers from Genesys.
Please add a controller for managing `SysGroup`s.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/72Elasticsearch in GG-CE2020-11-20T03:07:54+01:00Matija ObrezaElasticsearch in GG-CEGRIN-Global stores the primary data in a relational database. The relational database allows for exact querying, but is not well suited for full-text search across thousands of records.
GG-CE uses Elasticsearch (ES) (https://www.elastic...GRIN-Global stores the primary data in a relational database. The relational database allows for exact querying, but is not well suited for full-text search across thousands of records.
GG-CE uses Elasticsearch (ES) (https://www.elastic.co) for full-text search over `Accession` and `Inventory` data.
Out of the box, GG-CE includes an embedded ES instance and no additional configuration is required. The embedded instance stores the index data in `${DATA_DIR}/elastic` folder (e.g. `/data/gringlobal/elastic`.
## External ES
Depending on the size of the database, the ES can use quite a lot of disk space, memory and disk space. It is sensible to run ES as its own service, independent of GG-CE. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docker.html
GG-CE Server can then be configured to use the external ES by providing a list of `ELASTICSEARCH_CLUSTER_NODES` (or `elasticsearch.cluster.nodes`):
```bash
docker -e 'ELASTICSEARCH_CLUSTER_NODES=http://someip:9200,http://someother:9200' ...
```
## GG-CE Elastic admin
The Elastic admin page in GG-CE allows the administrator to:
1. Reindex selected entity
1. Delete obsolete indexes
1. Move aliases
![image](/uploads/c9c4757278e1bbec2800859c4cf3d234/image.png)1.0Lilibeth SisonLilibeth Sisonhttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/73@OneLine validator2020-07-14T09:09:50+02:00Matija Obreza@OneLine validatorMost string fields in the model are not multi-line strings, but we now accept input such as `Foo\nbar`.
Add a validator `@OneLine` that ensures the `String` does not contain line break characters. It should be a fast implementation usin...Most string fields in the model are not multi-line strings, but we now accept input such as `Foo\nbar`.
Add a validator `@OneLine` that ensures the `String` does not contain line break characters. It should be a fast implementation using:
```
isValid(string) -> string.indexOf('\n') == -1 && string.indexOf('\r') == -1
```
Are there other characters we need to check here?
Add the validation to the `SysUser.username` field for testing.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/74Selecting material for viability testing2023-09-05T06:50:02+02:00Matija ObrezaSelecting material for viability testingWhat is the SOP that **initiates** the viability testing? Who (and how) decides which inventories need testing?
In this ticket we will explore how GG-CE can best support this process.
The support for actual testing is discussed in #78What is the SOP that **initiates** the viability testing? Who (and how) decides which inventories need testing?
In this ticket we will explore how GG-CE can best support this process.
The support for actual testing is discussed in #78Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/75Junit obsolete matchers2020-07-22T13:33:17+02:00Matija ObrezaJunit obsolete matchersPlease migrate tests away from obsolete `import static org.junit.Assert.*` to:
```java
import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.Matchers.*;
```Please migrate tests away from obsolete `import static org.junit.Assert.*` to:
```java
import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.Matchers.*;
```1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/76Acquisition: Selection of Planting Materials2020-09-02T07:40:42+02:00Grace CapilitAcquisition: Selection of Planting MaterialsIn this function, we should be able to select incoming materials for planting. These are the entries whose status afer the evaluation allows them to be part of the initial seed increase, like:
1) INC- Homogeneous/pure seeds but with i...In this function, we should be able to select incoming materials for planting. These are the entries whose status afer the evaluation allows them to be part of the initial seed increase, like:
1) INC- Homogeneous/pure seeds but with insufficient amount for storage
2) DUPY - probable duplicate that needs further testing
3) MIX - mixed sample with insufficient amount
4) REP - replacement of an old accession which is already dead or no longer available
But there are 2 categories for the selection
A) initial seed increase of incoming materials that are not yet planted ever since (first time to plant)
B) incoming materials that were already planted but harvest is not successful (replanting)
For both selection, species and type of material are required.
At IRRI, species is grouped as O. sativa, O. glaberrima and wild. Type of material is either Regular Genebank materials or Genetic Stocks. We need to add this function of identifying type of material after assigning TempID.
The cropyear and selection method should be indicated. These will be used to indicate the new inventory group for the entries that will be selected. (Example: 2020DS, ISI)
Incoming Batch(es) (accession_inv_group) will be picked and records with status sited above will be retrieved and tagged as selected materials for planting.
The selected materials can be be further reviewed and user can still delete entries that will not be included in the planting.Grace CapilitGrace Capilithttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/77Method API2020-07-28T15:05:16+02:00Matija ObrezaMethod APIAdd the basic API endpoints for `org.gringlobal.model.Method`. This is required for grin-global/grin-global-ui#75
The code can be based on `SiteController`.
- `MethodFilter` needs `StringFilter name` and `Set<String> studyReasonCode`
...Add the basic API endpoints for `org.gringlobal.model.Method`. This is required for grin-global/grin-global-ui#75
The code can be based on `SiteController`.
- `MethodFilter` needs `StringFilter name` and `Set<String> studyReasonCode`
- Please add `@CodeValue(METHOD_STUDY_TYPE)` to `Method#studyReasonCode`.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/78Viability testing2023-09-05T06:49:47+02:00Matija ObrezaViability testingSelecting material for viability testing is discussed in grin-global/grin-global-server#74. In this ticket we will discuss the execution of a viability test (i.e. inventories to be tested are already selected) and how to handle the resul...Selecting material for viability testing is discussed in grin-global/grin-global-server#74. In this ticket we will discuss the execution of a viability test (i.e. inventories to be tested are already selected) and how to handle the resulting data.
The viability testing in the *Original GG* is initiated from a `OrderRequest` and resembles the regular distribution procedure. This is sensible as the material needs to be pulled out of storage and the quantities are reduced by the corresponding amounts.
The existing CT *Viability wizard* is described at https://www.grin-global.org/docs/gg_viability_wizard.pdf
- The inventories for viability testing are selected (see #74) and processed as a new `OrderRequest`
- The material is tested and results recordedMatija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/79Updating inventory amounts2020-07-29T16:24:02+02:00Matija ObrezaUpdating inventory amountsAdd API support for updating inventory quantity (see grin-global/grin-global-ui#26).
- Only the quantity and quantity code must be updated
- Quantity is not allowed for *SYSTEM* inventory
- Quantity cannot be negative (`< 0`)Add API support for updating inventory quantity (see grin-global/grin-global-ui#26).
- Only the quantity and quantity code must be updated
- Quantity is not allowed for *SYSTEM* inventory
- Quantity cannot be negative (`< 0`)1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/80Java warnings and errors2020-07-28T15:30:50+02:00Lilibeth SisonJava warnings and errorsI ran into problems (193) with GG-Server codes when opened in VS Code.
![image](/uploads/1d4ae30ac540967a797f1f31d3ebc90f/image.png)
I was tempted to change some values in the org.eclipse.jdt.core.prefs and pom.xml files but will wait ...I ran into problems (193) with GG-Server codes when opened in VS Code.
![image](/uploads/1d4ae30ac540967a797f1f31d3ebc90f/image.png)
I was tempted to change some values in the org.eclipse.jdt.core.prefs and pom.xml files but will wait for your advise :smiley: @mobrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/81Check database initialization2020-07-30T15:05:25+02:00Matija ObrezaCheck database initialization@mborodenko writes in https://gitlab.croptrust.org/grin-global/grin-global-ui/-/merge_requests/65#note_44395:
> persisted records of cooperators in my local DB have `N` values for `statusCode`, `categoryCode`, `disciplineCode`, `organiz...@mborodenko writes in https://gitlab.croptrust.org/grin-global/grin-global-ui/-/merge_requests/65#note_44395:
> persisted records of cooperators in my local DB have `N` values for `statusCode`, `categoryCode`, `disciplineCode`, `organizationRegionCode`.
This seems to be an issue with CSV parser.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/82Inventory summary API2020-08-03T08:51:06+02:00Matija ObrezaInventory summary APIImplement Inventory overviews based on Accession summary (grin-global/grin-global-server!88)Implement Inventory overviews based on Accession summary (grin-global/grin-global-server!88)1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/83Pending Action records2020-08-03T15:01:06+02:00Matija ObrezaPending Action recordsIn GG-CE we wish to record **Pending** actions, that is actions that need to be executed, but have not yet started.
We inherited `startedDate` field with `nullable = false` from the *Original GG* data model. Please drop `nullable` and ...In GG-CE we wish to record **Pending** actions, that is actions that need to be executed, but have not yet started.
We inherited `startedDate` field with `nullable = false` from the *Original GG* data model. Please drop `nullable` and update `liquibase`.
The change affects `InventoryAction`, `AccessionAction`, `OrderRequestAction` and `OrderRequestItemAction`.
Update `ActionFilter` with `Boolean started` (similar to `completed`).1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/84CurrentPermissionsWriter cannot not read permissions2020-08-03T15:32:57+02:00Matija ObrezaCurrentPermissionsWriter cannot not read permissionsACL error reported:
```
WARN CurrentPermissionsWriter:114 - Could not read public permissions GrantedAuthority required
java.lang.IllegalArgumentException: GrantedAuthority required
```
This is caused by a missing ACL owner SID created...ACL error reported:
```
WARN CurrentPermissionsWriter:114 - Could not read public permissions GrantedAuthority required
java.lang.IllegalArgumentException: GrantedAuthority required
```
This is caused by a missing ACL owner SID created in `ApplicationStartup`.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/85Attaching files to CooperatorAttachment2020-08-10T07:09:57+02:00Matija ObrezaAttaching files to CooperatorAttachmentgrin-global/grin-global-ui#39 asks for attaching files to Accession (i.e. `AccessionInvAttach`).
Add generic services to manage `RepositoryFile` attachments to `CooperatorAttachment` entities.
The implementation can be similar to how w...grin-global/grin-global-ui#39 asks for attaching files to Accession (i.e. `AccessionInvAttach`).
Add generic services to manage `RepositoryFile` attachments to `CooperatorAttachment` entities.
The implementation can be similar to how we handle Actions.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/86Explaining GG-CE vs GRIN-Global2023-09-05T06:49:35+02:00Matija ObrezaExplaining GG-CE vs GRIN-GlobalGRIN-Global (GG) is an ASP.Net web application running on IIS on a Windows Server. GG uses a MSSQL database to persist data:
![image](/uploads/35188b0d750c2dc5e9fdf7219e634dbb/image.png)
As a web application, GRIN-Global handles incomi...GRIN-Global (GG) is an ASP.Net web application running on IIS on a Windows Server. GG uses a MSSQL database to persist data:
![image](/uploads/35188b0d750c2dc5e9fdf7219e634dbb/image.png)
As a web application, GRIN-Global handles incoming HTTP requests:
- *SOAP* requests to `GUI.asmx`
- *Public website* requests
- `*.aspx` dynamic web page requests
- requests for static resources (images, CSS, JS)
It uses shared components (the middle tier) and triggers to react to incoming data.
The user interactions with the ASP.Net application and its components in more detail:
![image](/uploads/f5fcb071bd491ea0d9acdbff4b396a7e/image.png)
## The SOAP interface
The SOAP interface exposes a handful of methods, two of which facilitate all data exchange with GG: `GetData` and `SaveData`.
Remaining SOAP methods handle file upload/download, changing user language and password, lookup table stats, permission management and search.
# Curator Tool
The Curator Tool interacts with GG using SOAP protocol (XML over HTTP). It requires a local installation of MSSQL express to keep a copy of *Lookup tables*.
# GG-CE Server
GG-CE Server implements the same SOAP interface, making in backward compatible with GG and allowing for use of the Curator Tool and other software that uses the SOAP protocol.
It adds documented JSON API endpoints that make interactions with GG-CE more intuitive and building additional client software (i.e. mobile and web apps) simpler.
`gg-ce-server` does not provide a *"Public" website*. https://gitlab.croptrust.org/grin-global/grin-global-ui implements a **web interface** for genebank technicians and managers.
![image](/uploads/7b4ada44241b068fcc127d745bfd4302/image.png)
# GG-CE Deployment
GG-CE is packaged as Docker images and designed for container deployment on Windows, Linux and macos hosts. This makes it easy for IT department to deploy, manage, backup and upgrade individual components automatically.
![image](/uploads/f3796312c534de54513683ae4047064a/image.png)
Containers can run on different hosts as long as they are able to communicate on designated ports. Only the HTTPS port is exposed to the outside world.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/87User isn`t redirect to the "/admin/" page after login;2020-08-05T08:43:37+02:00Kiril MorhalenkoUser isn`t redirect to the "/admin/" page after login;*Steps:*
1. Go to GRIN-Global Server `/login` page;
2. Enter valid admin credentials;
3. Click "Login" button;
**Expected result:** User is on the "/admin/" page;
**Actual result:**
'/login-attempt' page is opened;
![image](/uploads/e...*Steps:*
1. Go to GRIN-Global Server `/login` page;
2. Enter valid admin credentials;
3. Click "Login" button;
**Expected result:** User is on the "/admin/" page;
**Actual result:**
'/login-attempt' page is opened;
![image](/uploads/e4278fe2f1896c34d9f3e6b0c35b4b33/image.png)Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/88Accession source habitat type2020-08-06T14:47:39+02:00Matija ObrezaAccession source habitat type`SourceHabitatType` enum was introduced as part of Genesys downloader. Since then, we've developed a new approach using `CommunityCodeValues`.
Update the handling of `SourceHabitatType` by removing the enum, register the relevant code v...`SourceHabitatType` enum was introduced as part of Genesys downloader. Since then, we've developed a new approach using `CommunityCodeValues`.
Update the handling of `SourceHabitatType` by removing the enum, register the relevant code values in `CommunityCodeValues` and update the Genesys downloader code.
1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/89API List methods with FilterPage2020-08-11T11:22:52+02:00Matija ObrezaAPI List methods with FilterPageOur API `list**` methods that support filtering with `*Filter` object should return `FilteredPage` (to include the valid filter object).
The controller method parameters stay the same (no support for `String filterCode`) and the filter ...Our API `list**` methods that support filtering with `*Filter` object should return `FilteredPage` (to include the valid filter object).
The controller method parameters stay the same (no support for `String filterCode`) and the filter object is not persisted using `ShortFilterService`. But it could still be normalized?
If possible, don't return `filterCode` property to the client.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/90Drop CooperatorStatus enum2020-08-11T09:17:30+02:00Matija ObrezaDrop CooperatorStatus enum@mborodenko reported that the `Cooperator` entity on the server doesn't reference the code values except the `Cooperator#statusCode` witch uses enum `CooperatorStatus`. Perhaps we could add `@CodeValueField` to relevant fields on the ser...@mborodenko reported that the `Cooperator` entity on the server doesn't reference the code values except the `Cooperator#statusCode` witch uses enum `CooperatorStatus`. Perhaps we could add `@CodeValueField` to relevant fields on the server?
Please add `@CodeValueField` to the `Cooperator` entity.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/91Add pending actions for new inventories2021-10-04T11:21:55+02:00Matija ObrezaAdd pending actions for new inventoriesWhen a new `Inventory` is added to GG-CE, the system must automatically register two **PENDING** `InventoryAction` records:
1. `QUANTITYSET`: *Quantity update* -- The actual amount of material is inspected.
1. `LOCATIONSET`: *Location u...When a new `Inventory` is added to GG-CE, the system must automatically register two **PENDING** `InventoryAction` records:
1. `QUANTITYSET`: *Quantity update* -- The actual amount of material is inspected.
1. `LOCATIONSET`: *Location update* -- The location of the inventory is set.
These two actions are automatically closed when:
1. `QUANTITYSET` is closed when `Inventory#quantity` is updated
1. `LOCATIONSET` is closed when `Inventory#storageLocation1..4` is updated
The codes need to be registered as `CommunityCodeValues`.
It may be sensible to add an aspect on the `#save` method(s) of `InventoryRepository`, check if `Inventory` is not yet persisted and add these actions in the aspect.
Also the `InventoryService#addInventoryAction` should first try to close an existing pending action before adding a new one. It should be renamed to `#closeInventoryAction`.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/92Filter deserialization2020-08-11T09:11:46+02:00Matija ObrezaFilter deserializationThe current JSON deserialization does not accept single values for `NumberFilter#eq`.
In grin-global/grin-global-ui#91 @rsulabo is trying to send `inventoryNumberPart2: { eq: +data.barcode }` and it fails with JSON parsing error.The current JSON deserialization does not accept single values for `NumberFilter#eq`.
In grin-global/grin-global-ui#91 @rsulabo is trying to send `inventoryNumberPart2: { eq: +data.barcode }` and it fails with JSON parsing error.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/93ES search updates2020-08-11T10:05:57+02:00Matija ObrezaES search updatesGenesys implemented an improved full-text search approach in genesys-pgr/genesys-server!559
Bring the same changes to GG-CE.Genesys implemented an improved full-text search approach in genesys-pgr/genesys-server!559
Bring the same changes to GG-CE.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/94Drop Accession.ImprovementLevel enum2020-08-17T09:06:05+02:00Matija ObrezaDrop Accession.ImprovementLevel enumSimilar to grin-global/grin-global-server#90.Similar to grin-global/grin-global-server#90.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/95Language support2020-08-21T06:43:20+02:00Matija ObrezaLanguage supportGG-CE SOAP endpoints don't return the data in user-selected language [DataviewServiceImpl.java#L524](https://gitlab.croptrust.org/grin-global/grin-global-server/-/blob/e50797ebc58ff6827bb4511c417e339f7ccd9569/src/main/java/org/gringlobal...GG-CE SOAP endpoints don't return the data in user-selected language [DataviewServiceImpl.java#L524](https://gitlab.croptrust.org/grin-global/grin-global-server/-/blob/e50797ebc58ff6827bb4511c417e339f7ccd9569/src/main/java/org/gringlobal/compatibility/service/impl/DataviewServiceImpl.java#L524):
```java
final SysLang language = languageRepository.findById(1l).orElse(null);
```
Dataviews should be annotated in appropriate language.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/96Flexible accession and inventoryNumber2020-08-14T14:44:31+02:00Matija ObrezaFlexible accession and inventoryNumber`Accession#accessionNumber` and `Inventory#inventoryNumber` now use a Java method to generate the full name from name parts **1..3** (or 1..4).
The formatting style of these numbers is a sensitive issue and needs to correspond to curren...`Accession#accessionNumber` and `Inventory#inventoryNumber` now use a Java method to generate the full name from name parts **1..3** (or 1..4).
The formatting style of these numbers is a sensitive issue and needs to correspond to current genebank practices.
Example accession number formats:
- IITA uses a dash `-` between `part1` and `part2`: **TMe-419**
- IRRI uses space ` `: **IRGC 123123**
- Some don't use space: **PI3232**
- Some use ` ` between `part2` and `part3`: **TPt-6 A**
- Others use `.`: **ZZZ 531.A**
GG-CE should make these separators configurable.
## Ideas
We could use `MessageFormat` and a helper method to format the final string:
```properties
accession.number.format={0}-{1} {2}
inventory.number.format={0} {1}.{2} {3}
```
This would also allow for zero-padding `part2` for some genebanks (e.g. `ITC0001320`).1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/97Spring locale support2020-11-18T11:19:58+01:00Matija ObrezaSpring locale supportAdd locale support to GG-CE server so that for example http://localhost:8080/es/ will use Spanish. See Genesys for reference.
*/es/api/v0/...* should return the */api/v0/...* response, but in the `es` context.
- `LocaleURLFilter`
- `Re...Add locale support to GG-CE server so that for example http://localhost:8080/es/ will use Spanish. See Genesys for reference.
*/es/api/v0/...* should return the */api/v0/...* response, but in the `es` context.
- `LocaleURLFilter`
- `RequestAttributeLocaleResolver`
- `SOAPAuthenticationInterceptor` should set the appropriate request attribute for later use in service methods
For demonstration, update the current */app/codes/{lang}* in `AppController` to */app/codes* and use the language from the path locale: */es/app/codes*.1.0Anastasiia KarasAnastasiia Karashttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/98Table`s header don`t have the same color;2020-08-13T12:17:12+02:00Kiril MorhalenkoTable`s header don`t have the same color;**Have a look** it reproduces for all `tableComponent`
**Steps:**
1. Go to "/a" page as any valid user;
2. Click on the "Settings" button (for table);
3. Turn off the visibility of all columns except one;
4. Click on the "Save" button (...**Have a look** it reproduces for all `tableComponent`
**Steps:**
1. Go to "/a" page as any valid user;
2. Click on the "Settings" button (for table);
3. Turn off the visibility of all columns except one;
4. Click on the "Save" button (for table);
**Expected result:**
All table`s header should have the same color
**Actual result:**
Table`s header don`t have the same color;
![image](/uploads/d4aefc01f7e5bf0c25df798f77e99a85/image.png)Anastasiia KarasAnastasiia Karashttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/99File repository in the SSR mode;2021-03-08T04:49:45+01:00Kiril MorhalenkoFile repository in the SSR mode;**Steps:**
1. Open any system inventory details page;
2. Click on the "Attachments" tab;
3. Download one picture;
4. Download one file;
**Expected result:**
* User can see the preview of the picture;
* User can open a full-size picture;...**Steps:**
1. Open any system inventory details page;
2. Click on the "Attachments" tab;
3. Download one picture;
4. Download one file;
**Expected result:**
* User can see the preview of the picture;
* User can open a full-size picture;
* User can download the file;
**Actual result:**
* Previews of the pictures aren't displayed
* The full-size picture isn't downloaded from the backend;
* User can`t download the file;
![repository](/uploads/3d7eaa347682f712c419e12d2ca0a669/repository.gif)
![image](/uploads/62694ce7d7613cee8b7c7d362fa47295/image.png)
![image](/uploads/78b0330e665e220ad48837567514eada/image.png)Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/100Diversity tree creator roles2020-09-07T11:06:13+02:00Oleksii SavranDiversity tree creator rolesPlease, add `CONTRIBUTOR` role for diversity tree creator.Please, add `CONTRIBUTOR` role for diversity tree creator.Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/101Logger config2020-09-14T15:43:35+02:00Matija ObrezaLogger configThe full logger name in path `/logger/org.gringlobal` is not detected and results in Logger `org`.
1. Admin page, loggers
1. Open "org.gringlobal" logger settings
1. Observe it detects and updates "org" logger insteadThe full logger name in path `/logger/org.gringlobal` is not detected and results in Logger `org`.
1. Admin page, loggers
1. Open "org.gringlobal" logger settings
1. Observe it detects and updates "org" logger instead1.0Maxym BorodenkoMaxym Borodenko