Skip to content

Commit

Permalink
commit script to add investment priorities to MUs #3250
Browse files Browse the repository at this point in the history
  • Loading branch information
salomon-j committed Jun 27, 2024
1 parent 98c5cdf commit 0c8f0d5
Showing 1 changed file with 52 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
load('../../../utils/audit.js');
const adminUserId = 'system';

var priorities = [
{
"category": "Reduce emissions and build resilience",
"priority": "Climate change adaptation"
},
{
"category": "Reduce emissions and build resilience",
"priority": "On-farm emissions reduction practices"
},
{
"category": "Harness carbon and biodiversity incentives",
"priority": "Carbon and biodiversity market information"
},
{
"category": "Harness carbon and biodiversity incentives",
"priority": "Sustainability framework engagement"
},
{
"category": "Harness carbon and biodiversity incentives",
"priority": "Market access and traceability"
},
{
"category": "Drive agricultural growth",
"priority": "Native vegetation and biodiversity on-farm"
},
{
"category": "Drive agricultural growth",
"priority": "Soil carbon"
},
{
"category": "Drive agricultural growth",
"priority": "Soil erosion"
},
{
"category": "Drive agricultural growth",
"priority": "Soil acidification"
},
{
"category": "Drive agricultural growth",
"priority": "Sustainable agriculture practices"
}
];

var mus = db.managementUnit.find({});
while(mus.hasNext()){
var m = mus.next();
db.managementUnit.updateOne({name:m.name},{$push:{"priorities": {$each : priorities}}});
audit(m, m.managementUnitId, 'au.org.ala.ecodata.ManagementUnit', adminUserId, null, 'Update');
}

0 comments on commit 0c8f0d5

Please sign in to comment.