Genesys Backend issueshttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues2018-09-07T12:22:50+02:00https://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/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/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 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/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/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/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/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/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/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/306Repository: permissions2018-09-30T11:30:46+02:00Matija ObrezaRepository: permissionsAnonymous users cannot access https://sandbox.genesys-pgr.org/acn/id/538527Anonymous users cannot access https://sandbox.genesys-pgr.org/acn/id/5385272.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/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/364KPI Execution2018-10-25T00:51:39+02:00Matija ObrezaKPI ExecutionKPIExecution only supports the `count distinct` operation that is useful for most (basic) indicators.
- Extend it to allow calculating the `sum` and `average`.
~~JPA does not define `stddev` which makes `min` and `max` useless. This re...KPIExecution only supports the `count distinct` operation that is useful for most (basic) indicators.
- Extend it to allow calculating the `sum` and `average`.
~~JPA does not define `stddev` which makes `min` and `max` useless. This requires updating the `Observation` entity to add new fields for min, max, stddev (sum and average can be stored as `value`).~~
The type of operation should be an enum.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/366FaoInstitute/Partner folders2018-10-30T14:57:47+01:00Matija ObrezaFaoInstitute/Partner foldersPermissions for Folders in the repository must be manually configured and granted to the same users that have permissions on the institute. This is because the `aclParentObject()` of the Folder does not have any reference back to `Instit...Permissions for Folders in the repository must be manually configured and granted to the same users that have permissions on the institute. This is because the `aclParentObject()` of the Folder does not have any reference back to `Institute` or `Partner` entities.
The system should somehow automatically link the Folder to it's "owner":
1. **/wiews/{instCode}** should have ACL parent object set to OID of the Institute with code `instCode`.
1. **/datasets/{uuid}** should have ACL parent object set to OID of the Dataset with `uuid`.
Setting these ACL parents will allow user management on the "owner" level while respecting these same permissions on the Folder and File entities.
## Implementation
1. Folder for institute should be "ensured" and linked when the institute record is created/updated.
1. Dataset folder created when the Dataset is registered.2.4Matija ObrezaMatija Obrezahttps://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/372Fix GLIS integration2018-11-19T20:50:28+01:00Matija ObrezaFix GLIS integrationGLIS integration is not working at the moment and DOIs are not reported.GLIS integration is not working at the moment and DOIs are not reported.2.4Matija ObrezaMatija Obreza