Genesys Backend issueshttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues2021-08-02T11:33:03+02:00https://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/592Merge AccessionGeo to AccessionId2021-08-02T11:33:03+02:00Matija ObrezaMerge AccessionGeo to AccessionIdWe have a 1-to-1 relationship between `AccessionId` and `AccessionGeo`. This results in complex queries by `latitude` and `longitude`.
Please move the fields from `AccessionGeo` to `AccessionId` and drop `AccessionGeo` from the database...We have a 1-to-1 relationship between `AccessionId` and `AccessionGeo`. This results in complex queries by `latitude` and `longitude`.
Please move the fields from `AccessionGeo` to `AccessionId` and drop `AccessionGeo` from the database.
We still need the `AccessionGeo` class to keep API responses compatible. It can be created in `AccessionId#getAccessionGeo()`.2021.3Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/596Upgrade dependencies2021-08-03T18:01:01+02:00Matija ObrezaUpgrade dependenciesFollowing genesys-pgr/file-repository#38 and genesys-pgr/application-blocks#44 please upgrade Genesys Server dependencies.Following genesys-pgr/file-repository#38 and genesys-pgr/application-blocks#44 please upgrade Genesys Server dependencies.2021.3Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/598Admin: Audit logs API2021-09-20T18:23:49+02:00Maxym BorodenkoAdmin: Audit logs APIhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/822 requires CRUD API for audit logs.https://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/822 requires CRUD API for audit logs.2021.3Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/599Set the secret for an OAuthClient2021-09-20T18:23:49+02:00Maxym BorodenkoSet the secret for an OAuthClientAdd an endpoint to **set** the secret for an `OAuthClient`. Can be applied to GG-CE as well.Add an endpoint to **set** the secret for an `OAuthClient`. Can be applied to GG-CE as well.2021.3Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/600Extra localizations of country names2021-09-20T18:23:49+02:00Matija ObrezaExtra localizations of country namesGenesys sources country names in different languages from geonames. It happens that a country name is not available for a specific language.
E.g. `zh-TW` translation for `USA` is not available and I need to be able to register it.
We n...Genesys sources country names in different languages from geonames. It happens that a country name is not available for a specific language.
E.g. `zh-TW` translation for `USA` is not available and I need to be able to register it.
We need to be able to store a JSON of customized translations in `Country.nameJCustom` field and this JSON is then merged to the incoming `nameJ` string. `nameJCustom` adds or overwrites values for `nameJ`.
We will also need a `CRUDController<Country>` for ADMINISTRATORS. I don't think we have one.2021.3Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/602Uploader: Clearing accessionId.coll2021-09-20T18:23:49+02:00Matija ObrezaUploader: Clearing accessionId.collWhile testing integration with GG-CE I stumbled upon an error where
the existing record in the database has some collecting data, including one value in `accession.accessionId.coll.collName` list and a date in `accession.accessionId.coll...While testing integration with GG-CE I stumbled upon an error where
the existing record in the database has some collecting data, including one value in `accession.accessionId.coll.collName` list and a date in `accession.accessionId.coll.collDate`. The new upload sets:
```json
...
"coll": {
"collDate": null,
"collSite": null,
"collNumb": null,
"collSrc": null,
"collMissId": null,
"collCode": [],
"collName": [],
"collInstAddress": []
},
...
```
This should effectively remove the `AccessionCollect` record from the database in `AccessionUploader` at:
![image](/uploads/a3da6ef56c801996594b9a7754d2a608/image.png)
It results in **Cannot delete or update a parent row:** *(`sandbox`.`accession_collect_name`, CONSTRAINT `FK_g6h5uuvq16105ljx8r1jjxojr` FOREIGN KEY (`collectId`) REFERENCES `accession_collect` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION)*:
```
Upload resulted in: ERROR instCode=MEX002 doi=10.18730/G8G4B acceNumb=CIMMYTMA 71 genus=Zea
error=could not execute batch; SQL [delete from accession_collect where id=? and version=?]; constraint [null];
nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch
could not execute batch
(conn=266448) Cannot delete or update a parent row:
a foreign key constraint fails
(`sandbox`.`accession_collect_name`, CONSTRAINT `FK_g6h5uuvq16105ljx8r1jjxojr` FOREIGN KEY (`collectId`) REFERENCES `accession_collect` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION)
```
Please add a unit test and figure this out.2021.3Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/604HTTP CSP headers2021-09-20T18:23:49+02:00Matija ObrezaHTTP CSP headersPlease update Genesys to CSP headers, especially:
- `Content-Security-Policy: frame-src 'none'`Please update Genesys to CSP headers, especially:
- `Content-Security-Policy: frame-src 'none'`2021.3Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/605Issue with CSVMessageConverter2021-09-20T18:23:50+02:00Matija ObrezaIssue with CSVMessageConverterOur `CSVMessageConverter` relies on Jackson serialization to JSON before producing the `text/csv` response.
The current implementation does not properly handle cases where Jackson serializes just the `id` of the referenced object it has...Our `CSVMessageConverter` relies on Jackson serialization to JSON before producing the `text/csv` response.
The current implementation does not properly handle cases where Jackson serializes just the `id` of the referenced object it has serialized before:
![image](/uploads/834ca916dbfb78671dc2bf4734b4eb40/image.png)
Please update the unit tests to ensure referenced entities (`countryOfOrigin`, `taxonomy`, `taxonomy.grinTaxonomy`, ...) are fully serialized in CSV.
Genesys website is not affected by this, it is able to handle these references.2021.3Maxym BorodenkoMaxym Borodenko