GGCE Server issueshttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues2020-10-12T17:03:06+02:00https://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/107Inv Group: Delete2020-10-12T17:03:06+02:00Matija ObrezaInv Group: Deletegrin-global/grin-global-ui!102 adds editing and delete support to the UI.
Calling the delete inventory groupĀ API fails with:
> could not execute batch; SQL [delete from accession_inv_group where accession_inv_group_id=?]; constraint [n...grin-global/grin-global-ui!102 adds editing and delete support to the UI.
Calling the delete inventory groupĀ API fails with:
> could not execute batch; SQL [delete from accession_inv_group where accession_inv_group_id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batchcould not execute batchThe DELETE statement conflicted with the REFERENCE constraint "fk_aigm_aig". The conflict occurred in database "..", table "dbo.accession_inv_group_map", column 'accession_inv_group_id'.1.0Anastasiia KarasAnastasiia Karashttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/108CE server not starting after pulling latest2020-10-20T07:46:52+02:00Lilibeth SisonCE server not starting after pulling latest@mobreza I pulled the latest this morning. Then server won't start
here is part of the log :
```
2020-10-20 03:12:39.624:INFO:oeja.AnnotationConfiguration:main: Scanning elapsed time=2466ms
2020-10-20 03:12:39.942:INFO:oejshC.ROOT:main...@mobreza I pulled the latest this morning. Then server won't start
here is part of the log :
```
2020-10-20 03:12:39.624:INFO:oeja.AnnotationConfiguration:main: Scanning elapsed time=2466ms
2020-10-20 03:12:39.942:INFO:oejshC.ROOT:main: 3 Spring WebApplicationInitializers detected on classpath
WhoMakesTheJSessionId listener instantiated.
2020-10-20 03:12:40.203:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
2020-10-20 03:12:40.203:INFO:oejs.session:main: No SessionScavenger set, using defaults
2020-10-20 03:12:40.204:INFO:oejs.session:main: node0 Scavenging every 660000ms
2020-10-20 03:12:40.213:INFO:oejshC.ROOT:main: Initializing Spring root WebApplicationContext
03:12:42,132 main WARN ApplicationConfig:70 - Extra configuration file myconfig.properties not found
03:12:43,181 main WARN GMTStringToDateConverter:18 - Current time in SOAP format: 2020-10-20T03:12:43.0000181Z
Application is connecting to jdbc:sqlserver://172.29.4.174:1433;DatabaseName=gringlobal_forDocker
03:12:44,071 main INFO DatabaseSchemaCreator:88 - Inspecting catalog=gringlobal_forDocker schema=dbo
03:12:45,101 main INFO JdbcExecutor:95 - select schema_name()
03:12:45,105 main INFO JdbcExecutor:95 - SELECT CASE ServerProperty('EngineEdition')
WHEN 1 THEN 'Personal'
WHEN 2 THEN 'Standard'
WHEN 3 THEN 'Enterprise'
WHEN 4 THEN 'Express'
WHEN 5 THEN 'Azure'
ELSE 'Unknown'
END
03:12:45,121 main INFO JdbcExecutor:95 - select schema_name()
03:12:45,122 main INFO JdbcExecutor:95 - SELECT COUNT(*) FROM DATABASECHANGELOGLOCK
03:12:45,139 main INFO JdbcExecutor:95 - select schema_name()
03:12:45,140 main INFO JdbcExecutor:95 - SELECT COUNT(*) FROM DATABASECHANGELOGLOCK
03:12:45,142 main INFO JdbcExecutor:95 - select schema_name()
03:12:45,143 main INFO JdbcExecutor:95 - SELECT LOCKED FROM DATABASECHANGELOGLOCK WHERE ID=1
03:12:45,145 main INFO StandardLockService:95 - Waiting for changelog lock....
03:12:55,147 main INFO JdbcExecutor:95 - select schema_name()
03:12:55,149 main INFO JdbcExecutor:95 - SELECT LOCKED FROM DATABASECHANGELOGLOCK WHERE ID=1
03:12:55,150 main INFO StandardLockService:95 - Waiting for changelog lock....
03:13:05,153 main INFO JdbcExecutor:95 - select schema_name()
03:13:05,155 main INFO JdbcExecutor:95 - SELECT LOCKED FROM DATABASECHANGELOGLOCK WHERE ID=1
03:13:05,157 main INFO StandardLockService:95 - Waiting for changelog lock....
03:13:15,159 main INFO JdbcExecutor:95 - select schema_name()
03:13:15,161 main INFO JdbcExecutor:95 - SELECT LOCKED FROM DATABASECHANGELOGLOCK WHERE ID=1
03:13:15,163 main INFO StandardLockService:95 - Waiting for changelog lock....
03:13:25,166 main INFO JdbcExecutor:95 - select schema_name()
03:13:25,168 main INFO JdbcExecutor:95 - SELECT LOCKED FROM DATABASECHANGELOGLOCK WHERE ID=1
03:13:25,170 main INFO StandardLockService:95 - Waiting for changelog lock....
```Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/109CORS update2020-10-28T08:00:29+01:00Matija ObrezaCORS updateUpgrade GG with CORS udpates in genesys-pgr/genesys-server!584Upgrade GG with CORS udpates in genesys-pgr/genesys-server!5841.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/110WebUser APIs2020-11-11T15:16:07+01:00Matija ObrezaWebUser APIsPlease add a new API controller to */api/v1/webuser* for CRUD operations on `WebUser`.
We need full-text search support and filtering on `WebUser`.Please add a new API controller to */api/v1/webuser* for CRUD operations on `WebUser`.
We need full-text search support and filtering on `WebUser`.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/111ES select fields for full-text search2020-11-02T10:22:38+01:00Matija ObrezaES select fields for full-text searchWe need better control over what fields should be indexed for full-text search.We need better control over what fields should be indexed for full-text search.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/112Add backend for #1382020-11-18T14:43:26+01:00Maksym TishchenkoAdd backend for #138https://gitlab.croptrust.org/grin-global/grin-global-ui/-/issues/138
We need API endpoints:
1. */api/v1/webuser/register*: Register new web user, receives email and password.
1. */api/v1/webuser/me*: Returns `WebUser` (with `WebCoopera...https://gitlab.croptrust.org/grin-global/grin-global-ui/-/issues/138
We need API endpoints:
1. */api/v1/webuser/register*: Register new web user, receives email and password.
1. */api/v1/webuser/me*: Returns `WebUser` (with `WebCooperator`) for the currently logged in `WebUser`Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/113OAuth origin filter2020-11-18T14:00:55+01:00Matija ObrezaOAuth origin filterThe `OAuthClientOriginCheckFilter` now checks that the HTTP request *Origin* header matches the one allowed for the client.
It currently does a check if `allowedOrigins.isEmpty()`.
Please add the `else` part that will check that there ...The `OAuthClientOriginCheckFilter` now checks that the HTTP request *Origin* header matches the one allowed for the client.
It currently does a check if `allowedOrigins.isEmpty()`.
Please add the `else` part that will check that there is no Origin header. That means that this client may not be used from browsers.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/114ACL check on startup2020-11-18T11:55:46+01:00Matija ObrezaACL check on startupI get a lot of `Error accessing anonymous permissions` log messages (from `CurrentPermissionWriter`) when using an imported database, where records were not created by the server and they don't have ACL owners and basic permissions.
Add...I get a lot of `Error accessing anonymous permissions` log messages (from `CurrentPermissionWriter`) when using an imported database, where records were not created by the server and they don't have ACL owners and basic permissions.
Add something to admin to fix ACL issues: assure SID owner, basic owner permissions. (see Genesys admin)1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/115Verification email for WebUser2020-11-18T14:43:28+01:00Matija ObrezaVerification email for WebUserAdd `EMailVerificationService` to send a verification email after registration of a `WebUser` via the API.
Because this happens mostly in the embedded GG-CE UI, we need forms in that project and verification endpoints here.Add `EMailVerificationService` to send a verification email after registration of a `WebUser` via the API.
Because this happens mostly in the embedded GG-CE UI, we need forms in that project and verification endpoints here.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/116WebUser login2020-11-18T14:43:26+01:00Matija ObrezaWebUser logingrin-global/grin-global-ui#139 asks for support for login of `WebUser` using OAuth *Password* credentials (username+password provided by the user).
This requires checking user credentials against a **new** `webUserDetailsService` and `W...grin-global/grin-global-ui#139 asks for support for login of `WebUser` using OAuth *Password* credentials (username+password provided by the user).
This requires checking user credentials against a **new** `webUserDetailsService` and `WebUser` needs to implement `UserDetails`.
One idea is to add another `AuthorizationServer` to `OAuth2ServerConfig`:
```java
@Configuration
@EnableAuthorizationServer
protected class WebUserAuthorizationServerConfiguration extends AuthorizationServerConfigurerAdapter {
```
This `WebUserAuthorizationServerConfiguration` will need to be available on a different URL (the default */oauth/..* is already used). I hope this can be achieved by setting just the `prefix`:
```java
@Override
public void configure(final AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
final TokenEnhancerChain tokenEnhancerChain = new TokenEnhancerChain();
tokenEnhancerChain.setTokenEnhancers(Arrays.asList(accessTokenConverter()));
endpoints
.prefix("/webauth") // Prefix
.tokenStore(tokenStore())
.authorizationCodeServices(authorizationCodeServices())
.tokenEnhancer(tokenEnhancerChain)
.userDetailsService(webUserDetailsService) // webUserDetailsService
.authenticationManager(authenticationManager);
}
```1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/117Service endpoints?2021-02-15T11:04:07+01:00Matija ObrezaService endpoints?@jarias asked "Reviewing GG-CE, there are some services that are not listed and if they are, could you tell me how they are named":
| table | Expected endpoint |
|--------------------|---------------|
| Code_value | /list ...@jarias asked "Reviewing GG-CE, there are some services that are not listed and if they are, could you tell me how they are named":
| table | Expected endpoint |
|--------------------|---------------|
| Code_value | /list |
| Cooperator_group | /list |
| Cooperator_map | /list |
| Order_request_item | /list |
| Sys_group_user_map | /list |
| Sys_user | /list |
| Inventory_action | /add, /update |1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/118Creating Inventories2020-11-18T13:21:23+01:00Matija ObrezaCreating InventoriesWhen creating new `Inventory` and other types of records via the API we only want to provide the `id` of referenced entities.
In the example below, we would create a new `Inventory` for accession with `id: 2001`:
```json
{
"accession...When creating new `Inventory` and other types of records via the API we only want to provide the `id` of referenced entities.
In the example below, we would create a new `Inventory` for accession with `id: 2001`:
```json
{
"accession": {
"id": 2001
},
"inventoryMaintPolicy": {
"id": 2
},
"site": {
"id": 47
},
"distributionCriticalQuantity": 1600,
"distributionDefaultFormCode": "SD",
"distributionDefaultQuantity": 250,
"distributionUnitCode": "sd",
"formTypeCode": "SD",
"isAutoDeducted": "Y",
"maintenanceName": "Maize",
"note": null,
"quantityOnHandUnitCode": "sd",
"regenerationCriticalQuantity": 1600,
"regenerationMethodCode": "Pap",
"inventoryNumberPart1": "MO",
"inventoryNumberPart2": "-1",
"isDistributable": "Y",
"quantityOnHand": "5000",
"hundredSeedWeight": "500",
"isAvailable": "Y",
"availabilityStatusCode": "AVAIL"
}
```
Right now, this fails in `lazyLoad` because `accession.taxonomySpecies == null`.
`@Transactional` boundaries don't allow for this.
The `create` service methods need to load these referenced entities.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/119Templating service2020-12-08T15:09:49+01:00Matija ObrezaTemplating serviceWe have several string templates in GG-CE that need to be filled with data. The most recent example is the filling an email template for user account verification.
Regardless of where the templates are stored, we need one templating sys...We have several string templates in GG-CE that need to be filled with data. The most recent example is the filling an email template for user account verification.
Regardless of where the templates are stored, we need one templating system that works both on the server (Java) and can be used on the client (Javascript).
```java
public interface TemplatingService {
String fillTemplate(String template, Map<String, Object> params);
}
```
```ts
function fillTemplate(template: string, params: Map) {
//
}
```
The template syntax will depend on the engine selected.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/120Admin AppResource CRUD2020-12-08T15:09:48+01:00Matija ObrezaAdmin AppResource CRUDWe need to add support to manage `AppResource` in the UI for Administrators.
Please implement the CRUD controller and services.We need to add support to manage `AppResource` in the UI for Administrators.
Please implement the CRUD controller and services.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/121Server not starting2020-11-20T08:28:59+01:00Lilibeth SisonServer not starting@mobreza I pulled latest release.
server not starting after that.
attached is the log file[gg-ce-server_log.txt](/uploads/f8bc096e6be40dcc348afbdbfc9a42c9/gg-ce-server_log.txt)@mobreza I pulled latest release.
server not starting after that.
attached is the log file[gg-ce-server_log.txt](/uploads/f8bc096e6be40dcc348afbdbfc9a42c9/gg-ce-server_log.txt)https://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/122BrAPI controllers2021-02-01T11:17:15+01:00Matija ObrezaBrAPI controllersBring BrAPI controllers and services from Genesys and adapt them to GG-CE.Bring BrAPI controllers and services from Genesys and adapt them to GG-CE.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/123SysUser management2020-12-08T08:07:32+01:00Matija ObrezaSysUser managementUpgrade the SysUser management controller to:
- list available roles
- allow for assigning roles to `SysUser`Upgrade the SysUser management controller to:
- list available roles
- allow for assigning roles to `SysUser`1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/124CodeValue Translations2020-12-08T08:28:46+01:00Matija ObrezaCodeValue TranslationsUpdate CVL API for grin-global/grin-global-ui#151
1. Return CodeValueLang for all languages, use default translations if records are not in the DB
1. Add `upsert` method for codevalues at `POST/PUT /{cvId}/lang/{language}` to upsert tr...Update CVL API for grin-global/grin-global-ui#151
1. Return CodeValueLang for all languages, use default translations if records are not in the DB
1. Add `upsert` method for codevalues at `POST/PUT /{cvId}/lang/{language}` to upsert translation
1. Change delete to remove by language `DELETE /cvId}/lang/{language}`
![image](/uploads/acbea3367f60163677ca5dcfb7e283be/image.png)1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/126Inventory full-text search2021-01-11T06:34:03+01:00Matija ObrezaInventory full-text searchThe UI sends `{"_text":"zea","includeSystem":false}` to the API, but the response still includes system inventories:
![image](/uploads/6cfa6a14a6983603c51d56a98f85b242/image.png)The UI sends `{"_text":"zea","includeSystem":false}` to the API, but the response still includes system inventories:
![image](/uploads/6cfa6a14a6983603c51d56a98f85b242/image.png)1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/127Audit logs: modifiedDate2021-01-06T10:40:27+01:00Matija ObrezaAudit logs: modifiedDateAny reason that `modifiedDate` is recorded in auditlogs?
![image](/uploads/a7e7658e896b964f53ee0c37b8bb4630/image.png)
I believe we ignore fields flagged with Spring's `@CreatedDate` and `@ModifiedDate`?Any reason that `modifiedDate` is recorded in auditlogs?
![image](/uploads/a7e7658e896b964f53ee0c37b8bb4630/image.png)
I believe we ignore fields flagged with Spring's `@CreatedDate` and `@ModifiedDate`?1.0Maxym BorodenkoMaxym Borodenko