Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/4.6 #972

Merged
merged 69 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
6170591
4.6-SNAPSHOT
chrisala Apr 29, 2024
9a0ebdc
Handle grouping null dates in DateGroup #928
chrisala May 1, 2024
159bc98
Merge pull request #930 from AtlasOfLivingAustralia/feature/issue928
salomon-j May 1, 2024
5899f31
AtlasOfLivingAustralia/fieldcapture#3171
temi May 1, 2024
0a477d0
Merge remote-tracking branch 'origin/master' into dev
chrisala May 1, 2024
a718362
#927
temi May 2, 2024
e54afe5
Merge pull request #935 from AtlasOfLivingAustralia/feature/issue927
chrisala May 2, 2024
cf45f19
Merge branch 'dev' into feature/issue3171
temi May 2, 2024
8e68c51
Merge pull request #931 from AtlasOfLivingAustralia/feature/issue3171
temi May 2, 2024
3c2b83d
Back to 4.6-SNAPSHOT #927
chrisala May 2, 2024
4709741
Allow updates of single data sets #934
chrisala May 2, 2024
460cfc2
Fixed controller/test #934
chrisala May 2, 2024
f3a59ff
Added a delete data set operation #934
chrisala May 2, 2024
c6a855f
Merge Project custom property instead of replace in update method #934
chrisala May 4, 2024
bc90148
Added bulk update method #934
chrisala May 6, 2024
a143e4e
Addressed code review issue #934
chrisala May 6, 2024
9c8832b
Merge pull request #936 from AtlasOfLivingAustralia/feature/issue934
chrisala May 6, 2024
10d227b
Merge pull request #939 from AtlasOfLivingAustralia/dev
chrisala May 10, 2024
fbdd2c6
Ensure project is not cached in session #934
chrisala May 13, 2024
de3e52c
Github actions should build release branches #934
chrisala May 13, 2024
f86a80e
Update tests to account for different session management #934
chrisala May 13, 2024
8933698
Update the data set name after more information is available #942
chrisala May 14, 2024
63d6e89
Fixed locale dependency, remove project name from data set name #942
chrisala May 14, 2024
bb8c9b6
Merge pull request #943 from AtlasOfLivingAustralia/feature/datasetname
temi May 14, 2024
dc6099e
#941
temi May 15, 2024
dccc4f4
#941
temi May 15, 2024
5b02542
Fixed locale dependency, remove project name from data set name #942
chrisala May 14, 2024
413ff34
#941
temi May 15, 2024
e815077
#941
temi May 15, 2024
383462a
Optionally adds species URL to download #945
chrisala May 15, 2024
1d63d99
Addressed code review comments #945
chrisala May 16, 2024
0b9aeed
Merge pull request #946 from AtlasOfLivingAustralia/feature/issue945
chrisala May 16, 2024
3593d15
Merge pull request #944 from AtlasOfLivingAustralia/feature/issue941
chrisala May 16, 2024
84d425a
size -> size() #947
chrisala May 16, 2024
93ad03d
#941
temi May 16, 2024
0ed557c
Merge pull request #948 from AtlasOfLivingAustralia/feature/issue941
chrisala May 16, 2024
55254b6
#941
temi May 16, 2024
1ac3b7e
Merge pull request #949 from AtlasOfLivingAustralia/feature/issue941
temi May 16, 2024
71866f4
Don't include site name in data set name for non-plot protocols #942
chrisala May 16, 2024
f803982
#951
temi May 17, 2024
7184cb7
Merge pull request #950 from AtlasOfLivingAustralia/feature/issue942
chrisala May 17, 2024
1984f24
Merge pull request #954 from AtlasOfLivingAustralia/feature/issues951
chrisala May 17, 2024
62ad615
#951
temi May 19, 2024
59fa0ba
Fixed unit tests #951
chrisala May 19, 2024
2c69988
#951
temi May 19, 2024
051b805
Merge pull request #955 from AtlasOfLivingAustralia/feature/issues951
chrisala May 20, 2024
8ee8f6b
Fixed protocolCheck for projectParticipant role #956
chrisala May 20, 2024
3a2a2f5
Fixed typo #956
chrisala May 21, 2024
4f3466a
Merge pull request #957 from AtlasOfLivingAustralia/feature/issue956
chrisala May 21, 2024
81a2cb7
#958
temi May 22, 2024
be58424
Merge pull request #959 from AtlasOfLivingAustralia/feature/issue958
chrisala May 22, 2024
aa2806f
Record Monitor activities as finished #961
chrisala May 24, 2024
2ac2681
Calculate area of compound site using features #962
chrisala May 29, 2024
90c92a5
Change site name based on core/fauna #942
chrisala May 29, 2024
d216915
Merge pull request #963 from AtlasOfLivingAustralia/feature/issue962
temi May 29, 2024
74af996
Fixed test #942
chrisala May 29, 2024
49a9500
Merge pull request #964 from AtlasOfLivingAustralia/feature/issue942
chrisala May 29, 2024
b3dfa8c
#965
temi May 29, 2024
9573c80
Merge pull request #966 from AtlasOfLivingAustralia/feature/issue965
chrisala May 29, 2024
5e4d110
Use different id type for plot selections #942
chrisala May 30, 2024
84e25c3
Merge remote-tracking branch 'origin/release/4.6' into feature/issue965
chrisala May 30, 2024
eb0bf90
Added a tag to fauna/core plots AtlasOfLivingAustralia/fieldcapture#3204
chrisala May 30, 2024
df296fc
Merge pull request #967 from AtlasOfLivingAustralia/feature/issue961
temi May 30, 2024
4c3ebed
#965
temi May 30, 2024
50d4752
#965
temi May 30, 2024
f6023f6
Fixed code review issue #942
chrisala May 30, 2024
72f2d40
Merge pull request #970 from AtlasOfLivingAustralia/feature/issue960
chrisala May 30, 2024
29212f4
Merge remote-tracking branch 'origin/release/4.6' into feature/issue965
chrisala May 30, 2024
49d2cdc
Merge pull request #969 from AtlasOfLivingAustralia/feature/issue965
temi May 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- master
- feature/**
- hotfix/**
- release/**

env:
TZ: Australia/Canberra
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ plugins {
id "com.gorylenko.gradle-git-properties" version "2.4.1"
}

version "4.5.1"
version "4.6-SNAPSHOT"
group "au.org.ala"
description "Ecodata"

Expand Down
7 changes: 6 additions & 1 deletion grails-app/conf/application.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,11 @@ app {
if (!ala.baseURL) {
ala.baseURL = "https://www.ala.org.au"
}
bie.ws.url = "https://bie-ws.ala.org.au/"
bie.url = "https://bie.ala.org.au/"
namesmatching.url = "https://namematching-ws-test.ala.org.au/"
namematching.strategy = ["exactMatch", "vernacularMatch"]

if (!collectory.baseURL) {
//collectory.baseURL = "https://collectory-dev.ala.org.au/"
collectory.baseURL = "https://collections-test.ala.org.au/"
Expand Down Expand Up @@ -1485,4 +1490,4 @@ paratoo.defaultPlotLayoutViewModels = [
]
]
]

paratoo.species.specialCases = ["Other", "N/A"]
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ class AdminController {
def reSubmitDataSet() {
String projectId = params.id
String dataSetId = params.dataSetId
String userId = params.userId ?: userService.getCurrentUser().userId
String userId = params.userId ?: userService.currentUser()?.userId
if (!projectId || !dataSetId || !userId) {
render text: [message: "Bad request"] as JSON, status: HttpStatus.SC_BAD_REQUEST
return
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package au.org.ala.ecodata

import org.apache.http.HttpStatus

class DataSetSummaryController {

static responseFormats = ['json', 'xml']
static allowedMethods = [update:['POST', 'PUT'], delete:'DELETE', bulkUpdate: 'POST']

ProjectService projectService

/** Updates a single dataset for a project */
def update(String projectId) {
Map dataSet = request.JSON
projectId = projectId ?: dataSet.projectId

if (!projectId) {
render status: HttpStatus.SC_BAD_REQUEST, text: "projectId is required"
return
}

if (dataSet.projectId && dataSet.projectId != projectId) {
render status: HttpStatus.SC_BAD_REQUEST, text: "projectId must match the data set projectId"
return
}

respond projectService.updateDataSet(projectId, dataSet)
}

