Coder Social home page Coder Social logo

dmproadmap / roadmap Goto Github PK

View Code? Open in Web Editor NEW
102.0 102.0 111.0 78.34 MB

DCC/UC3 collaboration for a data management planning tool

License: MIT License

Ruby 64.58% JavaScript 12.06% HTML 16.47% XSLT 0.41% SCSS 1.57% CSS 4.91% Procfile 0.01% Shell 0.01%
cdl data-management data-management-plan data-management-planning dcc dmp dmponline dmptool ruby ruby-on-rails uc3

roadmap's People

Contributors

aaronskiba avatar aninder avatar benjaminfaure avatar bhavi avatar bodacious avatar bozltd avatar briri avatar damodarsojka avatar dependabot[bot] avatar dmponline avatar dstuckey-uoe avatar egonw avatar gjacob24 avatar hbayindir avatar hugoecarl avatar johnpinto1 avatar jollopre avatar killian-dunne avatar kmcgre avatar martaribeiro avatar nicolasfranck avatar pengyin-shan avatar raycarrick avatar raycarrick-ed avatar sean-stilwell avatar sjdcc avatar vyruss avatar weiweishi avatar xsrust avatar yjarosz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

roadmap's Issues

Allow users to make their plan "public"

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

Define Organisation <-> User relationship through user table

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:

  • change the data access to reflect the new relationship path (in both models and views)
  • ensure any logic for this relationship(as it was complex before) is removed from views
  • create a function to convert our data from the old system to the new system
  • include above function in the migration which removes user_org_roles table

DCC Guidance not displaying

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?

Functionality to get around email failing

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.

Tests - Fix failing tests

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.

Update the seeds.rb file used to initialize a new installation

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.

Create a test that verifies configuration elements

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.

Organisation details page - bug fixes : Testing GithubProjects

Related to Pivotal: https://www.pivotaltracker.com/story/show/131749453

  • When typing in website field it displays message “please enter a web address valid.” > should be “please enter a valid web address”
  • Tooltip for ? icon appears to be for template creation area and/or accompanied the Description text box that we removed. It doesn’t make sense here > need to delete Tooltip
  • Organisation type field (at bottom of page for editing org details) should have a drop-down list or radio buttons to select from: Funder, Institution, others?

