-
Notifications
You must be signed in to change notification settings - Fork 109
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
Adds contributors for plans #2402
Conversation
@@ -420,7 +427,7 @@ def owner | |||
.administrator | |||
.order(:created_at) | |||
.pluck(:user_id).first | |||
User.find(usr_id) | |||
usr_id.present? ? User.find(usr_id) : nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was an edge case error that came up with some test records (a plan with no owner)
Looks good to me as far as I can tell. |
yes, good point @raycarrick-ed I'll change it to firstname |
ec6e3fb
to
639aa4a
Compare
rebased with workflow fixes |
* bumped rack and tinymce * updated tinymce added identifiers polymorphic table finished cleanup of old identifiers fixed bug fixed bug and some rubocop issues added managed lflag to Org updated code to work with new managed flag fixed issue with scope Added lib task for orgs.managed added a rake db:migrate step to github workflow tests fixed rubocop issues removed db:migrate from workflows fixed bug in upgrade task removed bad index from schema and replaced with good one fixed broken tests initial ROR service and abstract Base service with config and tests updated tests rubocop fixes added webmock exception for chromedriver Part 1 - maDMP ROR/Fundref - Identifier consolidation (#2361) * added identifiers polymorphic table * finished cleanup of old identifiers * fixed bug * fixed bug and some rubocop issues parent b6af5de author briri <[email protected]> 1579797878 -0800 committer briri <[email protected]> 1580422823 -0800 added identifiers polymorphic table finished cleanup of old identifiers fixed bug fixed bug and some rubocop issues added managed lflag to Org updated code to work with new managed flag fixed issue with scope Added lib task for orgs.managed added a rake db:migrate step to github workflow tests fixed rubocop issues removed db:migrate from workflows fixed bug in upgrade task removed bad index from schema and replaced with good one fixed broken tests initial ROR service and abstract Base service with config and tests updated tests rubocop fixes added webmock exception for chromedriver initial org selection service pulled in a bunch of changes from other branch added tests added controller to rails_helper fixed typos in upgrade rake fixed some issues with models and specs work on org selector further work on new selection boxes cleaned up org selection service and added to profile and create plan pages got all org selectors switched over to new autocomplete Added contextual flags to identifier_schemes and fixed tests for org model update scopes on identiifer_scheme for contextual access cleaned up schema ran annotate cleaned up annotations cleaned up annotationss added some tests and cleaned up presenters added tests for hash_to_org_service finished up refactor of org selection fixed failing tests fixed some rubocop issues in new objects added funder_id and org_id to the plans table added funder and org associatyions to Plan updated create plan and project details to use funder finished up issues with ROR/Fundref finished ror work fixed issues more spec issues fixed trypo in commented out test Removed debug statements fixed tests and added orgselectable to invitiations updated rake task to use new services fixed up remaining issues with JS and org selectors fixed weird bug when filtered_shib_discovery_service is enabled fixed weird bug when filtered_shib_discovery_service is enabled fixed some issues saving shib entityId fixed another shib entityID issue final fix for shib entityID Added contributors model and ethical_issues fields updated upgrade rake task Added org_id to contributors fixed bug with identifier lookup updated tests with org_id for contributors changed given_name to firstname added wkhtmltopdf package and updated postgres image to latest debug statement to test github workflow issue debug statement to test github workflow issue debug statement to test github workflow issue debug statement to test github workflow issue debug statement to test github workflow issue debug statement to test github workflow issue debug statement to test github workflow issue debug statement to test github workflow issue debug statement to test github workflow issue cleanup trying to fix wkhtmltopdf trying to fix wkhtmltopdf trying to fix wkhtmltopdf trying to fix wkhtmltopdf trying to fix wkhtmltopdf added wkhtmltopdf fix to mysql workflow added 'unique' to usage helper test fixed tests broken by changing given_name to firstname on contributors
Looks like everything is now passing the tests. I have a question about the implimentation, It makes sense to me that a Plan has_many contributors, but it's unclear to me why a contributor would |
Hmm. The original intention with using the plans_contributors join table was to keep the size of the contributors table down. I see your point though on a belongs_to relation being a better fit. I have switched it over in the api-v1 branch so closing this one out |
Addresses #2349.
These changes are dependent on the ROR/Fundref PR's new
identifiers
tableChanges proposed in this PR:
contributors
table (with f_key toorgs
)plans_contributors
join table that sets a bitflagroles
field based on the CRediT Taxonomy (thanks for alerting us to that @xsrust)ethical_issues
fields to theplans
tabledata_contact
('Data curation' role) andprincipal_investigator
('Investigation' role) information on a plan over tocontributors
and adds a 'Writing - original draft' role to all of the plan's authors.Changes to model/UI forthcoming. Need to update the code that creates a plan or shares a plan to add these contributors.