Skip to content

Persist jobs_to_be_done answers to DB

Jay requested to merge jswain_jobs_to_be_done_persisted into master

What does this MR do and why?

A precursor to promoting the JTBD experiment is to persist records to the db.

part of: #338226

Changelog: changed

Database migration output

$ bin/rails db:migrate RAILS_ENV=test
== 20210917224419 AddRegistrationObjectiveToUserDetail: migrating =============
-- add_column(:user_details, :registration_objective, :smallint)
   -> 0.0022s
== 20210917224419 AddRegistrationObjectiveToUserDetail: migrated (0.0022s) ====

Rollback:

bin/rails db:rollback
== 20210917224419 AddRegistrationObjectiveToUserDetail: reverting =============
-- remove_column(:user_details, :registration_objective, :smallint)
   -> 0.0025s
== 20210917224419 AddRegistrationObjectiveToUserDetail: reverted (0.0062s) ====

Screenshots or screen recordings

Screenshot
Screen_Shot_2021-09-22_at_5.09.43_PM

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Feature.enable(:jobs_to_be_done)
  2. Navigate to http://localhost:3000/users/sign_up
  3. Sign up
  4. Once you are on the http://localhost:3000/users/sign_up/welcome page, select an answer from the "I'm signing up for GitLab because:" select field, and submit.
  5. Confirm the value was persisted for the user.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jay

Merge request reports