-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #895 from AtlasOfLivingAustralia/feature/paratoo
Feature/paratoo
- Loading branch information
Showing
11 changed files
with
150 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
load('../../utils/audit.js'); | ||
let adminUserId = 'system'; | ||
let sites = db.site.find({externalId:{$type:'number'}}); | ||
while (sites.hasNext()) { | ||
let site = sites.next(); | ||
site.externalId = new String(site.externalId); | ||
db.site.replaceOne({_id:site._id}, site); | ||
|
||
audit(site, site.siteId, 'au.org.ala.ecodata.Site', adminUserId); | ||
} | ||
|
||
|
||
sites = db.site.find({externalId:{$type:'object'}}); | ||
while (sites.hasNext()) { | ||
let site = sites.next(); | ||
site.externalId = null; | ||
db.site.replaceOne({_id:site._id}, site); | ||
|
||
audit(site, site.siteId, 'au.org.ala.ecodata.Site', adminUserId); | ||
} | ||
|
||
sites = db.site.find({externalId:{$ne:null}}); | ||
while (sites.hasNext()) { | ||
let site = sites.next(); | ||
site.externalIds = [{idType:'UNSPECIFIED', externalId: site.externalId}]; | ||
delete site.externalId; | ||
db.site.replaceOne({_id:site._id}, site); | ||
|
||
audit(site, site.siteId, 'au.org.ala.ecodata.Site', adminUserId); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/groovy/au/org/ala/ecodata/paratoo/ParatooProtocolConfigSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters