Genesys Backend issueshttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues2019-01-31T12:07:33+01:00https://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/397AppliedFiltersConverter for sciName2019-01-31T12:07:33+01:00Matija ObrezaAppliedFiltersConverter for sciNameShould filter on full name in Taxonomy2.
```
Caused by: java.lang.RuntimeException: Unhandled Taxonomy filter property=sciName
at org.genesys2.server.service.filter.AppliedFiltersConverter.apply(AppliedFiltersConverter.java:405)
at...Should filter on full name in Taxonomy2.
```
Caused by: java.lang.RuntimeException: Unhandled Taxonomy filter property=sciName
at org.genesys2.server.service.filter.AppliedFiltersConverter.apply(AppliedFiltersConverter.java:405)
at org.genesys2.server.service.filter.AppliedFiltersConverter.convert(AppliedFiltersConverter.java:156)
at org.genesys2.server.service.filter.AccessionFilter.convert(AccessionFilter.java:195)
```2.4Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/396Problem with SSR accession page2018-12-25T14:21:09+01:00Matija ObrezaProblem with SSR accession pageAccessing https://beta.genesys-pgr.org/10.18730/G4SJW as anonymous user results in an error:
```
Converting circular structure to JSON
```
It's an issue with permissions to READ the Image Gallery.
- `Partner` and `FaoInstitute` ACL ob...Accessing https://beta.genesys-pgr.org/10.18730/G4SJW as anonymous user results in an error:
```
Converting circular structure to JSON
```
It's an issue with permissions to READ the Image Gallery.
- `Partner` and `FaoInstitute` ACL objects must be readable by `ROLE_EVERYONE` (publicly readable)Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/395Google Sign-in authentication system2019-01-31T12:07:33+01:00Matija ObrezaGoogle Sign-in authentication systemMigrate from the **Google+ Sign-In** feature to the more comprehensive **Google Sign-in authentication system**. The Google+ Sign-In will be deprecated in late January 2019.
This affects the user logins on Genesys. Please update the bac...Migrate from the **Google+ Sign-In** feature to the more comprehensive **Google Sign-in authentication system**. The Google+ Sign-In will be deprecated in late January 2019.
This affects the user logins on Genesys. Please update the backend code in `GoogleOAuthUtil`.2.4Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/394CMS Activity post API v12018-12-24T17:06:23+01:00Matija ObrezaCMS Activity post API v1Upgrade `ActivityPost` to `AuditedVersionedModel`. Update liquibase with `version = 1`.
Add `ActivityPostFilter` and add `listActivityPosts` method with filtering and pagination to CMS controller v1. The Filter can extend `AuditedVersio...Upgrade `ActivityPost` to `AuditedVersionedModel`. Update liquibase with `version = 1`.
Add `ActivityPostFilter` and add `listActivityPosts` method with filtering and pagination to CMS controller v1. The Filter can extend `AuditedVersionedModelFilter`. Filter with keyword search on title and body.
2.4Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/393Download Genesys1 descriptor lists by crop2018-12-24T10:54:49+01:00Matija ObrezaDownload Genesys1 descriptor lists by cropGenesys1 came with a trait database and descriptor definitions. We will be migrating the data from traits database to Catalog entries and we can already export the data in Catalog-compliant Excel file.
To ensure that trait descriptors f...Genesys1 came with a trait database and descriptor definitions. We will be migrating the data from traits database to Catalog entries and we can already export the data in Catalog-compliant Excel file.
To ensure that trait descriptors from Genesys **1** are properly migrated, add support to download descriptor definitions **by crop** in Catalog format for import to the Catalog.
https://www.genesys-pgr.org/c/wheat/descriptors should allow for downloading the data for importing as **new descriptor list** to Genesys. When registering and uploading the original datasets, we will be able to reuse descriptor definitions across all imports.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/392KPI alias2018-12-23T22:36:42+01:00Matija ObrezaKPI aliasI'm not able to set `accession.historic` as an alias of ExecutionGroup; the query fails.I'm not able to set `accession.historic` as an alias of ExecutionGroup; the query fails.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/391MCPD Excel: Include LASTUPDATED2018-12-22T13:16:08+01:00Matija ObrezaMCPD Excel: Include LASTUPDATEDUpdate template and the code to include column `LASTMODIFIED` with date from `accession#lastModifiedDate`.Update template and the code to include column `LASTMODIFIED` with date from `accession#lastModifiedDate`.2.4Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/390Multiple matching descriptors2018-12-20T17:11:59+01:00Matija ObrezaMultiple matching descriptors`Descriptor searchMatchingDescriptor()` in descriptor service uses `findOne()`. When multiple matches are found this causes an exception to be thrown.
Update to `List<> searchMatchingDescriptor()` and return all matches. Update UI accor...`Descriptor searchMatchingDescriptor()` in descriptor service uses `findOne()`. When multiple matches are found this causes an exception to be thrown.
Update to `List<> searchMatchingDescriptor()` and return all matches. Update UI accordingly.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/389Export trait data in Catalog dataset template2018-12-19T22:38:39+01:00Matija ObrezaExport trait data in Catalog dataset templateGenesys has a searchable trait database of C&E data. The list of "datasets" is available at https://www.genesys-pgr.org/data/.
It is possible to download the "dataset" as a DwC-A CSV+ZIP file (DarwinCore Archive) that contains all recor...Genesys has a searchable trait database of C&E data. The list of "datasets" is available at https://www.genesys-pgr.org/data/.
It is possible to download the "dataset" as a DwC-A CSV+ZIP file (DarwinCore Archive) that contains all records relating to this dataset.
Add a controller endpoint that will generate the Excel version using the current Catalog Dataset template based on trait data in the database.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/388KPI Executions ACL2018-12-24T09:07:37+01:00Matija ObrezaKPI Executions ACLWe wish to make some Executions publicly accessible, some restricted and some only for ADMIN.
Update KPI `Execution` to support permissions and update KPI service implementation:
- Updating `Execution` requires WRITE permission
- Readi...We wish to make some Executions publicly accessible, some restricted and some only for ADMIN.
Update KPI `Execution` to support permissions and update KPI service implementation:
- Updating `Execution` requires WRITE permission
- Reading `Execution` or any of its observations requires READ permission
- Add API endpoint to `listExecutions` to KPIReadController. It should return a list of executions but only the `name` and `title` properties.
Please update the UI and add "Permissions" button to KPI Execution display page.2.4Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/387KPI group by with null2018-12-19T18:44:29+01:00Matija ObrezaKPI group by with nullGroup by in our KPI implementation does not capture `null` values. The run below does not contain the count where `crop is null`:
![image](/uploads/3c5ce8ba09518c0d0e89140a5ab72eb6/image.png)
Entities must be left joined in JPA for `nu...Group by in our KPI implementation does not capture `null` values. The run below does not contain the count where `crop is null`:
![image](/uploads/3c5ce8ba09518c0d0e89140a5ab72eb6/image.png)
Entities must be left joined in JPA for `null` to be considered as a "group". JPA defaults to inner join.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/386Subsets: feedback to data providers2018-12-18T14:10:00+01:00Nora Castaneda-AlvarezSubsets: feedback to data providersCan we have an option to see the email of the user submitting subsets/datasets for review? This is to send comments and feedback before publication in Genesys.Can we have an option to see the email of the user submitting subsets/datasets for review? This is to send comments and feedback before publication in Genesys.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/385ApplicationStartup actions to /admin actions2018-12-18T21:39:57+01:00Matija ObrezaApplicationStartup actions to /admin actionsWe now have a number of actions executed in `ApplicationStartup` and they have all been executed on the sandbox and production servers.
Please move these actions to MVC /admin controller and add action buttons to `/jsp/admin/index.jsp`...We now have a number of actions executed in `ApplicationStartup` and they have all been executed on the sandbox and production servers.
Please move these actions to MVC /admin controller and add action buttons to `/jsp/admin/index.jsp`.
Add these actions as POST endpoints to Admin v1 Controller -- or create one if it doesn't exist.2.4Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/384Subsets: existing list of accessions when creating new subset.2018-12-17T18:14:42+01:00Nora Castaneda-AlvarezSubsets: existing list of accessions when creating new subset.When creating a brand new subset, we first fill in the basic information, and when we move to the second step (list of accessions), the list of accessions appears populated, but the heading says **Accessions list: 0 rows** as shown here:...When creating a brand new subset, we first fill in the basic information, and when we move to the second step (list of accessions), the list of accessions appears populated, but the heading says **Accessions list: 0 rows** as shown here:
![image](/uploads/2e6643a5fb8992d1fb45603f47a540b9/image.png)Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/383Suggestion: Creators in subsets and datasets2018-12-19T16:30:02+01:00Nora Castaneda-AlvarezSuggestion: Creators in subsets and datasetsAllow auto-complete for creators. We identified together with CIAT's documentation officer, that many subsets and datasets share creators and institutional affiliation.Allow auto-complete for creators. We identified together with CIAT's documentation officer, that many subsets and datasets share creators and institutional affiliation.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/382KPI group by Parameter properties2018-12-19T00:59:35+01:00Matija ObrezaKPI group by Parameter propertiesI wish to add a KPI Execution to count the "Number of accessions last updated by year" (and then by institute, by crop).
The current implementation requires me to define a `Dimension` that will provide the `Set<Long>` of the **years** t...I wish to add a KPI Execution to count the "Number of accessions last updated by year" (and then by institute, by crop).
The current implementation requires me to define a `Dimension` that will provide the `Set<Long>` of the **years** that can then be passed to ExecutionDimension.
1. That requires us to either maintain a `NumericListDimension` and add all year options manually.
1. Generates a number of observations for years we *know* no updates have happened.
## Idea
Allow for **GROUP BY** clauses in Execution definition:
- Add group by `lastModifiedDate` modifier `YEAR` alias `lastModifiedYear`
Generates: `select ..., year(_base.lastModifiedDate) lastModifiedYear ... group by lastModifiedYear where ...`
- Add group by `lastModifiedDate` modifier `MONTH` alias `lastModifiedMonth`
Generates: `select ..., year(_base.lastModifiedDate) lastModifiedYear, month(_base.lastModifiedDate) lastModifiedMonth ... group by lastModifiedYear, lastModifiedDate where ...`
The resulting Observation will therefore go from being a single row with the `value` (and `stddev` for AVERAGE) to multiple rows for existing combinations of `lastModifiedYear` and `lastModifiedDate`.
The method `private Observation getSingleObservation(Query query, Object... params) {}` should therefore return `List<Observation>` and the `Observation` needs to store the group-by's somewhere.
Could use the "DimensionKey"?2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/381KPI counting accessions2018-12-19T00:59:35+01:00Matija ObrezaKPI counting accessionsI'm trying to define a KPI Execution to count the "Number of accessions documented in published Datasets".
- Parameter: `Dataset` with `state = 'PUBLISHED'`
- No dimensions.
Execution fails with *illegal attempt to dereference collecti...I'm trying to define a KPI Execution to count the "Number of accessions documented in published Datasets".
- Parameter: `Dataset` with `state = 'PUBLISHED'`
- No dimensions.
Execution fails with *illegal attempt to dereference collection [dataset0_.id.accessionRefs] with element property reference [accession]*.
This is because `Dataset#accessionRefs` is a collection and needs to be joined (as documented https://stackoverflow.com/questions/24750754/org-hibernate-queryexception-illegal-attempt-to-dereference-collection/24751098#24751098).
## Fix
We should introduce something similar to the `link` property in `ExecutionDimension` to the `Execution` to declare the join.2.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/380Subsets: can't continue to second step (list of accessions)2018-12-17T17:09:34+01:00Nora Castaneda-AlvarezSubsets: can't continue to second step (list of accessions)We are trying to create a new subset for COL003, with the user d.libreros@cgiar.org but the following error is obtained:
catalog.6777670614221d6630e0.js:42 POST https://beta.genesys-pgr.org/proxy/api/v1/subset/create 401 (Unauthorized)
...We are trying to create a new subset for COL003, with the user d.libreros@cgiar.org but the following error is obtained:
catalog.6777670614221d6630e0.js:42 POST https://beta.genesys-pgr.org/proxy/api/v1/subset/create 401 (Unauthorized)
(anonymous) @ catalog.6777670614221d6630e0.js:42
e.exports @ catalog.6777670614221d6630e0.js:42
e.exports @ catalog.6777670614221d6630e0.js:42
Promise.then (async)
Axios.request @ catalog.6777670614221d6630e0.js:42
(anonymous) @ catalog.6777670614221d6630e0.js:35
value @ catalog.6777670614221d6630e0.js:35
(anonymous) @ catalog.6777670614221d6630e0.js:29
(anonymous) @ catalog.6777670614221d6630e0.js:42
onSubmit @ catalog.6777670614221d6630e0.js:120
g @ catalog.6777670614221d6630e0.js:12
Ni @ catalog.6777670614221d6630e0.js:12
Form.s.submit @ catalog.6777670614221d6630e0.js:12
value @ catalog.6777670614221d6630e0.js:12
value @ catalog.6777670614221d6630e0.js:12
rg @ common.48d812abfb6938c310f3.js:22
Rg @ common.48d812abfb6938c310f3.js:22
xh @ common.48d812abfb6938c310f3.js:22
yh @ common.48d812abfb6938c310f3.js:22
Vh @ common.48d812abfb6938c310f3.js:22
Yh @ common.48d812abfb6938c310f3.js:22
Wh @ common.48d812abfb6938c310f3.js:22
ei @ common.48d812abfb6938c310f3.js:22
Kd @ common.48d812abfb6938c310f3.js:22
catalog.6777670614221d6630e0.js:42 Uncaught (in promise) Error: Request failed with status code 401
at e.exports (catalog.6777670614221d6630e0.js:42)
at e.exports (catalog.6777670614221d6630e0.js:42)
at XMLHttpRequest.p.(anonymous function) (https://beta.genesys-pgr.org/catalog.6777670614221d6630e0.js:42:1264)
e.exports @ catalog.6777670614221d6630e0.js:42
e.exports @ catalog.6777670614221d6630e0.js:42
p.(anonymous function) @ catalog.6777670614221d6630e0.js:42
Promise.then (async)
Form.s.listenToSubmit @ catalog.6777670614221d6630e0.js:12
Form.s.submit @ catalog.6777670614221d6630e0.js:12
value @ catalog.6777670614221d6630e0.js:12
value @ catalog.6777670614221d6630e0.js:12
rg @ common.48d812abfb6938c310f3.js:22
Rg @ common.48d812abfb6938c310f3.js:22
xh @ common.48d812abfb6938c310f3.js:22
yh @ common.48d812abfb6938c310f3.js:22
Vh @ common.48d812abfb6938c310f3.js:22
Yh @ common.48d812abfb6938c310f3.js:22
Wh @ common.48d812abfb6938c310f3.js:22
ei @ common.48d812abfb6938c310f3.js:22
Kd @ common.48d812abfb6938c310f3.js:22
The error is not shown with admin user.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/379KPI API v1: Observed value on specific date2018-12-24T07:20:23+01:00Matija ObrezaKPI API v1: Observed value on specific dateCreate a new `KPIReadController` V1 (for any authenticated user) with API endpoint `/kpi/observations/{executionName}` that will:
- Locate the last execution **before** the **date** specified in query string (`?date=12-18-2018`)
- It re...Create a new `KPIReadController` V1 (for any authenticated user) with API endpoint `/kpi/observations/{executionName}` that will:
- Locate the last execution **before** the **date** specified in query string (`?date=12-18-2018`)
- It returns `List<Observation>` for the KPI `ExecutionRun` on that date:
```json
[{
"id":337605,
"value":1.0,
"stdDev":null,
"dimensions":[
{"name":"instCode","value":"POL010"},
{"name":"boolean.yesno","value":"false"}
]
},...
]
```
## Bonus points
Massage the `List<Observation>` so that the JSON returned to the client for example above looks like:
```json
{
"historic": {
"false": { "value":1.0, "stdDev":null },
"true": { "value":4.0, "stdDev":null },
}
}
```
Filter by `historic=true`:
```json
{
"institute.code": {
"POL001": { "value":112312.0, "stdDev":null },
}
}
```
## Filtering observations
The user can also specify dimensions that must match:
- `?instCode=POL010` would filter `executionRun.observations.any().observationKeys` by `key=instCode` and `value=POL010`
- Can we use `execution.dimensions#field` instead of `dimension.name`: example `institute.code=POL010`?
- Dimension "filters" provided by user are excluded from the results:
```json
[{
"id":337605,
"value":1.0,
"stdDev":null,
"dimensions":[
{"name":"boolean.yesno","value":"false"}
]
}, {
"id":337609,
"value":4.0,
"stdDev":null,
"dimensions":[
{"name":"boolean.yesno","value":"true"}
]
}, ...
]
```2.4Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/378JSP: Download PDCI from /explore2018-12-17T15:33:30+01:00Matija ObrezaJSP: Download PDCI from /explorePlease enable downloading PDCI Excel file from JSP /explore page.
- Add "Download PDCI" under "Download MCPD" for logged-in usersPlease enable downloading PDCI Excel file from JSP /explore page.
- Add "Download PDCI" under "Download MCPD" for logged-in users2.4Maxym BorodenkoMaxym Borodenko