/**
* Updates multiple data sets for a project.
* This endpoint exists to support the use case of associating multiple data sets with a
* report and updating their publicationStatus when the report is submitted/approved.
*
* This method expects the projectId to be supplied via the URL and the data sets to be supplied in the request
* body as a JSON object with key="dataSets" and value=List of data sets.
*/
def bulkUpdate(String projectId) {
Map postBody = request.JSON
List dataSets = postBody?.dataSets

if (!projectId) {
render status: HttpStatus.SC_BAD_REQUEST, text: "projectId is required"
return
}

for (Map dataSet in dataSets) {
if (dataSet.projectId && dataSet.projectId != projectId) {
render status: HttpStatus.SC_BAD_REQUEST, text: "projectId must match the projectId in all supplied data sets"
return
}
}

respond projectService.updateDataSets(projectId, dataSets)
}

def delete(String projectId, String dataSetId) {
if (!projectId || !dataSetId) {
render status: HttpStatus.SC_BAD_REQUEST, text: "projectId and dataSetId are required"
return
}
respond projectService.deleteDataSet(projectId, dataSetId)
}
}
6 changes: 6 additions & 0 deletions grails-app/controllers/au/org/ala/ecodata/UrlMappings.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ class UrlMappings {
"/ws/project/getDefaultFacets"(controller: "project", action: "getDefaultFacets")
"/ws/project/$projectId/dataSet/$dataSetId/records"(controller: "project", action: "fetchDataSetRecords")
"/ws/admin/initiateSpeciesRematch"(controller: "admin", action: "initiateSpeciesRematch")
"/ws/dataSetSummary/$projectId/$dataSetId?"(controller :'dataSetSummary') {

action = [POST:'update', PUT:'update', DELETE:'delete']
}

"/ws/dataSetSummary/bulkUpdate/$projectId"(controller:'dataSetSummary', action:'bulkUpdate')

"/ws/document/download"(controller:"document", action:"download")

Expand Down
2 changes: 1 addition & 1 deletion grails-app/domain/au/org/ala/ecodata/ExternalId.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ExternalId implements Comparable {
enum IdType {
INTERNAL_ORDER_NUMBER, TECH_ONE_CODE, WORK_ORDER, GRANT_AWARD, GRANT_OPPORTUNITY, RELATED_PROJECT,
MONITOR_PROTOCOL_INTERNAL_ID, MONITOR_PROTOCOL_GUID, TECH_ONE_CONTRACT_NUMBER, MONITOR_PLOT_GUID,
MONITOR_MINTED_COLLECTION_ID, UNSPECIFIED }
MONITOR_PLOT_SELECTION_GUID, MONITOR_MINTED_COLLECTION_ID, UNSPECIFIED }

static constraints = {
}
Expand Down
2 changes: 2 additions & 0 deletions grails-app/domain/au/org/ala/ecodata/Record.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import org.bson.types.ObjectId

class Record {
// def grailsApplication
/** Represents a species guid that was unable to be matched against the ALA names list */
static final String UNMATCHED_GUID = "A_GUID"

static mapping = {
occurrenceID index: true
Expand Down
10 changes: 10 additions & 0 deletions grails-app/domain/au/org/ala/ecodata/Site.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,14 @@ class Site {
status != Status.DELETED
}.find()
}

static List<Site> findAllByExternalId(ExternalId.IdType idType, String externalId, Map params) {
where {
externalIds {
idType == idType
externalId == externalId
}
status != Status.DELETED
}.list(params)
}
}
Loading
Loading