Comment 4 for bug 564825

Revision history for this message
Dan MacNeil (omacneil) wrote :

step 0
 update test data with reminder levels that exercise our code
  app-mvhub/project-tools/test_mvh_db.sql
  app-mvhub/project-tools/test_nsp_db.sql

 a. create new branch
 b. run mv_update_development
 c. get test data the way you want
 i. psql update program & agency to create records with reminder levels other than zero
 ii. some reminder levels should be 5

 d. use pg_dump to overwrite test_*_db.sql (above)
 e. commit , push,
 f. run mv_update_development
 i. as you
 ii. as Lee
  sudo su lgoodrich -l
  cdws
  bzr branch /var/www/mvhub/priya/source-code/$BRANCH_NAME/ .
  mv_set_active
  ...
  mv_update_development

 g. look for errors
 h. maybe edit dumps by hand to remove errors (as ***YOU***)
 i. push/merge request / blah blah blah

Note: --no-acl and -no-owner probably big things in pg_dump

  dig around for old procedure for saving test data
   # look for deleted files
   bzr log app-mvhub/doc
   # look at postgres dumping
    man pg_dump

pg_dump \
 --format=p \
 --file $MVH_DUMP_FILE.sql \
 --no-owner \
 --clean \
 --no-acl \
 -h localhost \
 -d production.mvh \
 -U production

###########################

1) Get data
 # new queries AGENCY_PROGRAM_X_EXPIRED_CALL_RECORDS
 # same as email reminder queries except also:
  record_type
  record_id
  contact_phone
  contact_fax
  contact_?

 MVHub::Notifications::get_expired_records(NEW_X_EXPIRED_PROGRAM_CALL_RECORDS)
 MVHub::Notifications::get_expired_records(NEW_X_EXPIRED_AGENCY_CALL_RECORDS)

 # modify to take sub ref for Notifications::_push_and_return_programs
 MVHub::Notifications::create_notifications_using( \sub_name )

 # example:
  mech/user/login_with_bad_password.t

 create:
   Notifications::_push_and_return_records_for_calls(
   push_on_me_aref=>'',record_name=>'',
   record_id=>'',record_type=
   )
  returns something like

   [
    {
     record_name_label=>''
     checkbox_name=>''
     record_type=> '';
    }
   ]

 #misc cleanup /refactoring
  rename
   Notifications::_push_and_return_programs
  to:
   Notifications::_push_and_return_records_for_emailing

2) format data for presentation
 (maybe) create:
  MVHub::Notifications::create_standard_notification_calls_with

3) present data in HTML::Template
 modify CallManager.pm to take new routines created in Notifications.pm
 modify call manger HTML template
  add inner TMPL_LOOP with checkboxes

4) handle data user gives us in form
 MVHub::CallManager::update_contact_info()

to:
 with new UPDATE PROGRAM and UPDATE AGENCY logic

4) maybe rename
 MVHub::CallManager::update_contact_info()
to:
 ???

5) test code