Project

General

Profile

Actions

Idea #3296

closed

[Workbench] Configuration option requires new users to complete a survey/form before using Workbench

Added by Tom Clegg over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
Workbench
Target version:
Start date:
08/05/2014
Due date:
Story points:
2.0

Description

Form fields we want to collect:
  • Institution/Company (required)
  • Lab
  • Website URL
  • Title
  • What best describes your role (dropdown):
    Bio-informatician
    Computational Biologist
    Biologist/Geneticist
    Software Developers
    IT
    Other
New behavior and implementation notes:
  • Add a link in the email address dropdown menu in Workbench called 'Edit profile'.
  • Add a new page (/users/{my_uuid}/profile) with a form allowing the user to add/edit profile data.
  • Get the list of form fields from the user_profile_form_fields configuration value.
  • Use standard bootstrap form markup (see http://getbootstrap.com/css/#forms-horizontal).
  • Store the values in user prefs: current_user.prefs["profile"]["title"], etc.
  • On the "edit profile" page, display (but not offer to edit) the user fields that get populated automatically during the OpenID login process (email, first name, last name, identity_url).
  • Add comments to application.defaults.yml showing how to add profile fields.
  • The default configuration should be an empty hash (i.e., no form fields are shown, and the link to the "edit profile" page is removed from the email address dropdown menu).
  • If any of the required profile keys indicated by the user_profile_form_fields configuration hash are missing from the current user's prefs["profile"]:
    • Redirect most1 dashboard pages to the "edit profile" page.
    • Add an alert panel to the "edit profile" page asking the user to please provide the following information.
    • Highlight the required fields so it's not too hard to find "which one did I miss?" (especially if the profile already existed but the config has added a new required key).
  • Trap to watch out for: If admin adds a new required field, next time a tab pane gets refreshed for some unsuspecting user, we probably don't want the tab pane to end up with a "manage profile" link. Perhaps we should skip the "redirect if any missing" logic for requests with params[:partials]? (And methods other than GET)

1 Avoid constructing a catch-22 where (for example) the user agreement cannot be signed until the profile is edited, and vice versa.

Structure and example yaml encoding for user_profile_form_fields:

  user_profile_form_fields:
    -
      key: organization
      type: text
      form_field_title: Institution/Company
      form_field_description: ~
      required: true
    -
      key: role
      type: select
      form_field_title: Your role
      form_field_description: Choose the category that best describes your role in your lab.
      options:
        - Bio-informatician
        - Computational biologist
        - Biologist or geneticist
        - Software developer
        - IT
        - Other

Example encoding for user.prefs[:profile]:

{"organization":"Laidlaw Lab","role":"Software developer"}

Subtasks 7 (0 open7 closed)

Task #3155: redirect regular workbench pages to the "edit profile" page if any required fields (as decided by application.(defaults.)yml) are not filled in.Resolved08/05/2014Actions
Task #3154: Provide an "edit profile" page for editing the current_user.prefs[:profile] hashResolved08/05/2014Actions
Task #3156: [API] Send e-mail to admin the first time a user's profile data is savedResolved08/05/2014Actions
Task #3474: Review branch 3296-user-profileResolvedRadhika Chippada08/05/2014Actions
Task #3477: When an admin does "login as" a different user, skip profile check.Resolved08/05/2014Actions
Task #3512: Add a "message" field to configResolvedRadhika Chippada08/06/2014Actions
Task #3560: Redirect user back to the profile page after the user fills in all required fields. Include a message saying profile is all set and the user can now access workbench.ResolvedRadhika Chippada08/10/2014Actions
Actions

Also available in: Atom PDF