DMPbelgium / roadmap

5 stars 1 forks source link

disable and untested external apis #106

Open nicolasfranck opened 6 days ago

nicolasfranck commented 6 days ago

Fixes #104

The user cannot save his input to field "Grant number" because it is an autocomplete field that wants to find a value in some openaire api (but that does not work apparently). Anyway, as with other autocomplete fields in dmproadmap (e.g. "Funder"), the input is cleared on save when the autocomplete does not return anything.

The autocomplete feature is enabled by setting Rails.configuration.x.open_aire.active (boolean), and is used in app/views/plans/_project_details.html.erb (and therefore also in the branded view app/views/branded/plans/_project_details.html.erb. I see no difference between those views when it comes that setting:

$ diff app/views/plans/_project_details.html.erb app/views/branded/plans/_project_details.html.erb 
2a3
> <!-- BELNET: All we do here is changing the value of id_tooltip -->
6c7
< id_tooltip = _('A pertinent ID as determined by the funder and/or organisation.')
---
> id_tooltip = _('Modifiable automatically assigned number.')

So either this field never worked, or the default setting of Rails.configuration.x.open_aire.active has been set to true recently.

Nevertheless, this should it. It also took the liberty to set the other settings to false. Apparently none of those are used anywhere in the code, but we should not forget about those.