Genesys Backend issueshttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues2018-08-23T17:36:10+02:00https://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/305Overview data invalid2018-08-23T17:36:10+02:00Matija ObrezaOverview data invalidSee https://sandbox.genesys-pgr.org/explore/overview?filter=%7B%22institute.code%22%3A%5B%22NGA039%22%5D%7DSee https://sandbox.genesys-pgr.org/explore/overview?filter=%7B%22institute.code%22%3A%5B%22NGA039%22%5D%7D2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/302Google Auth fails2018-08-23T13:19:51+02:00Matija ObrezaGoogle Auth fails#283 and the corresponding !175 break authentication using Google+ on https://genesys.demo.genesys-pgr.org/login
- **/google/verify-token** returns the old-fashioned UUID access token
- **/oauth/check_token** doesn't understand it.#283 and the corresponding !175 break authentication using Google+ on https://genesys.demo.genesys-pgr.org/login
- **/google/verify-token** returns the old-fashioned UUID access token
- **/oauth/check_token** doesn't understand it.2.4Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/283JWT OAuth tokens2018-08-22T18:32:13+02:00Matija ObrezaJWT OAuth tokensBring in the JWT token converter from the catalog-server.
Test if Genesys Uploader (Anno) works with JWT.Bring in the JWT token converter from the catalog-server.
Test if Genesys Uploader (Anno) works with JWT.2.5Alexander PrendetskiyAlexander Prendetskiyhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/301Accession listIds not in ES2018-08-22T18:13:47+02:00Matija ObrezaAccession listIds not in ESOverviews for CWR project-related accessions show no data -- ES has no information on listIds?Overviews for CWR project-related accessions show no data -- ES has no information on listIds?2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/300InstituteFilter: accessions2018-08-22T14:37:57+02:00Matija ObrezaInstituteFilter: accessionsExtend `InstituteFilter` with:
```
public Boolean accessions;
```
If the `accessions` value is not `null`:
```java
if (accessions != null) {
if (accessions == true)
and.and(institute.accessionCount.gt(0));
else
and.and(insti...Extend `InstituteFilter` with:
```
public Boolean accessions;
```
If the `accessions` value is not `null`:
```java
if (accessions != null) {
if (accessions == true)
and.and(institute.accessionCount.gt(0));
else
and.and(institute.accessionCount.eq(0));
}
```2.4Alexander PrendetskiyAlexander Prendetskiyhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/257"First Page" (pugination) button does not work2018-08-22T13:29:07+02:00Aleksandr Kirichenko"First Page" (pugination) button does not work**Steps:**
* Go to the Institutes "https://sandbox.genesys-pgr.org/wiews/active" page;
* Click on the "Last" pagination button;
* Click on the "First" pagination button.
**Expected result:** First page is opened, content from the fi...**Steps:**
* Go to the Institutes "https://sandbox.genesys-pgr.org/wiews/active" page;
* Click on the "Last" pagination button;
* Click on the "First" pagination button.
**Expected result:** First page is opened, content from the first page is displayed.
**Actual result:** First page isn't opened. See attached video:
![recording_00018](/uploads/c0b0985556ffe4f0b6e9f66198947f1c/recording_00018.gif)Viacheslav PavlovViacheslav Pavlovhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/244Subsets2018-08-22T12:48:12+02:00Matija ObrezaSubsetsWe're introducing a new "list of accessions", similar to current implementation of *AccessionList*.
# Model
Add a new entity `Subset` to *..model.impl*:
```java
public class Subset extends AuditedVersionedModel implements AclAware {
...We're introducing a new "list of accessions", similar to current implementation of *AccessionList*.
# Model
Add a new entity `Subset` to *..model.impl*:
```java
public class Subset extends AuditedVersionedModel implements AclAware {
@Type(type = "uuid-binary")
protected UUID uuid;
protected boolean published;
// other strings, only description is @Lob
// dateCreated as string -- it's not the same as createdDate (from Auditing)
protected String title, description, publisher, rights, dateCreated, publisher;
@ManyToMany(cascade = {}, fetch = FetchType.LAZY)
@JoinTable(name = "SubsetAccessions", joinColumns = @JoinColumn(name = "subsetId"), inverseJoinColumns = @JoinColumn(name = "acceId"))
private List<AccessionId> accessionIds;
}
```
1. Add JPA repository
1. Implement service
# Controller and JSP
Add a new `SubsetController` at */subset* with the following methods
1. GET */subset/* `listSubsets()` that renders the list of Subsets where `published == true`.
1. GET */subset/{uuid}* `subset()` that renders all properties of the Subset + the passport data of accessions in the subset. It should use the components from *browse*.
# REST API controller
New controller at */api/v1/subset* with endpoints:
1. POST */list* `Page<Subset> list(@RequestBody SubsetFilters filter`)
1. GET */{uuid}* `Subset get(@PathVariable UUID uuid)`
1. POST */create* `Subset create(@RequestBody Subset subset)`
1. POST */update* `Subset update(@RequestBody Subset subset)`
1. DELETE */{uuid},{version}* `Subset delete(@PathVariable UUID uuid, @PathVariable int version)`2.4Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/299OOM reindexing Accessions2018-08-21T17:45:53+02:00Matija ObrezaOOM reindexing Accessions2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/297CGIAR page - 500 error2018-08-21T14:27:08+02:00Aleksandr KirichenkoCGIAR page - 500 error**Steps**
1. Go to the "https://sandbox.genesys-pgr.org/welcome";
2. Click on the "CGIAR" link in the "Quick links" section.
Actual result:
![SCR_0075](/uploads/3e7dd243debb6a3c025a5059914afb06/SCR_0075.png)**Steps**
1. Go to the "https://sandbox.genesys-pgr.org/welcome";
2. Click on the "CGIAR" link in the "Quick links" section.
Actual result:
![SCR_0075](/uploads/3e7dd243debb6a3c025a5059914afb06/SCR_0075.png)Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/287Move tileIndex to AccessionData2018-08-20T18:02:52+02:00Matija ObrezaMove tileIndex to AccessionDataQuerying for `lat, lon` takes forever, current filtering by latitude takes 30s:
![image](/uploads/790cc4d6f613120540bcdc030bedd2e9/image.png)
By moving `tileIndex` property from `AccessionGeo` to `AccessionData` we will have better acc...Querying for `lat, lon` takes forever, current filtering by latitude takes 30s:
![image](/uploads/790cc4d6f613120540bcdc030bedd2e9/image.png)
By moving `tileIndex` property from `AccessionGeo` to `AccessionData` we will have better access to georeferenced accessions.
Update liquibase to add tileIndex, copy current data from `AccessionGeo` to `Accession` and `AccessionHistoric`, but also keep it in Geo.
Add database index on `tileIndex`.
Update tileIndex (prepersist) in `AccessionData`.
## Updated querying for lat/lon
In addition to querying by `latitude` and `longitude` ranges, add criteria on `Accession` to have `tileIndex not null`.
2.5Alexander PrendetskiyAlexander Prendetskiyhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/294InstituteController v12018-08-04T12:33:53+02:00Matija ObrezaInstituteController v1Add a new API controller `v1.InstituteController` with these methods:
## `/details`
Loads basic `FaoInstitute` data and if not `null` it adds:
- ES termStatistics on `crop.shortName`, `cropName`, `taxonomy.genus`, `taxonomy.genusSpeci...Add a new API controller `v1.InstituteController` with these methods:
## `/details`
Loads basic `FaoInstitute` data and if not `null` it adds:
- ES termStatistics on `crop.shortName`, `cropName`, `taxonomy.genus`, `taxonomy.genusSpecies`
- PDCI statistics for the institute
- Last updates of passport data for the institute
```java
@GetMapping("/{wiewsCode}")
public InstituteDetails details(...) {
InstituteDetails details = new InstituteDetails();
details.stats = elasticsearchService....
details.blurb = ...
...
return details;
}
// New class
public static class InsituteDetails {
public FaoInstitute institute;
public Article blurb;
public ? lastUpdates;
public ? stats; // for term statistics
}
}
```
Using InstituteDetails class will also help with API docs generation.2.4Alexander PrendetskiyAlexander Prendetskiyhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/293Dataset location and timing2018-08-03T15:25:21+02:00Matija ObrezaDataset location and timingThe `DatasetLocation` now holds data on **where** the plant material was evaluated, but does not tell us **when** that happened.
Add `String startDate` and `endDate` fields to this class. `@Column(length = 8)`
## Date format
We need t...The `DatasetLocation` now holds data on **where** the plant material was evaluated, but does not tell us **when** that happened.
Add `String startDate` and `endDate` fields to this class. `@Column(length = 8)`
## Date format
We need to keep this as `String` because the exact month or day of the dates may not be known. We will use the `YYYYMMDD` format and the setter should test with `MCPDUtils.isMcpdDate()` method if the value is valid.
## Update MCPDUtils
Update `MCPDUtils.isMcpdDate()` method to test that the values for **DD** and **MM** are:
- DD: -- or 00 or valid month value from 1 to 12
- MM: -- or 00 or valid day in the month of the year (if provided)
## Dataset
Update `Dataset` class and add `String startDate` and `endDate` fields to `Dataset`. `@Column(length = 8)`
In `@PrePersist/@PreUpdate` get the minimum and maximum start and end dates from all dataset locations.
```java
if (dataset.locations != null) {
this.startDate = dataset.locations.stream().map(ds -> ds.startDate).sorted(/* ascending */).findFirst().orElse(null);
this.endDate = ... /* descending */
}
```
You may need to update methods for saving locations to also trigger an update on the dataset.
## After merge
When this is done, file a ticket in the **catalog-ui** project to update the forms and display of DatasetLocations.2.4Viacheslav PavlovViacheslav Pavlovhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/281Model filters2018-08-03T14:51:44+02:00Matija ObrezaModel filtersIn the Catalog we developed a good approach to providing filter data to the backend.
Add model filters to `org.genesys2.server.model.filters` package:
- `AccessionFilter` for `Accession` (and `AccessionData` and `AccessionId`)
- `Insti...In the Catalog we developed a good approach to providing filter data to the backend.
Add model filters to `org.genesys2.server.model.filters` package:
- `AccessionFilter` for `Accession` (and `AccessionData` and `AccessionId`)
- `InstituteFilter` for `FaoInstitute`2.5Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/295Accession overview API2018-08-03T05:07:05+02:00Matija ObrezaAccession overview API2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/284Dataset AccessionIdentifier2018-08-03T05:07:03+02:00Matija ObrezaDataset AccessionIdentifierA Catalog Dataset contains a list of embedded `org.genesys.catalog.model.dataset.AccessionIdentifier` records (doi, instCode, acceNumb, genus, species). These must be linked with Accession records in Genesys.
1. First, make `AccessionId...A Catalog Dataset contains a list of embedded `org.genesys.catalog.model.dataset.AccessionIdentifier` records (doi, instCode, acceNumb, genus, species). These must be linked with Accession records in Genesys.
1. First, make `AccessionIdentifier` implement `AccessionIdentifier3`.
1. Add `private AccessionId accession;` to AccessionIdentifier with a `@ManyToOne` mapping. The value can be null if matching Accession is not in Genesys.
When registering AccessionIdentifiers with a Dataset, the service should lookup matching Accessions using GenesysService.2.5Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/290Error after Download as HTML is selected2018-07-26T09:37:32+02:00Nora Castaneda-AlvarezError after Download as HTML is selectedI'm trying to display a published descriptor list as HTML and I get an error. Use this descriptor list as example: https://catalog.demo.genesys-pgr.org/descriptorlists/e98bdd33-5c6c-4bac-ae95-95fbbb40d68cI'm trying to display a published descriptor list as HTML and I get an error. Use this descriptor list as example: https://catalog.demo.genesys-pgr.org/descriptorlists/e98bdd33-5c6c-4bac-ae95-95fbbb40d68cMatija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/275Extend Recent activity 22018-07-26T09:32:03+02:00Matija ObrezaExtend Recent activity 2Similar to #274, but include display of:
- Last 5 Datasets published (depends on #266)
Include a link to https://catalog.genesys-pgr.org at the bottom.
Update Controller and JSP.Similar to #274, but include display of:
- Last 5 Datasets published (depends on #266)
Include a link to https://catalog.genesys-pgr.org at the bottom.
Update Controller and JSP.2.5Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/288Cache responses to API queries2018-07-26T08:31:52+02:00Matija ObrezaCache responses to API queriesAdd `@Cache` annotations to services responding to API queries. Make those responses short-lived.Add `@Cache` annotations to services responding to API queries. Make those responses short-lived.2.5Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/282Accession APIv1 /filter2018-07-24T23:34:42+02:00Matija ObrezaAccession APIv1 /filterAdd **/filter** endpoint to `org.genesys2.server.api.v1.AccessionController` (depends on #281).
Method (based on `DatasetController#list`:
```java
@PostMapping(value = "/filter")
public FilteredPage<Accession> filter(@RequestParam(name...Add **/filter** endpoint to `org.genesys2.server.api.v1.AccessionController` (depends on #281).
Method (based on `DatasetController#list`:
```java
@PostMapping(value = "/filter")
public FilteredPage<Accession> filter(@RequestParam(name = "p", required = false, defaultValue = "0") final int page,
@RequestParam(name = "l", required = false, defaultValue = "50") final int pageSize,
@RequestParam(name = "d", required = false, defaultValue = "ASC") final Sort.Direction direction,
@RequestParam(name = "s", required = false, defaultValue = "id") final String[] sort, @RequestBody final DatasetFilter filter) {
if (StringUtils.isNotBlank(filterCode)) {
filter = shortFilterService.filterByCode(filterCode, DatasetFilter.class);
} else {
filterCode = shortFilterService.getCode(filter);
}
return new FilteredPage<>(filterCode, filter, genesysService.filter(filter, new PageRequest(page, Integer.min(pageSize, 100), direction, sort)));
}
```2.5Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/272JSP: Welcome page2018-07-23T19:20:18+02:00Matija ObrezaJSP: Welcome pageDepends on #266
## Include number of datasets under "number of accessions"
1. Rename "ACCESSION MAP" to “Quick overview”
1. Add “XXX Datasets” with link to Catalog/datasets page at https://catalog.genesys-pgr.org
## Changes to the to...Depends on #266
## Include number of datasets under "number of accessions"
1. Rename "ACCESSION MAP" to “Quick overview”
1. Add “XXX Datasets” with link to Catalog/datasets page at https://catalog.genesys-pgr.org
## Changes to the top navigation bar
1. Remove "Home"
1. Add Datasets menu in header:
Order: About Genesys, Browse, Datasets, Countries, Institutes, My List
Link to https://catalog.genesys-pgr.org/datasets
Update Controller and welcome page JSP.2.5Maxym BorodenkoMaxym Borodenko