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

Automate description custom field creation on module setup #2837

Closed
ferblape opened this issue Feb 4, 2020 · 4 comments · Fixed by #2849
Closed

Automate description custom field creation on module setup #2837

ferblape opened this issue Feb 4, 2020 · 4 comments · Fixed by #2849
Assignees

Comments

@ferblape
Copy link
Member

ferblape commented Feb 4, 2020

When Gobierto data module is activated in a site we want to automatically add a custom field for the description of the datasets.

This can be implemented using a recipe from Gobierto Seeds module that can be configured for the whole GobiertoData module.

@ferblape ferblape added this to Backlog in Gobierto Data via automation Feb 4, 2020
@furilo furilo moved this from Backlog to To do in Gobierto Data Feb 6, 2020
@furilo
Copy link
Member

furilo commented Feb 7, 2020

I'd extend this issue to setup three basic custom fields:

  • Frecuency
  • Category
  • Description

This fields will be used by the front-end. I'd therefore try to apply some smart defaults:

  • We create those 3 fields on module activation (if they are not already created)
  • We give them fixed names
  • Front-end relies on those fixed names to
    • show the fields in the dataset page; if fields are not present they won't be used
    • build the sidebar

Following what we are doing in Investments, via module configuration we may be able to change those names or to extend the number of fields we show on the sidebar or dataset page. Therefore, in the conf we may have something like:

gobierto_data_conf {
  sidebar {
    filters_to_show {
      datasets_category
      datasets_frecuency
    }
    dataset {
    filters_to_show {
      datasets_category
      datasets_frecuency
      datasets_description
    }
  }
}

This would be the default.

(In investments we already have this conf, we should do something standard)

In the frontend, we would define a place to show the description, and then another one for the other custom fields, so we just show what fields are instructed by the configuration (or the defaults) in the corresponding order one beneath the other.

cc @Crashillo @jorgeatgu

@entantoencuanto entantoencuanto moved this from To do to In progress in Gobierto Data Feb 7, 2020
@entantoencuanto
Copy link
Member

I'm going to create default vocabularies for frequency and category. Later an admin can manage their contents.

By default frequency vocabulary will have the terms (CA/EN/ES):

  • Anual/Annual/Anual
  • Trimestral/Quarterly/Trimestral
  • Mensual/Monthly/Mensual
  • Diària/Daily/Diaria

By default category vocabulary will have the terms (CA/EN/ES):

  • General/General/General

@furilo
Copy link
Member

furilo commented Feb 7, 2020 via email

@furilo
Copy link
Member

furilo commented Feb 8, 2020

Ciencia y tecnología . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/ciencia-tecnologia
Comercio . . . . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/comercio
Cultura y ocio . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/cultura-ocio
Demografía . . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/demografia
Deporte . . . . . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/deporte
Economía . . . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/economia
Educación . . . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/educacion
Empleo . . . . . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/empleo
Energía . . . . . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/energia
Hacienda . . . . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/hacienda
Industria . . . . . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/industria
Legislación y justicia . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/legislacion-justicia
Medio ambiente . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/medio-ambiente
Medio Rural . . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/medio-rural-pesca
Salud . . . . . . . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/salud
Sector público . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/sector-publico
Seguridad . . . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/seguridad
Sociedad y bienestar . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/sociedad-bienestar
Transporte . . . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/transporte
Turismo . . . . . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/turismo
Urbanismo e infraestructuras. http:https://datos.gob.es/kos/sector-publico/sector/urbanismoinfraestructuras
Vivienda . . . . . . . . . . . . . . . . http:https://datos.gob.es/kos/sector-publico/sector/vivienda

Gobierto Data automation moved this from In progress to Done Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Gobierto Data
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants