Open nicolasfranck opened 1 year ago
Some important notes about the current working:
So in short: simply keep using this autocomplete field, but draw the autocomplete from all managed funders? (I admit, it is also a way to avoid long development to learn how they implemented that search dialog for the repositories, but an autocomplete on managed records serves the same purpose here, right?)
About the list of funders: once new funders will not be created anymore, we can start "fixing" the old values, or leave that up to the users? Ah right, there is also the "merge organisation" tool, right?
Some problems:
Some remarks about the funders attached to plans:
219
unique values:> funder_ids = Plan.where("funder_id is not null and funder_id <> ''").map(&:funder_id).uniq
=> 219
19
of them are managed
:irb(main):049:0> Org.where(id: funder_ids).select(&:managed?).size
=> 19
8
of them are marked as funder:irb(main):050:0> Org.where(id: funder_ids).select(&:funder?).size
=> 8
Apparently organisations that were automatically created by use of the "edit project details" page were never marked as funder (see org_from_params and place where it is used). The same is true though for institutions attached to plans: https://github.com/DMPRoadmap/roadmap/blob/main/app/controllers/plans_controller.rb#L100. But I guess, if organisations are automatically (and unwillingly) created by users when editing plans, these marks ("funder", "institution") are probably seen as opinions.
Please complete the following fields as applicable:
What version of the DMPRoadmap code are you running? (e.g. v2.2.0)
3.1.1
(see test.dmponline.be at 2022-12-22)TODO:
orgs
with organisations with org type "funder", and set the flagmanaged
totrue
(to distinguish from user input), and then use that managed list of funders:identifiers
(SELECT * FROM identifiers WHERE value = 'https://doi.org/10.13039/100000001' AND identifiable_type = 'Org' AND identifier_scheme_id IN (SELECT id FROM identifier_schemes WHERE name = 'fundref'))
)name
in mysql, which is an exact search. For some organisations that will work, for other not (e.g. name for Ghent University is different in crossref).Is it actually desirable to have this sudden increase in managed organisations that are only used once in a while? Additionally, for some existing organisations, that are also funder in crossref, but are named differently here (e.g. Ghent University), an extra table entry will be made, as the match on name does not work properly.
Is a manual entered list of funders not more desirable? Based on the existing unmanaged list of funders? So fixing those records, adding the fundref identifiers, and then set them to managed?