GGCE Server issueshttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues2023-02-07T15:28:54+01:00https://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/360Liquibase: conflicting manual changes to schema2023-02-07T15:28:54+01:00Matija ObrezaLiquibase: conflicting manual changes to schemaWe have users that have manually updated the database schema and sometimes populated new columns (e.g. `accessionNumber`).
Attached are scripts that create the schema of the database at one of the partners. Please note that the script w...We have users that have manually updated the database schema and sometimes populated new columns (e.g. `accessionNumber`).
Attached are scripts that create the schema of the database at one of the partners. Please note that the script works with `gringlobal_nodata` database and needs updating for local use!
[gringlobal_nodata.sql](/uploads/6d6a6d27a65a379b67aa1182bf660e2d/gringlobal_nodata.sql)
GGCE should be tolerant to such cases and should not fail if columns (or constraints) already exist.
## Options
Option 1: When the user does manual changes to the database, they should flag that the change has already been executed in `DATABASECHANGELOG`. The problem here is to know what change `ID`, hash values, etc. they should insert to the database.
Option 2: Update `changeLog.yml` to always use preconditions (to check if columns/constraints already exist) and use `MARK_RAN`.
# What now?
Option **1** seems to be the safer option as it requires that the user correctly executes the manual upgrade + marks it in `DATABASECHANGELOG`.
Option **2** would be useful, but unfortunately requires a lot of updating of `liquibase-changeLog.yml`.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/359Palmira: Permissions for GHU and Location2023-03-14T08:21:42+01:00Matija ObrezaPalmira: Permissions for GHU and Location@1cgiar/palmira @jarias GGCE currently does not do any permission checks for the services you requested.
GGCE permissions are based on `site` and **area**. Should we add an area for "Location management" and for "Plant health"?@1cgiar/palmira @jarias GGCE currently does not do any permission checks for the services you requested.
GGCE permissions are based on `site` and **area**. Should we add an area for "Location management" and for "Plant health"?James AriasJames Ariashttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/358Jasper Reports: Resources subfolder2022-09-27T12:25:43+02:00Juan Carlos Alarcon MaldonadoJasper Reports: Resources subfolderEnable the functionality for JasperReport to get the auxiliary files as translation files, subreports, and images from the **resources** subfolder, see the images.
`resources` subfolder :
![image](/uploads/35fc96eb8978d727186845b93afbe...Enable the functionality for JasperReport to get the auxiliary files as translation files, subreports, and images from the **resources** subfolder, see the images.
`resources` subfolder :
![image](/uploads/35fc96eb8978d727186845b93afbebf1/image.png)
files:
![image](/uploads/5233d7a0601af1a76e7c19218cff9373/image.png)
## Implementation
This is linked to the implementation of custom classloader functionality in !452 and resources and classes are fetched and loaded from the `FileRepository`.
In this ticket we implement a new `FileRepositoryClassLoader extends ClassLoader`. It behaves to `JasperReportServiceImpl.ResourceRepository`: it is configured with a base path (e.g. `/reports/Crop/resources`).
## Selecting the **locale**
The API call should use the current locale (from `LocaleContextHolder`) by default, but we need to also add support to pass the **target locale** to the service. This way a user can generate a report in Spanish even if they are working in English.2022.8Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/357Can not set password2022-10-11T13:20:30+02:00Antonio RiveraCan not set passwordI can not set the password for any user:
![image](/uploads/3b1aa82b318c52d3d84eb052704888ae/image.png)
I have tried with three different users. The password length is 10 and has numbers and special charactersI can not set the password for any user:
![image](/uploads/3b1aa82b318c52d3d84eb052704888ae/image.png)
I have tried with three different users. The password length is 10 and has numbers and special charactersArtem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/356Jasper Reports: Accessing translated code values2022-09-23T15:01:44+02:00Matija ObrezaJasper Reports: Accessing translated code valuesIn our reports we commonly have a need to display `CodeValue` titles, but these are now not accessible in Jasper.
One suggestion is to implement a custom Jasper expression (see https://community.jaspersoft.com/wiki/jaspersoft-studio-exp...In our reports we commonly have a need to display `CodeValue` titles, but these are now not accessible in Jasper.
One suggestion is to implement a custom Jasper expression (see https://community.jaspersoft.com/wiki/jaspersoft-studio-expression-editor-how-extend-it-and-contribute-your-own-functions-part-2):
```
CODEVALUE("CODE_GROUP", field.getSomeCode(), "en")
```
This expression will fetch the `TranslatedCodeValue` and return its `title`.
The selected language to use for the template will eventually be provided by GGCE (another day, another issue).
I don't think we need to provide a `.jar` for report developers, but we definitely need to have this function available in the runtime when generating reports.2022.8Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/355Change detection of JPA repositories2022-09-16T18:39:35+02:00Matija ObrezaChange detection of JPA repositoriesDuring debugging of Gitlab builds I noticed that `DataviewServiceImpl#afterPropertiesSet` takes quite some time:
> 18:45:39,875 main ERROR VirtualLookupServiceImpl:129 - Found 64 virtual dataviews in 52ms.
> 18:45:40,735 main ERROR Da...During debugging of Gitlab builds I noticed that `DataviewServiceImpl#afterPropertiesSet` takes quite some time:
> 18:45:39,875 main ERROR VirtualLookupServiceImpl:129 - Found 64 virtual dataviews in 52ms.
> 18:45:40,735 main ERROR DataviewServiceImpl:248 - Found 172 JPA entities in 39ms.
> 18:45:51,039 main ERROR DataviewServiceImpl:263 - Found 171 JPA repositories in **10342ms**.
This can also be seen with every *first* test of a new context: the first one always takes 10-20 seconds, most of it because of the `DataviewServiceImpl`.
Please find a more efficient way of initializing the available JPA repositories map.2022.8Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/354Add WithdrawnInventory2023-02-07T15:30:28+01:00James AriasAdd WithdrawnInventoryIt is possible to add the object or id(WithdrawnInventory) in the json in the following endpoint `POST-api/v1/order/items/action/list`, `POST-/api/v1/order/items/{id}/action/list`.It is possible to add the object or id(WithdrawnInventory) in the json in the following endpoint `POST-api/v1/order/items/action/list`, `POST-/api/v1/order/items/{id}/action/list`.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/353Inventory crashes after refresh2022-09-14T10:46:34+02:00Antonio RiveraInventory crashes after refreshThe following error is raised after refresh the inventory module a couple of times:
![image](/uploads/dfc26e875fdd27d3e8aad9a3623331ed/image.png)
The console error [links to the react documentation](https://reactjs.org/docs/error-decod...The following error is raised after refresh the inventory module a couple of times:
![image](/uploads/dfc26e875fdd27d3e8aad9a3623331ed/image.png)
The console error [links to the react documentation](https://reactjs.org/docs/error-decoder.html?invariant=321)
This issue is only present in Google Chrome (Normal, not Incognito). I tried with Firefox and it works perfectly.
I cleared the cache and application data for GGCE but the problem raises after a whilehttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/352Print labels not working2022-09-14T10:56:46+02:00Antonio RiveraPrint labels not workingThe PRINT LABELS button is not working. It is just sending a message in the console with the INVENTORYITEM Application setting value
![image](/uploads/74ece4acc3e78d48a691e6c08df701c7/image.png)
![image](/uploads/7ba09c44ca5b2e22a10626...The PRINT LABELS button is not working. It is just sending a message in the console with the INVENTORYITEM Application setting value
![image](/uploads/74ece4acc3e78d48a691e6c08df701c7/image.png)
![image](/uploads/7ba09c44ca5b2e22a1062671e93d97c1/image.png)
Is there an additional setting we have to add?https://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/351Radio button is missing in Print label window2022-09-14T10:33:44+02:00Antonio RiveraRadio button is missing in Print label windowThe radio button is missing when only exists one INVENTORYITEM Application setting
![image](/uploads/081c1de922ffb837ce2d61d2c35feb1b/image.png)
We had to add two identical applications settings.
Is this the right behavior?The radio button is missing when only exists one INVENTORYITEM Application setting
![image](/uploads/081c1de922ffb837ce2d61d2c35feb1b/image.png)
We had to add two identical applications settings.
Is this the right behavior?https://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/350Offline Application with OAuth 2.02023-02-07T18:37:50+01:00James AriasOffline Application with OAuth 2.0Good morning @mobreza @jalarcon
- Changing the form of authentication to **OAuth 2.0** has a direct impact on all the software projects that we are developing: in **time and cost**, because the developments already carried out must impl...Good morning @mobreza @jalarcon
- Changing the form of authentication to **OAuth 2.0** has a direct impact on all the software projects that we are developing: in **time and cost**, because the developments already carried out must implement the change.
Another problema that we present is that the Field app Works **Offline**. We don't know how to implement **OAuth 2.0** to make it work offline.
We request to enable the token by **Basic Auth** to remove the impact. This is posible?
- Is it posible to use the **Token** generated with **Basic Auth** "{{host}}/oauth2/token" in the authorization of services? When we try to use that token, it throws us a **401** error. An image is shown below:
**Image 1: Generate token**
![image](/uploads/7c4a0c81b0ee3a3092214f6383e8c098/image.png)
**Image 2: Use token**, 401 error appears. Can the use of the token be enabled?
![image](/uploads/ce72492e9110e47e367135665bf1acf0/image.png)
Best regardsMatija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/349Are all String fields in the DB StringFilter?2022-09-14T10:43:47+02:00James AriasAre all String fields in the DB StringFilter?Good Morning @mobreza
I have found some fields that only Arrays or String like in `location.location_type_code`, `location.capacity_unit_code`, `location.action_name_code`, `location_data.location_property_code`, `location_data.unit_co...Good Morning @mobreza
I have found some fields that only Arrays or String like in `location.location_type_code`, `location.capacity_unit_code`, `location.action_name_code`, `location_data.location_property_code`, `location_data.unit_code`, etc
It is posible that all String fields are `StringFilter` or at least in all `code_values`
SaludosMatija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/348Feedback on plant health services2022-09-27T12:32:19+02:00James AriasFeedback on plant health servicesGood afternoon @mobreza
Attached a list of the errors we found in the health services.
- `POST pathogen/geography/list` - This service is not, it can be added to the `POST pathogen/list` as a list.
- `GET pathogen/geography/list` - Do...Good afternoon @mobreza
Attached a list of the errors we found in the health services.
- `POST pathogen/geography/list` - This service is not, it can be added to the `POST pathogen/list` as a list.
- `GET pathogen/geography/list` - Does not return the `pathogen` and `geography`.
![image](/uploads/99afe9bff0418c8f912e65daf2918b69/image.png)
- `POST pathogen/order-request-item/list` - This service is not, it can be added to the `POST pathogen/list`.
- `GET pathogen/order-request-item/list` - Does not return the `pathogen` and `orderRequestItem`.
![image](/uploads/8cff4aaace65d97c0451ce99a6669869/image.png)
- `PUT pathogen/order-request-item` - Returns `NullPointerException` error.
![image](/uploads/d5b26950f1566e3448bb5a3757a38362/image.png)
- `PUT pathogen/species` - Return columna error `pathogen_taxonomy_species_map_id`, in the **DB** appears `pathogen_taxonomy_species_map.pathogen_geography_map_id`.
![image](/uploads/20f5ceb5d6cf80bb16f8a796fd4af91b/image.png)
![image](/uploads/63b94f5903a7ce5231303541ad223df3/image.png)
- `GET pathogen/symptom/list` - Does not return the `pathogen` and `symptom`.
![image](/uploads/671e525aa1a713d63dcb82de15b6026e/image.png)
- `POST pathogen/symptom/list` - This service is not, it can be added to the `POST symptom/list` as a list.
- `GET symptom/inventory/list` - Does not return the `inventory` and `symptom`.
![image](/uploads/d957677119510b635971c707fc71d1c0/image.png)
- The following services have the same problem `pathogen/attach/{id}` ; `symptom/attach/{id}` ; `symptom/inventory/attach/{id}`
![image](/uploads/fb9b676d6e5bc04e7180474fc226485c/image.png)
- `POST i/quality/attach/{id}` - The service is not
Thank you very much for your attentionArtem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/347Curator Tool error in GG-CE manila2022-10-28T23:09:18+02:00Lilibeth SisonCurator Tool error in GG-CE manila@mobreza
![image](/uploads/171dbd6a6a5c59a547c3344e74e3e771/image.png)@mobreza
![image](/uploads/171dbd6a6a5c59a547c3344e74e3e771/image.png)https://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/346Add MTA type to OrderRequest2022-09-27T10:04:42+02:00Juan Carlos Alarcon MaldonadoAdd MTA type to OrderRequestThe values of **mtaType** must be selected from `code-values` in the group `MTA_TYPE`, the values are:
1. `SMTA_SIGNED`: **Signed SMTA**. The SMTA is sent to the recipient for physical signature and the material is shipped when the sign...The values of **mtaType** must be selected from `code-values` in the group `MTA_TYPE`, the values are:
1. `SMTA_SIGNED`: **Signed SMTA**. The SMTA is sent to the recipient for physical signature and the material is shipped when the signed document is received by the Provider.
1. `SMTA_CLICK`: **Click-wrap SMTA**. The SMTA is prepared by the provider and makes it available to the recipient for acceptance by electronic means.
1. `SMTA_SHRINK`: **Shrink-wrap SMTA**. The document is shipped along with the material. By accepting the parcel, the recipient accepts the terms of the agreement. No signature is required.
The *MTA type* field must be added to the order request form.
Please also include the **order_obtained_via** field, already available in the model, to be manipulated by the user.
![image](/uploads/57bb6688dcb58d17ea7615b75ec2a97f/image.png)2022.8Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/345GGCE Data model Jar file looks empty.2022-09-27T10:04:42+02:00Juan Carlos Alarcon MaldonadoGGCE Data model Jar file looks empty.I downloaded the GGCE Data model Jar file from the GGCE server site but the size of the file is very different versus Jar file `ggce-model-2022.6.jar`.
![image](/uploads/07cc6d154a0acd5d68f7d683b5f87be7/image.png)
size files:
![image]...I downloaded the GGCE Data model Jar file from the GGCE server site but the size of the file is very different versus Jar file `ggce-model-2022.6.jar`.
![image](/uploads/07cc6d154a0acd5d68f7d683b5f87be7/image.png)
size files:
![image](/uploads/e2ba3c4fd27949e638fc54b7ab80db3e/image.png)
the file ggce-model-2022.7.jar was downloaded from [Demo instance](https://demo.ggceapi.genesys-pgr.org)2022.8Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/344Error in api/v1/location in Palmira branch2022-09-08T18:42:07+02:00Juan Carlos Alarcon MaldonadoError in api/v1/location in Palmira branchThe user got an error with `api/v1/location`
![image](/uploads/5d3eb82deadcafd118a43edf4d42b229/image.png)
@jarias
The issue is in `liquibase-changeLog.yml` where the auditing fields (`created_by`, etc) point to `dbo.cooperator` inst...The user got an error with `api/v1/location`
![image](/uploads/5d3eb82deadcafd118a43edf4d42b229/image.png)
@jarias
The issue is in `liquibase-changeLog.yml` where the auditing fields (`created_by`, etc) point to `dbo.cooperator` instead of `dbo.acl_sid`.Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/343Unauthorize grant password2022-09-08T18:42:24+02:00Antonio RiveraUnauthorize grant passwordIn order to keep our Development server in optimal conditions, we carry out an update of the operating system.
We perform the following steps:
1. Stop all docker containers
2. Update the server
3. Free the server memory
4. Start the ...In order to keep our Development server in optimal conditions, we carry out an update of the operating system.
We perform the following steps:
1. Stop all docker containers
2. Update the server
3. Free the server memory
4. Start the docker service
5. Run all dockers again
All steps were successful. However, when trying to log in to one of the instances (we have two instances of GGCE), the following error is being raised:
![image](/uploads/95ce40bb76d76e43ef657cdebdfbfb2f/image.png)
This problem is present for all users in only one of our instace. The second one has not bee affected
[log_in_server.zip](/uploads/55007f24f042272db46421e64de01aff/log_in_server.zip)https://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/342inventory amounts not showing2022-08-17T14:30:51+02:00Lilibeth Sisoninventory amounts not showing@jalarcon in the early versions of GGCE we can view the values in this form.
![image](/uploads/c50734f306de237c0ee60396085f0a1b/image.png)@jalarcon in the early versions of GGCE we can view the values in this form.
![image](/uploads/c50734f306de237c0ee60396085f0a1b/image.png)Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/grin-global/grin-global-server/-/issues/340Acquisition. Error creating accessions when an inventory group exist.2022-09-27T10:04:42+02:00Juan Carlos Alarcon MaldonadoAcquisition. Error creating accessions when an inventory group exist.I got an error message when I try to create new accessions in an existing Group (Inventory Group)
![image](/uploads/f29e35eabc8a3bc15db0c71037b9247e/image.png)
![image](/uploads/544cc015ab676383c71614a3d30e1acd/image.png)
looks li...I got an error message when I try to create new accessions in an existing Group (Inventory Group)
![image](/uploads/f29e35eabc8a3bc15db0c71037b9247e/image.png)
![image](/uploads/544cc015ab676383c71614a3d30e1acd/image.png)
looks like the problem is with the creation of `Inventory Group`.
**the log says:**
Streaming log messages...
2022-08-12 10:01:32 qtp510109769-20 WARN AccessionServiceImpl:463 - Created 5 accessions
2022-08-12 10:01:32 qtp510109769-20 WARN AccessionServiceImpl:477 - Created 5 inventories
2022-08-12 10:01:32 qtp510109769-20 WARN ApiExceptionHandler:179 - could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement for POST https://demo.ggceapi.genesys-pgr.org/api/v1/a/acquire2022.8Artem HrybeniukArtem Hrybeniuk