Closed furilo closed 4 years ago
IMO using a vocabulary is a natural solution, for the type of data structure SDGs are and because in plan projects the relation HABTM already exists with vocabularies and terms.
To me, adding an external_id to the terms of a vocabulary is not a big deal: it can be optional and will allow us to store the specific ids of each goal and objective.
And for budget lines we should implement also a relation HABTM to vocabularies terms, and we could even try to make it generic for every model we want.
I'd also think on automating the creation of the SGDs structure for a given stie, or making it a default vocabulary for all sites.
I think adding and external_id to terms, as we have done with plans, is a great idea: it will also serve to sync terms in other contexts, and for this case we can use it to store the IDs. Only comment is that for this case we need it to be a string, not an int - don't know if this is problematic.
Default SDGs: yes, my idea is that we automate it's creation as we have done with the module setup scripts. We could trigger this on site creation so a SDG vocab is always available.
Usually external ids are strings, because are more generic, so that shouldn't be a problem.
Perfect
We are integrating the SDGs (ODS in spanish) in Plans, and probably in Budgets in the future. The idea is that things that organizations do (either reflected on plans or in budgets, and probably in other modules) are related with some ODS.
SDGs are structured in Objectives, that has many Goals, that has many Indicators. SDGs inventory: https://docs.google.com/spreadsheets/d/1iWHqO8kaUyY5BlsSu3Tz6bYSL_zPtV0B/edit#gid=571153678 - An Objetive have a description and an image (we could "fake" it with some kind of dictionary, although we would need fixed IDs for each Objective).
This is how we are integrating it on Plans:
Thus, we need a data structure where to store the SDGs. Right now, we are mostly using Objectives, but it is likely that we need to use also Goals.
We could replicate the SDGs in a Vocabulary. Issues:
Alternatively, we could store this in a custom model with custom fields, but if we can solve it via a Vocabulary is much simpler.
@entantoencuanto @ferblape please chime in to decide how to do this.