Fix bugs on Export Page

  • Cannot export plans as PDF or text (all other formats ok) - gives error message “RuntimeError in PlansController#export”
  • Do not display question numbers or html tags in “Sections” menu on Export page (screenshot below: #1 from Roadmap to compare with #2 from DMPonline). Tags also appear in Plan Details page. This might just be an issue with the DMPTuuli data for this template; I’m not finding html tags in other templates...
  • Exported DOCX contains questions and answers - it should only contain answers. Again, this is attributable to DMPTuuli template data and doesn’t appear to be a global problem.
  • Adding issues from Export section above: PDF export is now working but when I change PDF Formatting settings the only change that takes effect is font size; Times New Roman font does not work and neither do margin adjustments
  • Why are there separate fields for Project Name and Title? Is this for multi-phase plans? If necessary to have both, it would be better to include the Title as an admin details field under “Included Elements” so users can turn it on/off Added to Pivotal
  • Admin Details options do not reflect the info that users enter on the Plan Details page (screenshot #3 below) - I’m confused by inconsistent use of terms “plan details” “project details” “plan name” “project name” “Title/DMP title” - create Pivotal ticket Added to Pivotal
    
    See screenshots in the 'Export' section of: https://docs.google.com/document/d/1xsH_wXQfYpAlfOmYAJ_VI89FEpW0wX7-FS8_tcXxrvY/edit

Remove plan_sections and add replace locking mechanism with optimistic locking

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.

Add Foreign Keys

Add Referential integrity by adding foreign keys to the database.

Manage plan status

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:

  • Type (is it a test plan? y/n)
  • Status (draft...complete...)
  • Visibility (public/organizational/private)

Users list page - bug fixes : Testing GithubProjects

Related to: https://www.pivotaltracker.com/story/show/131749453

  • The “Update Users” button above the list of users throws an error: “NoMethodError in UsersController#admin_api_update”...
  • It’s easy to make mistakes granting role of Org Admin (with tick box) - I accidentally removed my privileges and could no longer access the Admin Area; users should not be able to edit their own roles; and I assume the “Update Users” button is meant to save changes but (see bullet above) it doesn’t work

Branding generalisation

Allow customisation by allowing for directories with custom branding

  • Define a config variable like config.branding = 'dcc' (which need not be set)
  • Modify the code so that:
    • If config.branding is unset, default to basic Roadmap page templates/images
    • If config.branding is set, read page templates/images from branding/dcc folder
  • Create/adapt said templates for our basic sites (DMPOnline, DMPTool, DMPTuuli, DMPMelbourne)

Fix login bugs

  • Attempting to sign in after requesting to reset my password produced an error message: “too many redirects” ...the system is unavailable. After reloading the page I was signed in
  • Session timeout results in an Unauthorized error message. It should bring the use to the home page with a message stating that their session timed out

Only publish "public" plans when status is "complete"

Plans set to public visibility should only appear in the Public DMPs list when the plan status is complete. This avoids cluttering the list with blank, in progress plans and is consistent with current DMPTool practice.

Related issues #87 and #84

Unit tests for UserIdentifier

Create unit tests for the UserIdentifier model. Also make sure that their association tests within the IdentifierScheme and User models

Plans list page - bug fixes : Testing GithubProjects

Related to Pivotal ticket: https://www.pivotaltracker.com/story/show/131749453

  • When I click “Share” under My plans, I’m taken to a pre-populated list of collaborators who already have permissions that I never granted (screenshot below) - I think we only want the “Add collaborator” email and permissions drop-downs to appear
  • If I use the drop-down to change permissions for existing collaborators, it gives an error message “ActionController::UrlGenerationError in ProjectGroups#update”
  • Same error message noted above (under Share tab) that I cannot add collaborators - gives an error message
  • After changing the settings to Filter plans, the fields are populated (screenshot below) and the random list of pre-assigned collaborators disappeared
  • BUT I can’t save changes to filters; I can add new filters but not remove them; and the column heads for each field look weird [“Name,” “1”] > these shouldn’t be displaying values directly from the database

Bug 15 - organisation guidance not filtering by template

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

UTF in pdf export footer

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.

explicit urls

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

Data Migration - Password Conversion Issue

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.

Add attachments to plans

We've had a request for an option to add attachments to DMPs (which should be automatically downsampled and scaled for storage and export).

Consolidate DB migrations into one new migration

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.

Remove calls to 'save' from Model methods

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 []>

Guidance by question not filtering content correctly in dropdowns

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...

Bug 14 - editing existing guidance by question not working

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

Add filters to org admin page

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.

Remove shortcut methods from templates model

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 bugs on Template Edit Page

  • Click the ‘Guidance’ button to add new guidance to a published template. Then add some new guidance and click ‘Save’. This causes the screen to grey out and then nothing happens. It appears as though its trying to open a dialog box. The new guidance is NOT saved. (See screenshot below)
    It doesn’t seem like the ‘Guidance button should even be available here.
  • When clicking to Edit a template Phase, the description appears with html markup (screenshot); this behavior only occurs the first time I click to Edit
    html_phase_editing
  • Trying to edit a published template: Selecting ‘Make Big Changes’ to create a new version results in an error (see screen shot).
    screen shot 2016-10-17 at 4 07 21 pm
  • Trying to edit a published template: Selecting 'Make Small Changes' does nothing; the pop-up window remains in place
    no-small-changes

See screenshot in the 'Templates' section of: https://docs.google.com/document/d/1xsH_wXQfYpAlfOmYAJ_VI89FEpW0wX7-FS8_tcXxrvY/edit

Create Plan Page not removing options by filtering

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.

Add a "test" flag to plans

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

Funder customizations not showing up on the front end

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.