Closed erikalogie closed 1 year ago
SDGs 3, 11, 14, 15
Hey team! Please add your planning poker estimate with Zenhub @flagrede @haveanicedavid @wgwz
@blushi even if i'm not the one who picks up this task, i was just having a look at this out of curiosity and i was having trouble seeing where/how we are actually saving info about the SDGs in postgres.
The Mai Ndombe in staging has SDG's this is a good test case. We have no columns in the DB related to SDG's, and AFAIK SDG's are not a part of our metadata schema's at all. I checked out the redwood IRI's for this particular project id and the corresponding redwood CC, and there is nothing in these that reference SDGs. So I'm puzzled where these are!
Asked Becca for this info, haven't heard back
All the Impact Info is now in Sanity, and they should appear in this order:
All SDGs are in Sanity as well.
It is in the credit class metadata @wgwz
Just adding some notes from my 1-1 with Marie for whoever picks this up.
The data is stored in the DB in the "credit class version" table. The "credit class" table is one-to-many with this table. A credit class can have many versions but right now there is only one. This table has a metadata column where the SDG's are located. Each SDG in this metadata contains an IRI that points to an image in sanity.
So this task would be to modify this JSON-LD list of SDG's within this table (for city forest credits).
Here is a link to the sanity location where we store the SDG image content:
Here is a graphql that will show you the SDG metadata nicely:
query{
allCreditClasses {
nodes {
creditClassVersionsById {
nodes {
name
metadata
}
}
}
}
}
The graphql above can be executed here:
Some updates on this: We were missing the following data across all DB env:
I have created a credit class and class version entry in all DB and linked all CFC projects in prod with it (in staging only one for now since there're a lot of them).
Just note that for the credit class, I had to reuse an existing methodology as this field is mandatory in DB and we are still missing the methodology for CFC. I did not create it because I do not have all the data for it, we should fix it asap to have coherent data even if it's not currently used in the app.
Anyways we do have impacts and SDGs displayed in prod now: https://app.regen.network/project/C02-001
/cc @S4mmyb @erikalogie @blushi @wgwz
@flagrede thanks for the update, fine by me
I believe we could probably get rid of the mandatory methodology_id
field for now in the credit_class
table because since the initial database design (from a few years now!) we've moved to anchored json-based data for providing credit class methodologies and they can even be multiple per credit classes while the current db design can only specify one methodology per credit class... We can discuss that further with @S4mmyb and @wgwz and create a ticket accordingly.
Right now only the Verra project pages have the SDG info and the "impact" section. We want to add this to the City Forest Credits as well.
From Marie: the code is already set up to display such data, we just need to create it in the db and add any new SDGs https://regen.sanity.studio/desk/shared;sdGs or impact https://regen.sanity.studio/desk/shared;ecologicalImpact to Sanity. I think first thing would be to add the data to Sanity and then devs can reference it in the db.