Genesys Backend issueshttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues2018-11-12T20:08:32+01:00https://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/363Extra country updater2018-11-12T20:08:32+01:00Matija ObrezaExtra country updaterWe have existing updaters for country codes and names that update the `Country` model. Implement a custom updater (can be based on `DavrosCountrySource`) that will ensure the following **custom** ISO3316-3 codes are imported as `impl.Cou...We have existing updaters for country codes and names that update the `Country` model. Implement a custom updater (can be based on `DavrosCountrySource`) that will ensure the following **custom** ISO3316-3 codes are imported as `impl.Country` to Genesys:
```
NAME, CODE3, URL
AfricaRice, XAB, http://www.africarice.org/
Bioversity, XAC, https://www.bioversityinternational.org/
CIAT, XAD, https://ciat.cgiar.org/
CIMMYT, XAE, https://www.cimmyt.org/
CIP, XAF, https://cipotato.org/
ICARDA, XAG, http://www.icarda.org/
ICRAF, XAH, http://www.worldagroforestry.org/
ICRISAT, XAI, https://www.icrisat.org/
IITA, XAJ, http://www.iita.org/
ILRI, XAK, https://www.ilri.org/
IRRI, XAM, http://irri.org/
```
Perhaps best to put this data to `src/main/resources/iso3316/custom.csv`, other codes may follow.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/354Repository API v12018-10-02T12:58:04+02:00Matija ObrezaRepository API v1Implement API to Repository serviceImplement API to Repository service2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/352DatasetFilter with Accession2018-10-11T12:57:42+02:00Matija ObrezaDatasetFilter with Accession`Dataset` model is linked with `AccessionId`, which affects filtering datasets by `Accession`.
Explore how we can filter datasets by `Accession` properties.
#358 Solves this problem.`Dataset` model is linked with `AccessionId`, which affects filtering datasets by `Accession`.
Explore how we can filter datasets by `Accession` properties.
#358 Solves this problem.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/349Image gallery 5002018-10-01T15:51:11+02:00Matija ObrezaImage gallery 500https://sandbox.genesys-pgr.org/admin/r/g/crop/cowpeahttps://sandbox.genesys-pgr.org/admin/r/g/crop/cowpea2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/343Err: Class is not indexed interface2018-09-26T11:45:54+02:00Matija ObrezaErr: Class is not indexed interfaceFrom the server log:
```java
2018-09-25T09:30:37.770907745Z 09:30:37,770 qtp485815673-364 ERROR o.g.s.m.UserControllerAdvice:89 - Class is not indexed interface org.genesys2.server.model.json.Api1Constants$Accession on GET http://sandbo...From the server log:
```java
2018-09-25T09:30:37.770907745Z 09:30:37,770 qtp485815673-364 ERROR o.g.s.m.UserControllerAdvice:89 - Class is not indexed interface org.genesys2.server.model.json.Api1Constants$Accession on GET http://sandbox.genesys-pgr.org/explore/charts/data/country-collection-size
2018-09-25T09:30:37.770942665Z java.lang.RuntimeException: Class is not indexed interface org.genesys2.server.model.json.Api1Constants$Accession
2018-09-25T09:30:37.770952287Z at org.genesys2.server.service.impl.ElasticsearchServiceImpl.termStatistics(ElasticsearchServiceImpl.java:643)
2018-09-25T09:30:37.770958736Z at org.genesys2.server.service.impl.ElasticsearchServiceImpl.termStatisticsAuto(ElasticsearchServiceImpl.java:713)
2018-09-25T09:30:37.770964728Z at org.genesys2.server.service.impl.ElasticsearchServiceImpl.termStatisticsAuto(ElasticsearchServiceImpl.java:707)
2018-09-25T09:30:37.770984744Z at sun.reflect.GeneratedMethodAccessor1153.invoke(Unknown Source)
2018-09-25T09:30:37.770990979Z at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2018-09-25T09:30:37.770996182Z at java.lang.reflect.Method.invoke(Method.java:498)
2018-09-25T09:30:37.771001051Z at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
2018-09-25T09:30:37.771007089Z at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
2018-09-25T09:30:37.771012936Z at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
2018-09-25T09:30:37.771018273Z at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
2018-09-25T09:30:37.771023239Z at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
2018-09-25T09:30:37.771028957Z at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
2018-09-25T09:30:37.771034562Z at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
2018-09-25T09:30:37.771039615Z at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
2018-09-25T09:30:37.771044651Z at com.sun.proxy.$Proxy214.termStatisticsAuto(Unknown Source)
2018-09-25T09:30:37.771049851Z at org.genesys2.server.mvc.ChartsController.accessionsCollection(ChartsController.java:92)
```2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/342Blank duplSite2018-09-26T20:20:22+02:00Matija ObrezaBlank duplSiteAccession overviews shows empty string as the most common Site of safety duplication.Accession overviews shows empty string as the most common Site of safety duplication.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/340Organization: view map2018-09-26T20:29:17+02:00Matija ObrezaOrganization: view mapThe Organization MVC controller at `/org/{slug}/map` does not show a map of institutes.
## Alternatively
... it should redirect to map of accessions `/explore/map?filter=.....`
1. https://sandbox.genesys-pgr.org/org/COGENT
1. Click "...The Organization MVC controller at `/org/{slug}/map` does not show a map of institutes.
## Alternatively
... it should redirect to map of accessions `/explore/map?filter=.....`
1. https://sandbox.genesys-pgr.org/org/COGENT
1. Click "View map"
1. **Expected:** the user is redirected to the standard accession map2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/339FTP2018-09-24T08:48:29+02:00Matija ObrezaFTPUpgrade to file-repository-ftp:1.1-SNAPSHOT that introduces repository folders and ACL.Upgrade to file-repository-ftp:1.1-SNAPSHOT that introduces repository folders and ACL.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/338AsciiDocController v12018-09-29T18:04:48+02:00Matija ObrezaAsciiDocController v1Copy `org.genesys2.server.mvc.AsciiDocController` to **server.api.v1** with **`APIv1_BASE + /cms/d`** base path.
- Add `produces=` content typesCopy `org.genesys2.server.mvc.AsciiDocController` to **server.api.v1** with **`APIv1_BASE + /cms/d`** base path.
- Add `produces=` content types2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/333Tile server: caching2018-09-17T07:11:49+02:00Matija ObrezaTile server: cachingTile server should use longer TTL in caching headers, especially for zoom levels 0-6, as tiles on these levels scan a lot of accession records. On higher zoom levels, fewer records are required and the TTL can be lower.
Set max-age head...Tile server should use longer TTL in caching headers, especially for zoom levels 0-6, as tiles on these levels scan a lot of accession records. On higher zoom levels, fewer records are required and the TTL can be lower.
Set max-age header as follows:
1. 0-4: max-age 1day
1. 4-6: max-age 1hr
1. 7+: max-age 5min
2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/332CDN issue2018-09-16T13:13:26+02:00Matija ObrezaCDN issuehttps://cdn1.sandbox.genesys-pgr.org/acn/tile/3/4/1?f=v13fc6a432ab2b4d5e8ac8064f01d1fa03
```xml
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>C4CF5C346A9FFD4A<...https://cdn1.sandbox.genesys-pgr.org/acn/tile/3/4/1?f=v13fc6a432ab2b4d5e8ac8064f01d1fa03
```xml
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>C4CF5C346A9FFD4A</RequestId>
<HostId>ZEPMCu2JmjGtRSMjmOs84x6OMmDNd+oy3QAGu46H15RIQrxX1D2ZAU37GPx6bRRuNQFf6tkyMLc=</HostId>
</Error>
```2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/329Accession API v1: Download KML2018-09-14T17:57:49+02:00Matija ObrezaAccession API v1: Download KMLAdd API endpoint `/api/v1/acn/downloadKml` to AccessionController v1:
```java
@RequestMapping(value = "/downloadKml", produces = "application/vnd.google-earth.kml+xml", method = RequestMethod.POST)
@ResponseBody
public void kml(@Request...Add API endpoint `/api/v1/acn/downloadKml` to AccessionController v1:
```java
@RequestMapping(value = "/downloadKml", produces = "application/vnd.google-earth.kml+xml", method = RequestMethod.POST)
@ResponseBody
public void kml(@RequestParam(value="f") String filterCode, HttpServletResponse response) throws IOException {
// get AccessionFilter from filterCode
AccessionFilter filter = ...
final int countFiltered = accessionService.countAccessions(filter);
LOG.info("Attempting to download KML for {} accessions", countFiltered);
if (countFiltered > DOWNLOAD_LIMIT) {
throw new RuntimeException("Refusing to export more than " + DOWNLOAD_LIMIT + " entries");
}
response.setContentType("application/vnd.google-earth.kml+xml");
response.addHeader("Content-Disposition", String.format("attachment; filename=\"genesys-kml-" + filterCode + ".kml\""));
// Write KML to the stream.
final OutputStream outputStream = response.getOutputStream();
try {
mappingService.filteredKml(filter, outputStream);
response.flushBuffer();
} catch (EOFException e) {
LOG.warn("Download was aborted", e);
}
}
```2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/326Tile server: Pretty dots2018-09-14T08:53:35+02:00Matija ObrezaTile server: Pretty dotsInstead of using squares as accession points use a prettier round shape.Instead of using squares as accession points use a prettier round shape.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/322Admin bulk ops2018-09-11T13:56:14+02:00Matija ObrezaAdmin bulk opsThe PDCI calculation was updated in 82c8bf507961f2e5a3f9695829e4894c9f71d462 yet we don't have an admin method to recalculate PDCI for the entire database.
Implement a system where an action method is provided with `Accession` as argume...The PDCI calculation was updated in 82c8bf507961f2e5a3f9695829e4894c9f71d462 yet we don't have an admin method to recalculate PDCI for the entire database.
Implement a system where an action method is provided with `Accession` as argument that does "something". This method is invoked by a thread pool worker that receives a batch of accession records loaded from the database based on `AccessionFilter`.
## Use case
Update PDCI for ICARDA: provide appropriate accession filter that loads records in batches of 1000 and recalculates and updates the PDCI for each accession.
We need to be in a separate transaction so that entity manager is appropriately cleared after each batch.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/319Validation tokens expiry2018-09-07T12:22:50+02:00Matija ObrezaValidation tokens expiryUsers happen to return to or find Genesys emails in Junk after a week or so. Extend token validity.Users happen to return to or find Genesys emails in Junk after a week or so. Extend token validity.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/313Dataset API problems2018-08-31T11:16:09+02:00Matija ObrezaDataset API problemsPartners report that they need to refresh the page to be able to make changes to their datasets when editing. This seems to be related to the mismatch with `version` of the Dataset sent to server.
I also spotted the `not-null or transie...Partners report that they need to refresh the page to be able to make changes to their datasets when editing. This seems to be related to the mismatch with `version` of the Dataset sent to server.
I also spotted the `not-null or transient property` error on localhost that seems to be related to dataset `Locations`.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/312Error filtering by lastModifiedDate2018-08-31T09:40:02+02:00Matija ObrezaError filtering by lastModifiedDateFiltering by `lastModifiedDate` throws 500:
https://sandbox.genesys-pgr.org/explore?filter=%7B%22lastModifiedDate%22%3A%5B%222018-8-31%22%5D%2C%22institute.code%22%3A%5B%22ALB026%22%5D%7D&page=1Filtering by `lastModifiedDate` throws 500:
https://sandbox.genesys-pgr.org/explore?filter=%7B%22lastModifiedDate%22%3A%5B%222018-8-31%22%5D%2C%22institute.code%22%3A%5B%22ALB026%22%5D%7D&page=12.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/309API v1: Requests2018-08-30T09:41:23+02:00Matija ObrezaAPI v1: RequestsWe're adding the UI for Requests in genesys-pgr/genesys-ui#38 and the existing requests API doesn't use "standard" parameter names for pagination and sorting.
Implement a new version of the `RequestsController` in **org.genesys2.server....We're adding the UI for Requests in genesys-pgr/genesys-ui#38 and the existing requests API doesn't use "standard" parameter names for pagination and sorting.
Implement a new version of the `RequestsController` in **org.genesys2.server.api.v1** package.
- Copy existing controller
```java
@RestController("requestApi1")
@PreAuthorize("isAuthenticated()")
@RequestMapping(RequestsController.API_BASE) // = ApiBaseController.APIv1_BASE + "/request";
@Api(tags = { "requests" })
```
- Update list method to use the standard method signature and argument names (see InstituteController#list)
- Add `RequestFilter` and implement missing list methods using filters.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/308ES query error on storage2018-08-29T10:17:35+02:00Matija ObrezaES query error on storageFiltering for `"storage": [ 10, 13 ]` results in an invalid ES query being generated:
```json
{ "query":
{
"bool" : {
"filter" : {
"bool" : {
"must" : {
"terms" : {
"storage" : [ [ 13, 30 ] ]
...Filtering for `"storage": [ 10, 13 ]` results in an invalid ES query being generated:
```json
{ "query":
{
"bool" : {
"filter" : {
"bool" : {
"must" : {
"terms" : {
"storage" : [ [ 13, 30 ] ]
}
}
}
}
}
} }
```
Error is: `[For input string: "["]; nested: NumberFormatException[For input string: "["];`2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/307Support inverse filters2018-09-13T14:45:00+02:00Matija ObrezaSupport inverse filtersThe current implementation of Filter objects and logic in Genesys allows for specifying "matching" or "positive" filters (e.g. `"crop": [ "maize", "wheat" ]`). We're aiming to support "non-matching" or "negative" filters (e.g. crop is no...The current implementation of Filter objects and logic in Genesys allows for specifying "matching" or "positive" filters (e.g. `"crop": [ "maize", "wheat" ]`). We're aiming to support "non-matching" or "negative" filters (e.g. crop is not maize or wheat).2.4Matija ObrezaMatija Obreza