dmproadmap / roadmap Goto Github PK
View Code? Open in Web Editor NEWDCC/UC3 collaboration for a data management planning tool
License: MIT License
DCC/UC3 collaboration for a data management planning tool
License: MIT License
or set of domains. This was requested by Peter Neish from Melbourne. Will need to be checked in terms of collaborations before we implement it.
Create tests for all of the application helper functions
Its bad practice to auto-save within a Model's methods. Its unclear to a developer that invokes the method that something is being saved behind the scenes.
For example, the Plan.add_user method auto-saves a new Role.
def add_user(user_id, is_editor = false, is_administrator = false, is_creator = false)
Role.where(plan_id: self.id, user_id: user_id).each do |r|
r.destroy
end
role = Role.new
role.user_id = user_id
role.plan_id = id
role.creator= is_creator
role.editor= is_editor
role.administrator= is_administrator
role.save
end
If the Plan was not created first (e.g. Plan.new instead of Plan.create) the save fails because the Role.plan_id is nil. The failure goes undetected and becomes difficult to debug if we have code like the following:
plan = Plan.new
puts "New: #{plan.inspect}"
plan.assign_creator(current_user)
puts "Creator Assigned: #{plan.inspect}"
plan.template = @template
plan.title = "Testing"
puts "Required fields supplied: #{plan.inspect}"
plan.save!
puts "Saved: #{plan.inspect}"
puts "Roles after save: #{plan.roles.inspect}"
Here is the output from above. As you can see the Role was not saved because the plan_id was nil at the point that the add_user method was called.
# New: #<Plan id: nil, project_id: nil, title: nil, template_id: nil, created_at: nil, updated_at: nil, slug: nil, grant_number: nil, identifier: nil, description: nil, principal_investigator: nil, principal_investigator_identifier: nil, data_contact: nil, funder_name: nil, visibility: 0>
# Creator Assigned: #<Plan id: nil, project_id: nil, title: nil, template_id: nil, created_at: nil, updated_at: nil, slug: nil, grant_number: nil, identifier: nil, description: nil, principal_investigator: nil, principal_investigator_identifier: nil, data_contact: nil, funder_name: nil, visibility: 0>
# Required fields supplied: #<Plan id: nil, project_id: nil, title: "Testing", template_id: 4, created_at: nil, updated_at: nil, slug: nil, grant_number: nil, identifier: nil, description: nil, principal_investigator: nil, principal_investigator_identifier: nil, data_contact: nil, funder_name: nil, visibility: 0>
# Saved: #<Plan id: 2, project_id: nil, title: "Testing", template_id: 4, created_at: "2017-02-09 17:44:35", updated_at: "2017-02-09 17:44:35", slug: nil, grant_number: nil, identifier: nil, description: nil, principal_investigator: nil, principal_investigator_identifier: nil, data_contact: nil, funder_name: nil, visibility: 0>
# Roles after save: #<ActiveRecord::Associations::CollectionProxy []>
Create tests for all of the shared methods contained in the ApplicationController
Add Referential integrity by adding foreign keys to the database.
Create unit tests for the UserIdentifier model. Also make sure that their association tests within the IdentifierScheme and User models
Actions: Try to sign up, and try to sign up with the same email before confirming your account.
Problem: You get logged straight into that account's edit profile page.
Rename the text_desription column in the token_permission_types table to text_description. Then update all references in the code base.
https://www.pivotaltracker.com/story/show/120867115
Plan statuses include:
draft
in review (call it something else; loose status w/no controls; add alerts for users to leave feedback on plans/notify when they receive new feedback)
complete
submitted: future status to mark plans of record/submitted to funder; corresponds with lifecycle; used for integrations, e.g., with repositories
Question about whether status changes can be done manually or whether they should only occur automatically (triggered by clicking a button e.g. "Export")
Note plan terms that correspond with the database:
Add the ORCID to the list of export options on the various export page.
References: https://www.pivotaltracker.com/story/show/120801699
If you click to make small changes nothing happens. If you click to make big changes you get an error
may be covered in recent changes - checking ....
If you try adding guidance by question, it should limit the results of subsequent dropdowns based on your previous choice. I selected the H2020 template, but it gave me phases from all templates, not just this one. See screengrab below. I realise we’ll be changing this soon, but we should fix this in the interim as users wouldn’t know what the phases of the H2020 template were called and it would surely throw up an error if you picked to add guidance in one template but selected phases, sections or questions from another…
Hmmm… worryingly it doesn’t throw up an error if the template, phase, version, section, and question don’t match...
Related to: https://www.pivotaltracker.com/story/show/131749453
Related to Pivotal ticket: https://www.pivotaltracker.com/story/show/131749453
In places there are explicit urls used such as "/admin" which break when the the instance uses a subdir e.g. dmpsrv2.dcc.ac.uk/dmptuuli and so they need to be replaced with rails helpers e.g. admin_root_path. So far I have come across 2: one the link for the superadmin, one for the users under the org_adminarea.
It should be possible to search for and replace any others
Organisational guidance shows up on the front end irrespective of which template it is applied to. The EUDAT guidance group applies to ‘Horizon 2020’ template only, but the option appears to select from when you choose other funders or templates on front end
If you select to view DCC guidance as part of your plan, the confirmation shows this has been picked but no guidance displays. Guidance I’ve added for the institution (GCU) is pulling through so it’s maybe an error with the DCC or default setting?
We've had a request for an option to add attachments to DMPs (which should be automatically downsampled and scaled for storage and export).
User cannot write in their (unlisted) Org when editing their profile page. Possibly Tuuli-specific?
There is an additional dropdown that appears when funders (or unis) have more than one template for users to select from. This is always displaying now, even when there is only one choice.
Also, an option called ‘My organisational guidance’ is showing in the optional guidance dropdown. Is this due to automatically creating a guidance group for each org? I don’t know why it’s appearing and expect it shouldn’t be.
UPDATED: UX wireframes @JEK-III
http://h90c3m.axshare.com/#g=1&p=my_plans__blank
First-time login Dashboard - Add 'Create test plan' option next to 'Create plan' button
http://h90c3m.axshare.com/#g=1&p=my_plans__ideal
My plans - add tick box for 'test' which always corresponds w/'private' visibility
Allow users to mark their plan as a 'test'.
Test plans will be excluded from statistical calculations and will not be visible to other users (only owners and with those that the owner has shared the plan)
We will need to add a new boolean field to the projects table
Create a test that checks for the existence of all the initializer and yaml config files.
It should also check to ensure that any magic strings in the locale files match the values in the database.
Remove all of the old DB migrations and build a new initial migration that is based on the current schema and any changes made to the DB from the onset of the Roadmap project to the end of the 1st week in January.
Install the Shibboleth Service Provider on the Roadmap server and configure it to work with the appropriate federation.
References: https://www.pivotaltracker.com/story/show/131902937 and https://www.pivotaltracker.com/story/show/125268081
Emails frequently seem to go astray. There are 2 main scenarios we need to support: confirming a new user and resetting password. Both of these should probably be added to the admin interface (or superadmin). In the meantime I have added a function to the user model 'reset_password_link' which will generate a new link for the user and can then be emailed to them. So something like:
rails c
u = User.find_by(email: "[email protected]")
u.reset_password_link
"/users/password/edit?reset_password_token=ABCDEFGHIJK"
that can then be sent to the user prepended by the host (obvs) and it should work for them. This is just a utility till it gets done right.
Allow users to mark their plan 'public'.
Public plans will be visible and exportable by everyone regardless of whether or not they have an account in the system.
We will need to add a new boolean field to the projects table
Related to Pivotal ticket: https://www.pivotaltracker.com/story/show/131749453
Allow users to add their ORCID to their user profile. This should use OAuth to verify that the user has the correct one. An example is available in UC3's Dash product.
References: https://www.pivotaltracker.com/story/show/119416159
Currently, the relationship between an organisation and it's various users is defined through the User_org_roles table. We would like this relationship to be defined through the organisation_id field of the User table. This means we need to:
Replace all of the existing tinymce text-areas with substance-forms rich-text-areas.
Use the new substance-rails gem to import substance editor and its dependencies and then use its helpers to update the pages.
https://github.com/CDLUC3/substance-rails
The above gem should load the substance-forms assets into Rails' asset pipeline
Remove the existing section locking mechanisms from the projects/plans controllers. This includes the removal of JS that locks a section when the user begins editing as well as a timed ajax call that checks for locks.
References: https://www.pivotaltracker.com/story/show/129852547
Update the Travis.CI file so that it specifies which Rails and Ruby versions we are hoping to run our tests against and support.
UTF is fine in the body of the pdf but not in the footer. Needs further exploring. Setting the encoding works for the body but not the footer, need to find out where that is getting set.
The guidance by question dropdowns are really buggy. I tried editing the piece of guidance in the screengrab above as I’d picked a random assortment of template, phase etc and on editing it only opened up the first couple of dropdowns. The phase one only gave me one option “BBSRC Data Sharing Plan” so who knows what question it will attach to…
The guidance in each dropdown saying “Select a template” and “Select a phase” is also missing when you go back in to edit
No important data is stored in these tables, and the data in them is not referenced anywhere in the code
Update the seeds file so that it populates all of the lookup tables, creates a super admin, org admin, and org user account. Creates an example template and an example plan.
The current seeds.rb does not adequately populate enough data to help someone install and test drive the new system.
I customised the CRUK standard template for GCU, adding an example answer to the first question and an additional section. Neither display on the front end when I create a plan for CRUK standard template with GCU selected in org. This is possibly related to bug 3 if something has gone awry with the logic for selecting templates and guidance?
Install the Shibboleth Service Provider on the Roadmap server and configure it to work with the appropriate federation.
References: https://www.pivotaltracker.com/story/show/131902937 and https://www.pivotaltracker.com/story/show/125268081
The passwords are not usable once our existing data has been migrated over from the current DCC instance to the new Roadmap codebase.
Could be related to the Devise gem, Ruby or Rails ... all were upgraded during the creation of Roadmap.
The Templates model contains a few methods that I believe must have been introduced as shortcuts to make it easier on the UI side. They don't really belong in the template though. We should remove the methods and replace any calls to them with the following.
Remove self.templates_org_type and replace with:
templates = Org.where(published: true, org_type: [org_type]).templates
Remove self.funders_templates and replace with (note this one doesn't check the published status ... should it!?):
templates = Org.where(org_type: :funder).templates
Remove self.own_institutional_templates and replace with:
templates = current_user.org.templates
Remove self.funders_and_own_templates and replace with:
templates = current_user.org.templates
templates += Org.where(org_type: :funder).templates
Remove org_type method. We should use:
template.organisation.org_type
Fix the failing tests to make Travis.CI happy. If they are very old, pre-Roadmap tests, consider simply commenting them out if they will change significantly during our upcoming DB model refactoring or UI work.
See screenshot in the 'Templates' section of: https://docs.google.com/document/d/1xsH_wXQfYpAlfOmYAJ_VI89FEpW0wX7-FS8_tcXxrvY/edit
Current plan_sections table is the locking mechanism for a user editing a section of a shared plan.
New system of optimistic locking to be implemented as defined here.
Additionally requires old locking mechanism to be removed from the javascript surrounding the edit plan page.
Additionally requires old locking endpoints to be removed from the plans controller.
Additionally requires locking logic to be removed from the model for plans.
Allow customisation by allowing for directories with custom branding
Related to Pivotal: https://www.pivotaltracker.com/story/show/131749453
It's been reported that accented characters don't show up correctly in PDF exported plans.
We've had a request to enable filtering of the user list in the org admin page, so that you can choose users based on org membership or which templates they've used.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.