GGCE Server issueshttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues2024-03-27T15:10:53+01:00https://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/469Customizable KPI notification template2024-03-27T15:10:53+01:00Matija ObrezaCustomizable KPI notification templateAfter #468 we wish to support **template customization**.
Templates are stored in `AppResources`. `ApplicationStartup` should add `kpi-execution-template.mustache` as one of dynamic liquibase changesets. Then we can load it with:
```ja...After #468 we wish to support **template customization**.
Templates are stored in `AppResources`. `ApplicationStartup` should add `kpi-execution-template.mustache` as one of dynamic liquibase changesets. Then we can load it with:
```java
var template = appResourceService.getResource(AppResourceService.APP_NAME_GG_CE, "kpi.execution.template", Locale.getDefault());
if (template == null) { // Use resource
```2024.3Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/468Send KPI execution results on a schedule2024-03-27T14:25:41+01:00Matija ObrezaSend KPI execution results on a scheduleWe would like to send the latest KPI execution results by email to all `SysUsers` that have `READ` permission on that `Execution`.
The schedule is fixed and runs every Sunday at 12:00 UTC.
## Implementation
Add a new class `org.gringl...We would like to send the latest KPI execution results by email to all `SysUsers` that have `READ` permission on that `Execution`.
The schedule is fixed and runs every Sunday at 12:00 UTC.
## Implementation
Add a new class `org.gringlobal.notification.KPINotifications` with:
```java
@Scheduled(...)
@Transactional(readOnly = true)
public void generateLastKPIExecutions() {
for (var execution : executionRepository.listActiveExecutions()) {
notifyLastKPIExecution(execution.getName())
}
}
@Transactional(readOnly = true)
public void notifyLastKPIExecution(String executionName) {
var execution = executionService.load...
var sysUserRecipients = makeRecipientList(execution)
if (sysUserRecipients.isEmpty()) return;
// TODO load last run and generate the message body
// TODO send emails to sysUserRecipients using EmailService
}
```
## Notification recipients
The list of active `SysUsers` that will receive the email is based on all SIDs that have `READ` permission on the execution. When SID is an active `SysGroup` then active members of that group (`SysUsers[active=true]`) are added to the list. OAuth clients and web users are ignored.
## Notification message
The title of the message is the name of the execution.
The body of the message is generated by loading the last execution run and passing it through `TemplateService` to generate the message. The default template `kpi-execution-template.mustache` is bundled with server code in `src/main/resources/notifications`.
The default template should generate a body similar to how the execution run is displayed in the UI:
> ## KPI {{execution.name}} run {{executionRun.timestamp}}
>
> | genus | COUNT |
> |-------------|-------|
> | Aa | 33 |
> | Abarema | 26 |
> | Abelmoschus | |
> ...
> | Total | {{executionRun.total}} |
>
> View it in GGCE +Link to GGCE UI for this execution2024.3Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/467Handling of partial dates for DOI registration2024-03-13T19:32:29+01:00Matija ObrezaHandling of partial dates for DOI registrationDOI registration uses `yyyy-MM-dd` format and supports partial dates `yyyy-MM` and `yyyy`.
Code in `GlisDOIRegistrationManager#convertMcpdDateToRequest` is unable to handle partial MCPD dates like `2023----`, `20230000`, `202403--` or `...DOI registration uses `yyyy-MM-dd` format and supports partial dates `yyyy-MM` and `yyyy`.
Code in `GlisDOIRegistrationManager#convertMcpdDateToRequest` is unable to handle partial MCPD dates like `2023----`, `20230000`, `202403--` or `20240300` (`00` and `--` are interchangeable in MCPD but GGCE only uses `--`) and is unable to translate them to DOI registration format.2024.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/466Unable to download folders in repository2024-03-07T03:52:08+01:00Antonio RiveraUnable to download folders in repositoryWe are trying to download a while folder from the repository but it crases after a while.
![image](/uploads/d3bdafbbb9912e3c92e35577d82f4682/image.png)
![image](/uploads/585947016895991ded3c68e07110a077/image.png)
![image](/uploads/c5...We are trying to download a while folder from the repository but it crases after a while.
![image](/uploads/d3bdafbbb9912e3c92e35577d82f4682/image.png)
![image](/uploads/585947016895991ded3c68e07110a077/image.png)
![image](/uploads/c54f167db3b4cc173f177914b2f04e45/image.png)
This error only happens with root, first and second level. So I think it could be due to the folder size.
![image](/uploads/3cf9673767850ee117de00a620a218c8/image.png)
![image](/uploads/f200287c830e2e1384bd7291ea2b99e5/image.png)
![image](/uploads/7370ae1553ac773585a3f81846d4b30b/image.png)2024.2Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/464DOI is not matching in Genesys2024-03-07T09:14:13+01:00Antonio RiveraDOI is not matching in GenesysGiven the accession BW 56873 we have data inconsistency after submit it to GLIS.
![image.png](/uploads/da1e138971a5ad0721acd5e963b8afc9/image.png)
The DOI matches with GLIS site
![image.png](/uploads/861433a2dfd43172ee293e42bcd972a6/i...Given the accession BW 56873 we have data inconsistency after submit it to GLIS.
![image.png](/uploads/da1e138971a5ad0721acd5e963b8afc9/image.png)
The DOI matches with GLIS site
![image.png](/uploads/861433a2dfd43172ee293e42bcd972a6/image.png)
But in Genesys the DOI was not updated
![image.png](/uploads/b8455eeb77d0b72447e4d7e62352baa9/image.png)
![image.png](/uploads/7f05f008722ebd068d7d3dec6672f9b4/image.png)
The problem is that after to submit the data to GLIS, in Genesys the DOI was not updated despite GGCE returns a succeeded message.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/463Save Data Error on Curator Tool2024-03-13T19:32:29+01:00Antonio RiveraSave Data Error on Curator ToolAfter upgrade to 2024.1 version we have had several errors while trying to save the data in Curator Tool
**Order Items DataView**
![image.png](/uploads/16fe97678090e4bff9fca17b806ffbe7/image.png)
In relation to the order of the above...After upgrade to 2024.1 version we have had several errors while trying to save the data in Curator Tool
**Order Items DataView**
![image.png](/uploads/16fe97678090e4bff9fca17b806ffbe7/image.png)
In relation to the order of the above error, the user reports that in Order of type Phytosanitary testing the order items are not being saved. Is this related to the Session error?
**Order Wizard**
![image.png](/uploads/2c13f50166febc3ec4dfb88fac494490/image.png)
Session error in the crop trait, inventory and accesion dataviews.
![image.png](/uploads/f9f2204bc48c13c1a3f5a71902f26756/image.png)
![image.png](/uploads/88e070523c571a8cacf16a40d6437557/image.png)
In addition, the following window is shown suddenly without any interaction with Curator Tool or Dataview
![image.png](/uploads/6f07de71c5ad39fc2d8c58b7a09285af/image.png)2024.2Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/462Seed moisture content2024-03-14T07:45:54+01:00Matija ObrezaSeed moisture contentAdd to `SeedInventoryExtra` the fields to record the moisture content (MC) of seed and the date when it was measured.
```java
@Min(0) @Max(100)
private Float moistureContent;
private Instant moistureContentDate;
@CodeValue(DATE_FORMAT...Add to `SeedInventoryExtra` the fields to record the moisture content (MC) of seed and the date when it was measured.
```java
@Min(0) @Max(100)
private Float moistureContent;
private Instant moistureContentDate;
@CodeValue(DATE_FORMAT)
private String moistureContentDateCode;
```
These properties should be copied over to any split inventory, similar to how we copy `intialSeedViability`.
In the `InventoryController` we need an extra endpoint `.../moisture-content` to update only the MC fields.
/cc @jarias @jalarcon2024.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/460Extend search for similar Cooperators2024-02-19T13:36:57+01:00Matija ObrezaExtend search for similar CooperatorsDocumented in grin-global/grin-global-ui#651, the similarity search for Cooperators needs extending to include more fields in the search.Documented in grin-global/grin-global-ui#651, the similarity search for Cooperators needs extending to include more fields in the search.2024.1Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/458SOAP: CT assigns Cooperator ID to created/owned by fields2024-02-19T15:17:32+01:00Matija ObrezaSOAP: CT assigns Cooperator ID to created/owned by fieldsCT assigns current user's Cooperator ID to `ownedBy` field when a new record is added. But with the upgraded GGCE that checks that references are valid, this now causes a problem.
Also, no error message is returned, the table in CT is s...CT assigns current user's Cooperator ID to `ownedBy` field when a new record is added. But with the upgraded GGCE that checks that references are valid, this now causes a problem.
Also, no error message is returned, the table in CT is simply cleared.
![Foo](/uploads/9aa57ba47075c9e963c47ca8ee282eb7/Foo.m4v)2024.1Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/461Replace input control for the Availability Status Note field2024-02-22T15:27:28+01:00Antonio RiveraReplace input control for the Availability Status Note fieldWe need to replace the input control for the field **Availability Status Code**.
![image](/uploads/c0a7a4c3e9cefed8e626ac41afebaf2c/image.png)
We would like to use a Dropdown control or a typeahead control instead. The data source for ...We need to replace the input control for the field **Availability Status Code**.
![image](/uploads/c0a7a4c3e9cefed8e626ac41afebaf2c/image.png)
We would like to use a Dropdown control or a typeahead control instead. The data source for the Dropdown we need is the Code Values with the group_name = INVENTORY_STATUS_NOTE
![image](/uploads/c801fe4059ab40c417c7d6eb9c637d63/image.png)
![image](/uploads/9515870a53098ef8a571f8bc7701f0cd/image.png)2024.2Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/457Add Inventories By Id2024-01-31T09:04:25+01:00Antonio RiveraAdd Inventories By IdIn order to solve the issue [The server supports a maximum of 21000 parameters](https://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/450) we need a tool to add several inventories given their id as suggested in the Propos...In order to solve the issue [The server supports a maximum of 21000 parameters](https://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/450) we need a tool to add several inventories given their id as suggested in the Proposal 0:
![image](/uploads/9a4ff3c889400090ab3093903fbfaed4/image.png)
![image](/uploads/0aa66a4f5f2114191352f2bde6ef19f7/image.png)https://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/456Viability test's "completed date" is not recorded.2024-02-20T21:02:02+01:00Juan Carlos Alarcon MaldonadoViability test's "completed date" is not recorded.The "completed date" field of the Viability test action is not recorded after the test is finished.
The viability test finished:
![image](/uploads/a659798821f190d45b144be565454199/image.png)
The `Complete date` is missing:
![image]...The "completed date" field of the Viability test action is not recorded after the test is finished.
The viability test finished:
![image](/uploads/a659798821f190d45b144be565454199/image.png)
The `Complete date` is missing:
![image](/uploads/52749310163062667cb4281f70cf9442/image.png)2024.2Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/455Check MCPD Availability2024-01-24T08:04:52+01:00Matija ObrezaCheck MCPD AvailabilityAccording to grin-global/grin-global-server#274 this accession's availability should be `false` while GGCE generates `null`:
![image](https://gitlab.croptrust.org/genesys-pgr/genesys-ui/uploads/52d9a45a82348f10462b545c297c21a7/image.png)According to grin-global/grin-global-server#274 this accession's availability should be `false` while GGCE generates `null`:
![image](https://gitlab.croptrust.org/genesys-pgr/genesys-ui/uploads/52d9a45a82348f10462b545c297c21a7/image.png)2024.1Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/454Add entity names2024-01-29T05:56:11+01:00Antonio RiveraAdd entity namesWe need to see the entity name form the Geography and Accession in the Accession details screen instead of the entity id.
**Accession Details**
![image](/uploads/47f00786386dfe0fc078fd2cb8a151c6/image.png)
**Accession source history**...We need to see the entity name form the Geography and Accession in the Accession details screen instead of the entity id.
**Accession Details**
![image](/uploads/47f00786386dfe0fc078fd2cb8a151c6/image.png)
**Accession source history**
![image](/uploads/a607b1e3e97a0b87bbea46f913050458/image.png)
**Intellectual Property Rights/Restrictions**
![image](/uploads/8aa1d4c54e3d9fdd812a9e79f5710722/image.png)2024.1Maksym TishchenkoMaksym Tishchenkohttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/453Could not start upload to Genesys: [object Object]2024-03-07T23:53:30+01:00Antonio RiveraCould not start upload to Genesys: [object Object]We have an error while try to upload data to Genesys.
![image](/uploads/2ba195e9b3a6be20931e8628fc6ff6c6/image.png)
This error is thrown randomly after several requests to the following EndPoint in both of our instances:
`api/v1/genes...We have an error while try to upload data to Genesys.
![image](/uploads/2ba195e9b3a6be20931e8628fc6ff6c6/image.png)
This error is thrown randomly after several requests to the following EndPoint in both of our instances:
`api/v1/genesys/accessions/upload`
Response is not available when the error occurs
![image](/uploads/88ce8e68cab2de3ae2bded0865b3b82f/image.png)
Although the error is thrown in different Web Browsers, the error described is not the same
**Maize - Google Chrome (Latest version)**
`net::ERR_HTTP2_PROTOCOL_ERROR`
![image](/uploads/f2f9f32181a210b622c0ce35889b9879/image.png)
**Wheat- Firefox (Latest version)**
`Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://wgb2024-server.cimmyt.org/api/v1/genesys/accessions/upload. (Reason: CORS request did not succeed). Status code: (null).`
![image](/uploads/35e1f6ffa686d577df1363cb1f1aeb79/image.png)
Once the error is thrown user can try to upload data again and it works fine.
There is not a "pattern". Error could be thrown since the first request or fifth or tenth.
Note: The upload process continues but the "progress modal" closes.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/452Mapping accessions thru requests from Genesys2024-01-26T06:00:38+01:00Antonio RiveraMapping accessions thru requests from GenesysOne of our users proccesed a Genesys request and use the "Automatically Map Accesions" function. It worked fine. However, the user reports that GGCE selected inventories that do not satisfy the avaliability criteria.
![image](/uploads/0...One of our users proccesed a Genesys request and use the "Automatically Map Accesions" function. It worked fine. However, the user reports that GGCE selected inventories that do not satisfy the avaliability criteria.
![image](/uploads/054817df9f9803d6541c4b8bd142f99b/image.png)
![image](/uploads/d7c5bf68bf84fb53e4317afbfa50c1ee/image.png)
![image](/uploads/2f259b5462f79cf4869bf4f9d9217e98/image.png)
The availability criteria should be Is Autodeducted and Is Available. Right?https://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/451Increase the Organization Abbreviation field length2024-01-22T13:47:41+01:00Antonio RiveraIncrease the Organization Abbreviation field lengthWe need to increase the **Organization Abbreviation** field length to the same length that Genesys has. The length is not the same so we had to remove some characters to avoid an error
![image](/uploads/71f1bc0dafe63401cf7e97c4f7fa4d73/...We need to increase the **Organization Abbreviation** field length to the same length that Genesys has. The length is not the same so we had to remove some characters to avoid an error
![image](/uploads/71f1bc0dafe63401cf7e97c4f7fa4d73/image.png)
![image](/uploads/45d14a58509425906283a321a7dcc5ce/image.png)2024.1Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/450The server supports a maximum of 2100 parameters2024-01-31T09:04:28+01:00Antonio RiveraThe server supports a maximum of 2100 parametersThe Search Panel is throwing the an error while searching a set of inventories in the barcode field.
![image](/uploads/098e4eb3f9fbbeb01f99152fc9512287/image.png)
```
Error: The incoming request has too many parameters. The server supp...The Search Panel is throwing the an error while searching a set of inventories in the barcode field.
![image](/uploads/098e4eb3f9fbbeb01f99152fc9512287/image.png)
```
Error: The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
could not extract ResultSet
could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet
URL: https://wgb2024.cimmyt.org/dist/request/7170#items
```
**URL**
`https://wgb2024-server.cimmyt.org/api/v1/i/filter?l=100`
**Input**
[input.json](/uploads/3946d74e0332183422e3efc7d27baec6/input.json)Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/449Does not record all changes in Curator tool GGCE2024-02-10T16:49:22+01:00Alejandro VelazquezDoes not record all changes in Curator tool GGCEAn attempt has been made to make massive changes in the pollination method field, taking the amount of 3000 inventories more or less.
The value is modified,
Changes are saved
Some inventories not updated. (amount varies)
but it doesn't...An attempt has been made to make massive changes in the pollination method field, taking the amount of 3000 inventories more or less.
The value is modified,
Changes are saved
Some inventories not updated. (amount varies)
but it doesn't show any error.
Previous value:
![image](/uploads/2ec644e5d9c2720d1b1d316b9bee55d4/image.png)
Changes made:
![image](/uploads/c8aaedf745571a8014617f5cb3a8d7b0/image.png)
After saving:
![image](/uploads/f5c8af10f1596cdf036a9ab70b093c01/image.png)Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/448Generic error when saving data2024-01-17T09:14:23+01:00Antonio RiveraGeneric error when saving dataA generic error is raised in the "Adjust Inventory Quantity" and "Record new observation" screens when saving data. The error is generated randomly for the same inventory or observation.
**Record New Observation**
![image](/uploads/e0b...A generic error is raised in the "Adjust Inventory Quantity" and "Record new observation" screens when saving data. The error is generated randomly for the same inventory or observation.
**Record New Observation**
![image](/uploads/e0b81e1cb01465cf7e1f23204dde44df/image.png)
![image](/uploads/96b87cdc70c50797d353cf7c742fcb0d/image.png)
**Adjust Inventory Quantuty**
![image](/uploads/1c6d4b6a414bd6c69db4e54491abc634/image.png)
There are not any error in the logs and the message is the same except the url
- viability/observation
- inventory/adjust
![image](/uploads/2143a9a0d94e438cb87c59ba12214a13/image.png)
I have attached the logs file.
[wheat.zip](/uploads/7f9bcc2c453f965586f920accf17acd2/wheat.zip)Matija ObrezaMatija Obreza